fma code added
This commit is contained in:
@@ -67,15 +67,19 @@ typedef MAT_KERNEL(uint64_t) sn_zero_kernel_u64;
|
||||
/* SSE panel layout: column-major buffer holding 4 logical columns with MINQ=4.
|
||||
Columns: each column packs up to four scalars so ALIGN equals sizeof(__m128).
|
||||
Alignment: every column boundary lands on a 16-byte multiple for XMM loads. */
|
||||
#define MAT_PANEL_SSE(T) SN_ALIGNAS(16) MAT_PANEL_SQ_MIN_NOALIGN(T, __m128, 4)
|
||||
#define MAT_PANEL_sse(T) SN_ALIGNAS(16) MAT_PANEL_SQ_MIN_NOALIGN(T, __m128, 4)
|
||||
/* AVX2 panel layout: column-major buffer holding 8 logical columns with MINQ=8.
|
||||
Columns: each column stores eight elements via two 256-bit chunks when T is 32-bit.
|
||||
Alignment: column starts are 32-byte aligned so AVX2 loads/stores remain contiguous. */
|
||||
#define MAT_PANEL_AVX(T) SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, 8)
|
||||
#define MAT_PANEL_avx(T) SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, 8)
|
||||
/* AVX2 panel layout: column-major buffer holding 8 logical columns with MINQ=8.
|
||||
Columns: each column stores eight elements via two 256-bit chunks when T is 32-bit.
|
||||
Alignment: column starts are 32-byte aligned so AVX2 loads/stores remain contiguous. */
|
||||
#define MAT_PANEL_avx_fma(T) SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, 8)
|
||||
/* AVX-512 panel layout: column-major buffer holding 8 or more columns depending on T.
|
||||
Columns: each column expands to ceil(Q/lanes) ZMM chunks; default MINQ=8 keeps double-wide tiles.
|
||||
Columns: each column expands to ceil(Q/lanes) ZMM chunks; default MINQ=8 keeps doublse-wide tiles.
|
||||
Alignment: column starts sit on 64-byte boundaries to match AVX-512 streaming access. */
|
||||
#define MAT_PANEL_512(T) SN_ALIGNAS(64) MAT_PANEL_SQ_MIN_NOALIGN(T, __m512, 8)
|
||||
#define MAT_PANEL_512(T) SN_ALIGNAS(64) MAT_PANEL_SQ_MIN_NOALIGN(T, __m512, 8)
|
||||
|
||||
/* Global zero kernel declaration (defined in dllmain.c), aligned to 64 bytes */
|
||||
#ifdef __cplusplus
|
||||
@@ -113,7 +117,7 @@ extern __declspec(align(64)) sn_zero_kernel_u64 SN_ZERO_KERNEL;
|
||||
int col_index, int row_index)
|
||||
|
||||
/* Declarations for AVX float variant */
|
||||
DECLARE_BUILD_PANEL(AVX, float);
|
||||
DECLARE_STORE_PANEL(AVX, float);
|
||||
DECLARE_BUILD_PANEL(avx, float);
|
||||
DECLARE_STORE_PANEL(avx, float);
|
||||
|
||||
#endif /* SN_MATKERNEL */
|
||||
|
||||
Reference in New Issue
Block a user