35 #ifndef _BLAZE_MATH_INTRINSICS_INTRINSICTRAIT_H_
36 #define _BLAZE_MATH_INTRINSICS_INTRINSICTRAIT_H_
69 struct IntrinsicTraitHelper;
81 struct IntrinsicTraitHelper<1UL>
83 typedef sse_int8_t Type;
93 struct IntrinsicTraitHelper<1UL>
95 typedef sse_int8_t Type;
115 struct IntrinsicTraitHelper<2UL>
117 typedef sse_int16_t Type;
127 struct IntrinsicTraitHelper<2UL>
129 typedef sse_int16_t Type;
149 struct IntrinsicTraitHelper<4UL>
151 typedef sse_int32_t Type;
159 #elif BLAZE_AVX2_MODE
161 struct IntrinsicTraitHelper<4UL>
163 typedef sse_int32_t Type;
173 struct IntrinsicTraitHelper<4UL>
175 typedef sse_int32_t Type;
195 struct IntrinsicTraitHelper<8UL>
197 typedef sse_int64_t Type;
205 #elif BLAZE_AVX2_MODE
207 struct IntrinsicTraitHelper<8UL>
209 typedef sse_int64_t Type;
219 struct IntrinsicTraitHelper<8UL>
221 typedef sse_int64_t Type;
247 template<
typename T >
248 struct IntrinsicTraitBase
252 alignment = AlignmentOf<T>::value,
269 struct IntrinsicTraitBase<char>
272 typedef IntrinsicTraitHelper<sizeof(char)> Helper;
275 typedef Helper::Type Type;
277 alignment = AlignmentOf<char>::value,
278 addition = Helper::addition,
279 subtraction = Helper::subtraction,
280 multiplication = Helper::multiplication,
281 division = Helper::division,
282 absoluteValue = Helper::absoluteValue };
294 struct IntrinsicTraitBase<signed char>
297 typedef IntrinsicTraitHelper<sizeof(signed char)> Helper;
300 typedef Helper::Type Type;
302 alignment = AlignmentOf<signed char>::value,
303 addition = Helper::addition,
304 subtraction = Helper::subtraction,
305 multiplication = Helper::multiplication,
306 division = Helper::division,
307 absoluteValue = Helper::absoluteValue };
319 struct IntrinsicTraitBase<unsigned char>
322 typedef IntrinsicTraitHelper<sizeof(unsigned char)> Helper;
325 typedef Helper::Type Type;
327 alignment = AlignmentOf<unsigned char>::value,
328 addition = Helper::addition,
329 subtraction = Helper::subtraction,
330 multiplication = Helper::multiplication,
331 division = Helper::division,
332 absoluteValue = Helper::absoluteValue };
344 struct IntrinsicTraitBase<wchar_t>
347 typedef IntrinsicTraitHelper<sizeof(wchar_t)> Helper;
350 typedef Helper::Type Type;
352 alignment = AlignmentOf<wchar_t>::value,
353 addition = Helper::addition,
354 subtraction = Helper::subtraction,
355 multiplication = Helper::multiplication,
356 division = Helper::division,
357 absoluteValue = Helper::absoluteValue };
369 struct IntrinsicTraitBase<short>
372 typedef IntrinsicTraitHelper<sizeof(short)> Helper;
375 typedef Helper::Type Type;
377 alignment = AlignmentOf<short>::value,
378 addition = Helper::addition,
379 subtraction = Helper::subtraction,
380 multiplication = Helper::multiplication,
381 division = Helper::division,
382 absoluteValue = Helper::absoluteValue };
394 struct IntrinsicTraitBase<unsigned short>
397 typedef IntrinsicTraitHelper<sizeof(unsigned short)> Helper;
400 typedef Helper::Type Type;
402 alignment = AlignmentOf<unsigned short>::value,
403 addition = Helper::addition,
404 subtraction = Helper::subtraction,
405 multiplication = Helper::multiplication,
406 division = Helper::division,
407 absoluteValue = Helper::absoluteValue };
419 struct IntrinsicTraitBase<int>
422 typedef IntrinsicTraitHelper<sizeof(int)> Helper;
425 typedef Helper::Type Type;
427 alignment = AlignmentOf<int>::value,
428 addition = Helper::addition,
429 subtraction = Helper::subtraction,
430 multiplication = Helper::multiplication,
431 division = Helper::division,
432 absoluteValue = Helper::absoluteValue };
444 struct IntrinsicTraitBase<unsigned int>
447 typedef IntrinsicTraitHelper<sizeof(unsigned int)> Helper;
450 typedef Helper::Type Type;
452 alignment = AlignmentOf<unsigned int>::value,
453 addition = Helper::addition,
454 subtraction = Helper::subtraction,
455 multiplication = Helper::multiplication,
456 division = Helper::division,
457 absoluteValue = Helper::absoluteValue };
469 struct IntrinsicTraitBase<long>
472 typedef IntrinsicTraitHelper<sizeof(long)> Helper;
475 typedef Helper::Type Type;
477 alignment = AlignmentOf<long>::value,
478 addition = Helper::addition,
479 subtraction = Helper::subtraction,
480 multiplication = Helper::multiplication,
481 division = Helper::division,
482 absoluteValue = Helper::absoluteValue };
494 struct IntrinsicTraitBase<unsigned long>
497 typedef IntrinsicTraitHelper<sizeof(unsigned long)> Helper;
500 typedef Helper::Type Type;
502 alignment = AlignmentOf<unsigned long>::value,
503 addition = Helper::addition,
504 subtraction = Helper::subtraction,
505 multiplication = Helper::multiplication,
506 division = Helper::division,
507 absoluteValue = Helper::absoluteValue };
519 struct IntrinsicTraitBase<float>
521 typedef sse_float_t Type;
522 enum {
size = ( 64UL /
sizeof(float) ),
523 alignment = AlignmentOf<float>::value,
532 struct IntrinsicTraitBase<float>
534 typedef sse_float_t Type;
535 enum {
size = ( 32UL /
sizeof(float) ),
536 alignment = AlignmentOf<float>::value,
545 struct IntrinsicTraitBase<float>
547 typedef sse_float_t Type;
549 alignment = AlignmentOf<float>::value,
568 struct IntrinsicTraitBase<double>
570 typedef sse_double_t Type;
571 enum {
size = ( 64UL /
sizeof(double) ),
572 alignment = AlignmentOf<double>::value,
581 struct IntrinsicTraitBase<double>
583 typedef sse_double_t Type;
584 enum {
size = ( 32UL /
sizeof(double) ),
585 alignment = AlignmentOf<double>::value,
594 struct IntrinsicTraitBase<double>
596 typedef sse_double_t Type;
598 alignment = AlignmentOf<double>::value,
617 struct IntrinsicTraitBase< complex<float> >
619 typedef sse_cfloat_t Type;
620 enum {
size = ( 64UL /
sizeof(complex<float>) ),
621 alignment = AlignmentOf< complex<float> >::value,
632 struct IntrinsicTraitBase< complex<float> >
634 typedef sse_cfloat_t Type;
635 enum {
size = ( 32UL /
sizeof(complex<float>) ),
636 alignment = AlignmentOf< complex<float> >::value,
647 struct IntrinsicTraitBase< complex<float> >
649 typedef sse_cfloat_t Type;
651 alignment = AlignmentOf< complex<float> >::value,
672 struct IntrinsicTraitBase< complex<double> >
674 typedef sse_cdouble_t Type;
675 enum {
size = ( 64UL /
sizeof(complex<double>) ),
676 alignment = AlignmentOf< complex<double> >::value,
687 struct IntrinsicTraitBase< complex<double> >
689 typedef sse_cdouble_t Type;
690 enum {
size = ( 32UL /
sizeof(complex<double>) ),
691 alignment = AlignmentOf< complex<double> >::value,
702 struct IntrinsicTraitBase< complex<double> >
704 typedef sse_cdouble_t Type;
706 alignment = AlignmentOf< complex<double> >::value,
748 template<
typename T >
Header file for the AlignmentOf type trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:258
Header file for the RemoveCV type trait.
#define BLAZE_SSE3_MODE
Compilation switch for the SSE3 mode.This compilation switch enables/disables the SSE3 mode...
Definition: Vectorization.h:101
#define BLAZE_SSSE3_MODE
Compilation switch for the SSSE3 mode.This compilation switch enables/disables the SSSE3 mode...
Definition: Vectorization.h:118
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.This compilation switch enables/disables the SSE mode...
Definition: Vectorization.h:67
Header file for the basic intrinsic types.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
#define BLAZE_SSE4_MODE
Compilation switch for the SSE4 mode.This compilation switch enables/disables the SSE4 mode...
Definition: Vectorization.h:135
Header file for basic type definitions.
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:84
#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