From 0313c56c778ad4b5777584128fbda697c89ca0ec Mon Sep 17 00:00:00 2001 From: nihui Date: Mon, 9 Dec 2024 08:06:42 +0000 Subject: [PATCH] apply code-format changes --- src/layer/x86/gemm_int8.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/layer/x86/gemm_int8.h b/src/layer/x86/gemm_int8.h index f0ffe3443a8b..3d9ef1022d42 100644 --- a/src/layer/x86/gemm_int8.h +++ b/src/layer/x86/gemm_int8.h @@ -2797,7 +2797,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i __m128i _pp = float2int8_avx(_p0, _p1); - __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7 ,15); + __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15); _pp = _mm_shuffle_epi8(_pp, _si); #if __AVX2__ @@ -2889,7 +2889,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i __m128i _pp = float2int8_avx(_t0, _t1); - __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7 ,15); + __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15); _pp = _mm_shuffle_epi8(_pp, _si); #if __AVX2__ @@ -3002,7 +3002,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i __m128i _pp = float2int8_avx(_p0, _p1); - __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7 ,15); + __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15); _pp = _mm_shuffle_epi8(_pp, _si); #if __AVX2__ @@ -7147,7 +7147,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i __m128i _pp = float2int8_avx(_p0, _p1); - __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7 ,15); + __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15); _pp = _mm_shuffle_epi8(_pp, _si); _mm_storeu_si128((__m128i*)pp, _pp); @@ -7213,7 +7213,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i __m128i _si = _mm_setr_epi8(0, 4, 1, 5, 2, 6, 3, 7, 8, 12, 9, 13, 10, 14, 11, 15); _pp = _mm_shuffle_epi8(_pp, _si); -#else // __AVX__ +#else // __AVX__ __m128 _p0 = _mm_loadu_ps(p0); __m128 _p1 = _mm_loadu_ps(p0 + 4); __m128 _p2 = _mm_loadu_ps(p0 + B_hstep * 4); @@ -7246,7 +7246,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i _p = _mm256_mul_ps(_p, _scale); int64_t v = float2int8_avx(_p); -#else // __AVX__ +#else // __AVX__ _p0 = _mm_mul_ps(_p0, _scale); _p1 = _mm_mul_ps(_p1, _scale); @@ -7316,10 +7316,10 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i __m128i _pp = float2int8_avx(_p0, _p1); #if __AVX2__ - __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7 ,15); + __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15); _pp = _mm_shuffle_epi8(_pp, _si); #endif -#else // __AVX__ +#else // __AVX__ __m128 _p0 = _mm_setr_ps(p0[0], p0[1], p0[B_hstep], p0[B_hstep + 1]); __m128 _p1 = _mm_setr_ps(p0[B_hstep * 2], p0[B_hstep * 2 + 1], p0[B_hstep * 3], p0[B_hstep * 3 + 1]); __m128 _p2 = _mm_setr_ps(p0[B_hstep * 4], p0[B_hstep * 4 + 1], p0[B_hstep * 5], p0[B_hstep * 5 + 1]); @@ -7352,7 +7352,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i _p = _mm256_mul_ps(_p, _scale); int64_t v = float2int8_avx(_p); -#else // __AVX__ +#else // __AVX__ __m128 _p0 = _mm_setr_ps(p0[0], p0[B_hstep], p0[B_hstep * 2], p0[B_hstep * 3]); __m128 _p1 = _mm_setr_ps(p0[B_hstep * 4], p0[B_hstep * 5], p0[B_hstep * 6], p0[B_hstep * 7]); @@ -7529,7 +7529,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i __m128i _pp = float2int8_avx(_p0, _p1); - __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7 ,15); + __m128i _si = _mm_setr_epi8(0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15); _pp = _mm_shuffle_epi8(_pp, _si); _mm_storel_pd((double*)pp, _mm_castsi128_pd(_pp));