42 static const int BLOCK_SIZE = 8;
53 : v0(_mm512_set1_pd(r)){}
55 AVX512SimdReal(Real a7,Real a6,Real a5,Real a4,Real a3,Real a2,Real a1,Real a0)
56 : v0(_mm512_set_pd(a7,a6,a5,a4,a3,a2,a1,a0)){}
60#ifdef ARCANE_USE_AVX512_SCATTERGATHER
61 __m256i idx2 = _mm256_loadu_si256((__m256i*)idx);
62 v0 = _mm512_i32gather_pd(idx2,(Real*)base, 8);
64 v0 = _mm512_set_pd(base[idx[7]],base[idx[6]],base[idx[5]],base[idx[4]],
65 base[idx[3]],base[idx[2]],base[idx[1]],base[idx[0]]);
72#ifdef ARCANE_USE_AVX512_SCATTERGATHER
73 : v0(_mm512_i32gather_pd(simd_idx.v0,base,8))
82 : v0(_mm512_load_pd(base)) { }
84 Real operator[](Integer i)
const {
return ((
const Real*)&v0)[i]; }
85 Real& operator[](Integer i) {
return ((Real*)&v0)[i]; }
88 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT Int32* idx)
const
90#ifdef ARCANE_USE_AVX512_SCATTERGATHER
91 __m256i idx2 = _mm256_loadu_si256((__m256i*)idx);
92 _mm512_i32scatter_pd(base,idx2,v0, 8);
106 void set(ARCANE_RESTRICT Real* base,
const Int32IndexType* simd_idx)
const
108 this->set(base,(
const Int32*)simd_idx);
111 void set(ARCANE_RESTRICT Real* base,
const Int32IndexType& simd_idx)
const
113#ifdef ARCANE_USE_AVX512_SCATTERGATHER
114 _mm512_i32scatter_pd(base,simd_idx.v0,v0, 8);
116 this->set(base,&simd_idx);
121 void set(ARCANE_RESTRICT Real* base)
const
123 _mm512_store_pd(base,v0);
126 static AVX512SimdReal fromScalar(Real a0,Real a1,Real a2,Real a3,Real a4,Real a5,Real a6,Real a7)
132 inline AVX512SimdReal operator- ()
const
134 return AVX512SimdReal(_mm512_sub_pd(_mm512_setzero_pd(),v0));
138 void operator=(Real _v);