35 #ifndef _BLAZE_MATH_INTRINSICS_INTRINSICTRAIT_H_
36 #define _BLAZE_MATH_INTRINSICS_INTRINSICTRAIT_H_
68 struct IntrinsicTraitHelper;
80 struct IntrinsicTraitHelper<1UL>
82 typedef sse_int8_t Type;
92 struct IntrinsicTraitHelper<1UL>
94 typedef sse_int8_t Type;
114 struct IntrinsicTraitHelper<2UL>
116 typedef sse_int16_t Type;
126 struct IntrinsicTraitHelper<2UL>
128 typedef sse_int16_t Type;
148 struct IntrinsicTraitHelper<4UL>
150 typedef sse_int32_t Type;
158 #elif BLAZE_AVX2_MODE
160 struct IntrinsicTraitHelper<4UL>
162 typedef sse_int32_t Type;
172 struct IntrinsicTraitHelper<4UL>
174 typedef sse_int32_t Type;
194 struct IntrinsicTraitHelper<8UL>
196 typedef sse_int64_t Type;
204 #elif BLAZE_AVX2_MODE
206 struct IntrinsicTraitHelper<8UL>
208 typedef sse_int64_t Type;
218 struct IntrinsicTraitHelper<8UL>
220 typedef sse_int64_t Type;
246 template<
typename T >
247 struct IntrinsicTraitBase
251 alignment = AlignmentTrait<T>::value,
268 struct IntrinsicTraitBase<short>
271 typedef IntrinsicTraitHelper<sizeof(short)> Helper;
274 typedef Helper::Type Type;
275 enum { size = Helper::size,
276 alignment = AlignmentTrait<short>::value,
277 addition = Helper::addition,
278 subtraction = Helper::subtraction,
279 multiplication = Helper::multiplication,
280 division = Helper::division,
281 absoluteValue = Helper::absoluteValue };
293 struct IntrinsicTraitBase<unsigned short>
296 typedef IntrinsicTraitHelper<sizeof(unsigned short)> Helper;
299 typedef Helper::Type Type;
300 enum { size = Helper::size,
301 alignment = AlignmentTrait<unsigned short>::value,
302 addition = Helper::addition,
303 subtraction = Helper::subtraction,
304 multiplication = Helper::multiplication,
305 division = Helper::division,
306 absoluteValue = Helper::absoluteValue };
318 struct IntrinsicTraitBase<int>
321 typedef IntrinsicTraitHelper<sizeof(int)> Helper;
324 typedef Helper::Type Type;
325 enum { size = Helper::size,
326 alignment = AlignmentTrait<int>::value,
327 addition = Helper::addition,
328 subtraction = Helper::subtraction,
329 multiplication = Helper::multiplication,
330 division = Helper::division,
331 absoluteValue = Helper::absoluteValue };
343 struct IntrinsicTraitBase<unsigned int>
346 typedef IntrinsicTraitHelper<sizeof(unsigned int)> Helper;
349 typedef Helper::Type Type;
350 enum { size = Helper::size,
351 alignment = AlignmentTrait<unsigned int>::value,
352 addition = Helper::addition,
353 subtraction = Helper::subtraction,
354 multiplication = Helper::multiplication,
355 division = Helper::division,
356 absoluteValue = Helper::absoluteValue };
368 struct IntrinsicTraitBase<long>
371 typedef IntrinsicTraitHelper<sizeof(long)> Helper;
374 typedef Helper::Type Type;
375 enum { size = Helper::size,
376 alignment = AlignmentTrait<long>::value,
377 addition = Helper::addition,
378 subtraction = Helper::subtraction,
379 multiplication = Helper::multiplication,
380 division = Helper::division,
381 absoluteValue = Helper::absoluteValue };
393 struct IntrinsicTraitBase<unsigned long>
396 typedef IntrinsicTraitHelper<sizeof(unsigned long)> Helper;
399 typedef Helper::Type Type;
400 enum { size = Helper::size,
401 alignment = AlignmentTrait<unsigned long>::value,
402 addition = Helper::addition,
403 subtraction = Helper::subtraction,
404 multiplication = Helper::multiplication,
405 division = Helper::division,
406 absoluteValue = Helper::absoluteValue };
418 struct IntrinsicTraitBase<float>
420 typedef sse_float_t Type;
421 enum { size = ( 64UL /
sizeof(float) ),
422 alignment = AlignmentTrait<float>::value,
431 struct IntrinsicTraitBase<float>
433 typedef sse_float_t Type;
434 enum { size = ( 32UL /
sizeof(float) ),
435 alignment = AlignmentTrait<float>::value,
444 struct IntrinsicTraitBase<float>
446 typedef sse_float_t Type;
448 alignment = AlignmentTrait<float>::value,
467 struct IntrinsicTraitBase<double>
469 typedef sse_double_t Type;
470 enum { size = ( 64UL /
sizeof(double) ),
471 alignment = AlignmentTrait<double>::value,
480 struct IntrinsicTraitBase<double>
482 typedef sse_double_t Type;
483 enum { size = ( 32UL /
sizeof(double) ),
484 alignment = AlignmentTrait<double>::value,
493 struct IntrinsicTraitBase<double>
495 typedef sse_double_t Type;
497 alignment = AlignmentTrait<double>::value,
516 struct IntrinsicTraitBase< complex<float> >
518 typedef sse_cfloat_t Type;
519 enum { size = ( 64UL /
sizeof(complex<float>) ),
520 alignment = AlignmentTrait< complex<float> >::value,
531 struct IntrinsicTraitBase< complex<float> >
533 typedef sse_cfloat_t Type;
534 enum { size = ( 32UL /
sizeof(complex<float>) ),
535 alignment = AlignmentTrait< complex<float> >::value,
546 struct IntrinsicTraitBase< complex<float> >
548 typedef sse_cfloat_t Type;
549 enum { size = (
BLAZE_SSE_MODE )?( 16UL /
sizeof(complex<float>) ):( 1 ),
550 alignment = AlignmentTrait< complex<float> >::value,
571 struct IntrinsicTraitBase< complex<double> >
573 typedef sse_cdouble_t Type;
574 enum { size = ( 64UL /
sizeof(complex<double>) ),
575 alignment = AlignmentTrait< complex<double> >::value,
586 struct IntrinsicTraitBase< complex<double> >
588 typedef sse_cdouble_t Type;
589 enum { size = ( 32UL /
sizeof(complex<double>) ),
590 alignment = AlignmentTrait< complex<double> >::value,
601 struct IntrinsicTraitBase< complex<double> >
603 typedef sse_cdouble_t Type;
604 enum { size = (
BLAZE_SSE_MODE )?( 16UL /
sizeof(complex<double>) ):( 1 ),
605 alignment = AlignmentTrait< complex<double> >::value,
647 template<
typename T >
#define BLAZE_SSE3_MODE
Compilation switch for the SSE3 mode.This compilation switch enables/disables the SSE3 mode...
Definition: Vectorization.h:100
#define BLAZE_SSSE3_MODE
Compilation switch for the SSSE3 mode.This compilation switch enables/disables the SSSE3 mode...
Definition: Vectorization.h:117
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.This compilation switch enables/disables the SSE mode...
Definition: Vectorization.h:66
Header file for the basic intrinsic types.
Header file for all type traits.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
#define BLAZE_SSE4_MODE
Compilation switch for the SSE4 mode.This compilation switch enables/disables the SSE4 mode...
Definition: Vectorization.h:134
Header file for the alignment trait.
System settings for the SSE mode.
Header file for the complex data type.
#define BLAZE_SSE2_MODE
Compilation switch for the SSE2 mode.This compilation switch enables/disables the SSE2 mode...
Definition: Vectorization.h:83
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143