46 static const int BLOCK_SIZE = 8;
63 base[idx[3]],base[idx[2]],base[idx[1]],base[idx[0]])) {}
67 Int32 operator[](Integer i)
const {
return ((
const Int32*)&v0)[i]; }
68 Int32& operator[](Integer i) {
return ((Int32*)&v0)[i]; }
70 void set(ARCANE_RESTRICT Int32* base,
const ARCANE_RESTRICT Int32* idx)
const
72 const Int32* x = (
const Int32*)(
this);
83 void set(ARCANE_RESTRICT Int32* base)
const
100 void operator=(Int32
_v);
113 static const int BLOCK_SIZE = 4;
131 : v0(
_mm256_set_pd(base[idx[3]],base[idx[2]],base[idx[1]],base[idx[0]])) {}
134#ifdef ARCANE_USE_AVX2_GATHER
141#ifdef ARCANE_USE_AVX2_GATHER
151 Real operator[](Integer i)
const {
return ((
const Real*)&v0)[i]; }
152 Real& operator[](Integer i) {
return ((
Real*)&v0)[i]; }
154 void set(ARCANE_RESTRICT
Real* base,
const Int32* idx)
const
157 const Real* x = (
const Real*)(
this);
165 __m128i idx0 = _mm_load_si128((__m128i*)idx);
166 _mm256_i32scatter_pd(base,idx0,v0, 8);
170 void set(ARCANE_RESTRICT
Real* base,
const Int32IndexType& simd_idx)
const
172 this->set(base,&simd_idx);
175 void set(ARCANE_RESTRICT
Real* base,
const Int32IndexType* simd_idx)
const
177 this->set(base,(
const Int32*)simd_idx);
180 void set(ARCANE_RESTRICT Real* base)
const
191 inline AVXSimdX4Real operator- ()
const
193 return AVXSimdX4Real(_mm256_sub_pd(_mm256_setzero_pd(),v0));
197 void operator=(
Real _v);
210 static const int BLOCK_SIZE = 8;
239 v0 =
_mm256_set_pd(base[idx[3]],base[idx[2]],base[idx[1]],base[idx[0]]);
240 v1 =
_mm256_set_pd(base[idx[7]],base[idx[6]],base[idx[5]],base[idx[4]]);
256 Real operator[](Integer i)
const {
return ((
const Real*)&v0)[i]; }
257 Real& operator[](Integer i) {
return ((
Real*)&v0)[i]; }
259 void set(ARCANE_RESTRICT
Real* base,
const ARCANE_RESTRICT
Int32* idx)
const
262 const Real* x = (
const Real*)(
this);
274 __m128i idx0 = _mm_loadu_si128((__m128i*)idx);
275 __m128i idx1 = _mm_loadu_si128((__m128i*)(idx+4));
276 _mm256_i32scatter_pd(base,idx0,v0, 8);
277 _mm256_i32scatter_pd(base,idx1,v1, 8);
282 void set(ARCANE_RESTRICT Real* base)
const
295 inline AVXSimdX8Real operator- ()
const
297 return AVXSimdX8Real(_mm256_sub_pd(_mm256_setzero_pd(),v0),
298 _mm256_sub_pd(_mm256_setzero_pd(),v1));
302 void operator=(
Real _v);