mat proc kernel std tamplate is ok, merging old decl
This commit is contained in:
@@ -3,59 +3,12 @@
|
||||
#if SN_IS_ARCH(SN_ARCH_X86_64)
|
||||
|
||||
#include "sn_intrinsic.h"
|
||||
#include "sn_intrincontext.x86.h"
|
||||
#include "sn_intrinsic.context.x86.h"
|
||||
#include "sn_intrinsic.std.h"
|
||||
|
||||
STD_MK_PROC_DECL(float, sse, , clear)
|
||||
{
|
||||
register __m128 zero = _mm_setzero_ps();
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
PANEL_COL_VEC((*ans), i, 0) = zero;
|
||||
}
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(float, avx, , clear)
|
||||
{
|
||||
register __m256 zero = _mm256_setzero_ps();
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
PANEL_COL_VEC((*ans), i, 0) = zero;
|
||||
}
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(float, 512, , clear)
|
||||
{
|
||||
register __m512 zero = _mm512_setzero_ps();
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
PANEL_COL_VEC((*ans), i, 0) = zero;
|
||||
}
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(double, sse, , clear)
|
||||
{
|
||||
register __m128 zero = _mm_setzero_ps();
|
||||
PANEL_COL_VEC((*ans), 0, 0) = zero;
|
||||
PANEL_COL_VEC((*ans), 1, 0) = zero;
|
||||
PANEL_COL_VEC((*ans), 2, 0) = zero;
|
||||
PANEL_COL_VEC((*ans), 3, 0) = zero;
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(double, avx, , clear)
|
||||
{
|
||||
register __m256 zero = _mm256_setzero_ps();
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
PANEL_COL_VEC((*ans), i, 0) = zero;
|
||||
}
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(double, 512, , clear)
|
||||
{
|
||||
register __m512 zero = _mm512_setzero_ps();
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
PANEL_COL_VEC((*ans), i, 0) = zero;
|
||||
}
|
||||
}
|
||||
|
||||
// Matrix transpose implementations
|
||||
STD_MK_PROC_DECL(float, sse, , transpose)
|
||||
SN_MK_PROC_DECL_STD(float, sse, , transpose)
|
||||
{
|
||||
register __m128 col0 = right->f32_x[0];
|
||||
register __m128 col1 = right->f32_x[1];
|
||||
@@ -72,7 +25,7 @@ STD_MK_PROC_DECL(float, sse, , transpose)
|
||||
ans->f32_x[3] = _mm_movehl_ps(tmp3, tmp1);
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(float, avx, , transpose)
|
||||
SN_MK_PROC_DECL_STD(float, avx, , transpose)
|
||||
{
|
||||
register __m256 col_low = right->f32_y[0];
|
||||
register __m256 col_high = right->f32_y[1];
|
||||
@@ -87,7 +40,7 @@ STD_MK_PROC_DECL(float, avx, , transpose)
|
||||
ans->f32_y[1] = _mm256_shuffle_ps(col_high, col_low, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
}
|
||||
|
||||
STD_MK_PROC_DECL(float, 512, , transpose)
|
||||
SN_MK_PROC_DECL_STD(float, 512, , transpose)
|
||||
{
|
||||
register __m512 matrix = right->f32_z[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user