Skip to content

Commit

Permalink
apply code-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored and github-actions[bot] committed Dec 9, 2024
1 parent 2756894 commit 0313c56
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/layer/x86/gemm_int8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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__
Expand Down Expand Up @@ -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__
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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]);
Expand Down Expand Up @@ -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]);

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 0313c56

Please sign in to comment.