AVX_Implementation_KEM/SABER_indcpa.c
void load_values(){

	int64_t i;

	int64_t inv3=43691;
	int64_t inv9=36409;
	int64_t inv15=61167;

	int64_t int45=45;
	int64_t int30=30;
	int64_t int0=0;


	int16_t inv3_avx_load[16],inv9_avx_load[16],inv15_avx_load[16],int45_avx_load[16],int30_avx_load[16],int0_avx_load[16];

	for(i=0;i<16;i++){
		inv3_avx_load[i]=inv3;
		inv9_avx_load[i]=inv9;
		inv15_avx_load[i]=inv15;
		int45_avx_load[i]=int45;
		int30_avx_load[i]=int30;
		int0_avx_load[i]=int0;
	}

	inv3_avx = _mm256_loadu_si256 ((__m256i const *) (&inv3_avx_load));
	inv9_avx = _mm256_loadu_si256 ((__m256i const *) (&inv9_avx_load));
	inv15_avx = _mm256_loadu_si256 ((__m256i const *) (&inv15_avx_load));
	int45_avx = _mm256_loadu_si256 ((__m256i const *) (&int45_avx_load));
	int30_avx = _mm256_loadu_si256 ((__m256i const *) (&int30_avx_load));
	int0_avx = _mm256_loadu_si256 ((__m256i const *) (&int0_avx_load));
	mask = _mm256_loadu_si256 ((__m256i const *)mask_ar);	
}
/*--------------------------------------------------------------------------------------
	This routine loads the constant values for Toom-Cook multiplication 
----------------------------------------------------------------------------------------*/
This routine loads the constant values for Toom-Cook multiplication
This routine loads the constant values for Toom - Cook multiplication
void load_values(){
	int64_t i;
	int64_t inv3=43691;
	int64_t inv9=36409;
	int64_t inv15=61167;
	int64_t int45=45;
	int64_t int30=30;
	int64_t int0=0;
	int16_t inv3_avx_load[16],inv9_avx_load[16],inv15_avx_load[16],int45_avx_load[16],int30_avx_load[16],int0_avx_load[16];
	for(i=0;i<16;i++){
		inv3_avx_load[i]=inv3;
		inv9_avx_load[i]=inv9;
		inv15_avx_load[i]=inv15;
		int45_avx_load[i]=int45;
		int30_avx_load[i]=int30;
		int0_avx_load[i]=int0;
	}
	inv3_avx = _mm256_loadu_si256 ((__m256i const *) (&inv3_avx_load));
	inv9_avx = _mm256_loadu_si256 ((__m256i const *) (&inv9_avx_load));
	inv15_avx = _mm256_loadu_si256 ((__m256i const *) (&inv15_avx_load));
	int45_avx = _mm256_loadu_si256 ((__m256i const *) (&int45_avx_load));
	int30_avx = _mm256_loadu_si256 ((__m256i const *) (&int30_avx_load));
	int0_avx = _mm256_loadu_si256 ((__m256i const *) (&int0_avx_load));
	mask = _mm256_loadu_si256 ((__m256i const *)mask_ar);	
}
void load_values ( ) { int64_t i ; int64_t inv3 = 43691 ; int64_t inv9 = 36409 ; int64_t inv15 = 61167 ; int64_t int45 = 45 ; int64_t int30 = 30 ; int64_t int0 = 0 ; int16_t inv3_avx_load [ 16 ] , inv9_avx_load [ 16 ] , inv15_avx_load [ 16 ] , int45_avx_load [ 16 ] , int30_avx_load [ 16 ] , int0_avx_load [ 16 ] ; for ( i = 0 ; i < 16 ; i ++ ) { inv3_avx_load [ i ] = inv3 ; inv9_avx_load [ i ] = inv9 ; inv15_avx_load [ i ] = inv15 ; int45_avx_load [ i ] = int45 ; int30_avx_load [ i ] = int30 ; int0_avx_load [ i ] = int0 ; } inv3_avx = _mm256_loadu_si256 ( ( __m256i const * ) ( & inv3_avx_load ) ) ; inv9_avx = _mm256_loadu_si256 ( ( __m256i const * ) ( & inv9_avx_load ) ) ; inv15_avx = _mm256_loadu_si256 ( ( __m256i const * ) ( & inv15_avx_load ) ) ; int45_avx = _mm256_loadu_si256 ( ( __m256i const * ) ( & int45_avx_load ) ) ; int30_avx = _mm256_loadu_si256 ( ( __m256i const * ) ( & int30_avx_load ) ) ; int0_avx = _mm256_loadu_si256 ( ( __m256i const * ) ( & int0_avx_load ) ) ; mask = _mm256_loadu_si256 ( ( __m256i const * ) mask_ar ) ; }
This routine loads the constant values for Toom-Cook multiplication
This routine loads the constant values for Toom - Cook multiplication