37 static const int BLOCK_SIZE = 4;
50 : v0(_mm_set_epi32(a3,a2,a1,a0)){}
53 : v0(_mm_set_epi32(base[idx[3]],base[idx[2]],base[idx[1]],base[idx[0]])) {}
56 : v0(_mm_load_si128((
const __m128i*)base)){}
58 Int32 operator[](Integer i)
const {
return ((
const Int32*)&v0)[i]; }
59 Int32& operator[](Integer i) {
return ((Int32*)&v0)[i]; }
61 void set(ARCANE_RESTRICT Int32* base,
const ARCANE_RESTRICT Int32* idx)
const
63 const Int32* x = (
const Int32*)(
this);
70 void set(ARCANE_RESTRICT Int32* base)
const
73 _mm_store_si128((__m128i*)base,v0);
76 static SSESimdX4Int32 fromScalar(Int32 a0,Int32 a1,Int32 a2,Int32 a3)
82 void operator=(Int32 _v);
97 static const int BLOCK_SIZE = 2;
109 : v0(_mm_set1_pd(r)){}
112 : v0(_mm_set_pd(a1,a0)){}
115 : v0(_mm_set_pd(base[idx[1]],base[idx[0]])) { }
118 const Int32* idx = (
const Int32*)simd_idx;
119 v0 = _mm_set_pd(base[idx[1]],base[idx[0]]);
123 const Int32* idx = (
const Int32*)&simd_idx;
124 v0 = _mm_set_pd(base[idx[1]],base[idx[0]]);
128 v0 = _mm_load_pd(base);
131 Real operator[](Integer i)
const {
return ((
const Real*)&v0)[i]; }
132 Real& operator[](Integer i) {
return ((Real*)&v0)[i]; }
134 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT Int32* idx)
const
136 const Real* x = (
const Real*)(
this);
141 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT
Int32IndexType& simd_idx)
const
143 this->set(base,&simd_idx);
146 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT
Int32IndexType* simd_idx)
const
148 const Int32* idx = (
const ARCANE_RESTRICT Int32*)simd_idx;
149 const Real* x = (
const Real*)(
this);
154 void set(ARCANE_RESTRICT Real* base)
const
156 _mm_store_pd(base,v0);
171 void operator=(Real _v);
186 static const int BLOCK_SIZE = 4;
201 : v0(_v0), v1(_v1) {}
203 : v0(_mm_set1_pd(r)), v1(_mm_set1_pd(r)){}
206 : v0(_mm_set_pd(a1,a0)), v1(_mm_set_pd(a3,a2)){}
209 : v0(_mm_set_pd(base[idx[1]],base[idx[0]]))
210 , v1(_mm_set_pd(base[idx[3]],base[idx[2]])){}
219 : v0(_mm_load_pd(base)), v1(_mm_load_pd(base+2)) {}
221 Real operator[](Integer i)
const {
return ((
const Real*)&v0)[i]; }
222 Real& operator[](Integer i) {
return ((Real*)&v0)[i]; }
224 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT Int32* idx)
const
226 const Real* x = (
const Real*)(
this);
233 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT
Int32IndexType& simd_idx)
const
235 this->set(base,(
const Int32*)&simd_idx);
238 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT
Int32IndexType* simd_idx)
const
240 this->set(base,(
const Int32*)simd_idx);
243 void set(ARCANE_RESTRICT Real* base)
const
245 _mm_store_pd(base,v0);
246 _mm_store_pd(base+2,v1);
249 static SSESimdX4Real fromScalar(Real a0,Real a1,Real a2,Real a3)
258 _mm_sub_pd(_mm_setzero_pd(),v1));
261 void operator=(Real _v);
273 static const int BLOCK_SIZE = 8;
284 SSESimdX8Real(__m128d _v0,__m128d _v1,__m128d _v2,__m128d _v3)
285 : v0(_v0), v1(_v1), v2(_v2), v3(_v3) {}
287 : v0(_mm_set1_pd(r)), v1(_mm_set1_pd(r)), v2(_mm_set1_pd(r)), v3(_mm_set1_pd(r)){}
289 SSESimdX8Real(Real a7,Real a6,Real a5,Real a4,Real a3,Real a2,Real a1,Real a0)
290 : v0(_mm_set_pd(a1,a0)), v1(_mm_set_pd(a3,a2)),
291 v2(_mm_set_pd(a5,a4)), v3(_mm_set_pd(a7,a6)){}
295 v0 = _mm_set_pd(base[idx[1]],base[idx[0]]);
296 v1 = _mm_set_pd(base[idx[3]],base[idx[2]]);
297 v2 = _mm_set_pd(base[idx[5]],base[idx[4]]);
298 v3 = _mm_set_pd(base[idx[7]],base[idx[6]]);
301 Real operator[](Integer i)
const {
return ((
const Real*)&v0)[i]; }
302 Real& operator[](Integer i) {
return ((Real*)&v0)[i]; }
304 void set(ARCANE_RESTRICT Real* base,
const ARCANE_RESTRICT Int32* idx)
const
306 const Real* x = (
const Real*)(
this);
317 static SSESimdX8Real fromScalar(Real a0,Real a1,Real a2,Real a3,Real a4,Real a5,Real a6,Real a7)
326 _mm_sub_pd(_mm_setzero_pd(),v1),
327 _mm_sub_pd(_mm_setzero_pd(),v2),
328 _mm_sub_pd(_mm_setzero_pd(),v3));
331 void operator=(Real _v);