avx512/src/f11_260.c
// Reduce to 10 limbs. Useful for debugging.
Reduce to 10 limbs. Useful for debugging.
Reduce to 10 limbs . Useful for debugging .
void narrow_reduce(
  residue_narrow_reduced_t *result, const residue_narrow_t * __restrict w) {
  residue_narrow_t temp;
  __m128i x = _mm_load_si128((__m128i *) (&w->limbs[0 * VECTWIDTH]));
  __m128i x10 = _mm_broadcastd_epi32(x);
  x = _mm_sub_epi32(x, x10);
  _mm_store_si128((__m128i *) &temp.limbs[0 * VECTWIDTH], x);
  x = _mm_load_si128((__m128i *) (&w->limbs[1 * VECTWIDTH]));
  x = _mm_sub_epi32(x, x10);
  _mm_store_si128((__m128i *) &temp.limbs[1 * VECTWIDTH], x);
  x = _mm_load_si128((__m128i *) (&w->limbs[2 * VECTWIDTH]));
  x = _mm_sub_epi32(x, x10);
  _mm_store_si128((__m128i *) &temp.limbs[2 * VECTWIDTH], x);
  reduce_step_narrow(&temp, &temp);
  #pragma clang loop unroll(full)
  for (int i = 0; i < NLIMBS_REDUCED; ++i) {
    result->limbs[i] = temp.limbs[i] - temp.limbs[10];
  }
}
void narrow_reduce ( residue_narrow_reduced_t * result , const residue_narrow_t * __restrict w ) { residue_narrow_t temp ; __m128i x = _mm_load_si128 ( ( __m128i * ) ( & w -> limbs [ 0 * VECTWIDTH ] ) ) ; __m128i x10 = _mm_broadcastd_epi32 ( x ) ; x = _mm_sub_epi32 ( x , x10 ) ; _mm_store_si128 ( ( __m128i * ) & temp . limbs [ 0 * VECTWIDTH ] , x ) ; x = _mm_load_si128 ( ( __m128i * ) ( & w -> limbs [ 1 * VECTWIDTH ] ) ) ; x = _mm_sub_epi32 ( x , x10 ) ; _mm_store_si128 ( ( __m128i * ) & temp . limbs [ 1 * VECTWIDTH ] , x ) ; x = _mm_load_si128 ( ( __m128i * ) ( & w -> limbs [ 2 * VECTWIDTH ] ) ) ; x = _mm_sub_epi32 ( x , x10 ) ; _mm_store_si128 ( ( __m128i * ) & temp . limbs [ 2 * VECTWIDTH ] , x ) ; reduce_step_narrow ( & temp , & temp ) ; #pragma  clang loop unroll(full) for ( int i = 0 ; i < NLIMBS_REDUCED ; ++ i ) { result -> limbs [ i ] = temp . limbs [ i ] - temp . limbs [ 10 ] ; } }
Reduce to 10 limbs.
Reduce to 10 limbs .
// May want to use vpalignr here.