35 #ifndef _BLAZE_MATH_SIMD_BASICTYPES_H_ 36 #define _BLAZE_MATH_SIMD_BASICTYPES_H_ 64 template<
typename T >
66 :
public SIMDPack< T >
79 :
public SIMDi8< SIMDint8 >
81 using This = SIMDint8;
82 using BaseType = SIMDi8<This>;
83 using ValueType = int8_t;
85 #if BLAZE_AVX512BW_MODE 86 using IntrinsicType = __m512i;
88 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
89 static constexpr
size_t size = 64UL;
91 using IntrinsicType = ValueType;
94 static constexpr
size_t size = 1UL;
96 using IntrinsicType = __m256i;
98 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
99 static constexpr
size_t size = 32UL;
100 #elif BLAZE_SSE2_MODE 101 using IntrinsicType = __m128i;
103 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
104 static constexpr
size_t size = 16UL;
106 using IntrinsicType = ValueType;
109 static constexpr
size_t size = 1UL;
114 template<
typename T >
117 template<
typename T >
118 BLAZE_ALWAYS_INLINE SIMDint8& operator=(
const SIMDi8<T>& v ) noexcept { value = (~v).value;
return *
this; }
133 :
public SIMDi8< SIMDuint8 >
135 using This = SIMDuint8;
136 using BaseType = SIMDi8<This>;
137 using ValueType = uint8_t;
139 #if BLAZE_AVX512BW_MODE 140 using IntrinsicType = __m512i;
142 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
143 static constexpr
size_t size = 64UL;
145 using IntrinsicType = ValueType;
148 static constexpr
size_t size = 1UL;
149 #elif BLAZE_AVX2_MODE 150 using IntrinsicType = __m256i;
152 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
153 static constexpr
size_t size = 32UL;
154 #elif BLAZE_SSE2_MODE 155 using IntrinsicType = __m128i;
157 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
158 static constexpr
size_t size = 16UL;
160 using IntrinsicType = ValueType;
163 static constexpr
size_t size = 1UL;
168 template<
typename T >
171 template<
typename T >
172 BLAZE_ALWAYS_INLINE SIMDuint8& operator=(
const SIMDi8<T>& v ) noexcept { value = (~v).value;
return *
this; }
194 template<
typename T >
196 :
public SIMDPack< T >
209 :
public SIMDci8< SIMDcint8 >
211 using This = SIMDcint8;
212 using BaseType = SIMDci8<This>;
213 using ValueType = complex<int8_t>;
215 #if BLAZE_AVX512BW_MODE 216 using IntrinsicType = __m512i;
218 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
219 static constexpr
size_t size = 32UL;
221 using IntrinsicType = ValueType;
224 static constexpr
size_t size = 1UL;
225 #elif BLAZE_AVX2_MODE 226 using IntrinsicType = __m256i;
228 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
229 static constexpr
size_t size = 16UL;
230 #elif BLAZE_SSE2_MODE 231 using IntrinsicType = __m128i;
233 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
234 static constexpr
size_t size = 8UL;
236 using IntrinsicType = ValueType;
239 static constexpr
size_t size = 1UL;
244 template<
typename T >
247 template<
typename T >
248 BLAZE_ALWAYS_INLINE SIMDcint8& operator=(
const SIMDci8<T>& v ) noexcept { value = (~v).value;
return *
this; }
263 :
public SIMDci8< SIMDcuint8 >
265 using This = SIMDcuint8;
266 using BaseType = SIMDci8<This>;
267 using ValueType = complex<uint8_t>;
269 #if BLAZE_AVX512BW_MODE 270 using IntrinsicType = __m512i;
272 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
273 static constexpr
size_t size = 32UL;
275 using IntrinsicType = ValueType;
278 static constexpr
size_t size = 1UL;
279 #elif BLAZE_AVX2_MODE 280 using IntrinsicType = __m256i;
282 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
283 static constexpr
size_t size = 16UL;
284 #elif BLAZE_SSE2_MODE 285 using IntrinsicType = __m128i;
287 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
288 static constexpr
size_t size = 8UL;
290 using IntrinsicType = ValueType;
293 static constexpr
size_t size = 1UL;
298 template<
typename T >
301 template<
typename T >
302 BLAZE_ALWAYS_INLINE SIMDcuint8& operator=(
const SIMDci8<T>& v ) noexcept { value = (~v).value;
return *
this; }
324 template<
typename T >
326 :
public SIMDPack< T >
339 :
public SIMDi16< SIMDint16 >
341 using This = SIMDint16;
342 using BaseType = SIMDi16<This>;
343 using ValueType = int16_t;
345 #if BLAZE_AVX512BW_MODE 346 using IntrinsicType = __m512i;
348 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
349 static constexpr
size_t size = 32UL;
351 using IntrinsicType = ValueType;
354 static constexpr
size_t size = 1UL;
355 #elif BLAZE_AVX2_MODE 356 using IntrinsicType = __m256i;
358 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
359 static constexpr
size_t size = 16UL;
360 #elif BLAZE_SSE2_MODE 361 using IntrinsicType = __m128i;
363 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
364 static constexpr
size_t size = 8UL;
366 using IntrinsicType = ValueType;
369 static constexpr
size_t size = 1UL;
374 template<
typename T >
377 template<
typename T >
378 BLAZE_ALWAYS_INLINE SIMDint16& operator=(
const SIMDi16<T>& v ) noexcept { value = (~v).value;
return *
this; }
393 :
public SIMDi16< SIMDuint16 >
395 using This = SIMDuint16;
396 using BaseType = SIMDi16<This>;
397 using ValueType = uint16_t;
399 #if BLAZE_AVX512BW_MODE 400 using IntrinsicType = __m512i;
402 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
403 static constexpr
size_t size = 32UL;
405 using IntrinsicType = ValueType;
408 static constexpr
size_t size = 1UL;
409 #elif BLAZE_AVX2_MODE 410 using IntrinsicType = __m256i;
412 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
413 static constexpr
size_t size = 16UL;
414 #elif BLAZE_SSE2_MODE 415 using IntrinsicType = __m128i;
417 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
418 static constexpr
size_t size = 8UL;
420 using IntrinsicType = ValueType;
423 static constexpr
size_t size = 1UL;
428 template<
typename T >
431 template<
typename T >
432 BLAZE_ALWAYS_INLINE SIMDuint16& operator=(
const SIMDi16<T>& v ) noexcept { value = (~v).value;
return *
this; }
454 template<
typename T >
456 :
public SIMDPack< T >
469 :
public SIMDci16< SIMDcint16 >
471 using This = SIMDcint16;
472 using BaseType = SIMDci16<This>;
473 using ValueType = complex<int16_t>;
475 #if BLAZE_AVX512BW_MODE 476 using IntrinsicType = __m512i;
478 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
479 static constexpr
size_t size = 16UL;
481 using IntrinsicType = ValueType;
484 static constexpr
size_t size = 1UL;
485 #elif BLAZE_AVX2_MODE 486 using IntrinsicType = __m256i;
488 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
489 static constexpr
size_t size = 8UL;
490 #elif BLAZE_SSE2_MODE 491 using IntrinsicType = __m128i;
493 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
494 static constexpr
size_t size = 4UL;
496 using IntrinsicType = ValueType;
499 static constexpr
size_t size = 1UL;
504 template<
typename T >
507 template<
typename T >
508 BLAZE_ALWAYS_INLINE SIMDcint16& operator=(
const SIMDci16<T>& v ) noexcept { value = (~v).value;
return *
this; }
523 :
public SIMDci16< SIMDcuint16 >
525 using This = SIMDcuint16;
526 using BaseType = SIMDci16<This>;
527 using ValueType = complex<uint16_t>;
529 #if BLAZE_AVX512BW_MODE 530 using IntrinsicType = __m512i;
532 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
533 static constexpr
size_t size = 16UL;
535 using IntrinsicType = ValueType;
538 static constexpr
size_t size = 1UL;
539 #elif BLAZE_AVX2_MODE 540 using IntrinsicType = __m256i;
542 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
543 static constexpr
size_t size = 8UL;
544 #elif BLAZE_SSE2_MODE 545 using IntrinsicType = __m128i;
547 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
548 static constexpr
size_t size = 4UL;
550 using IntrinsicType = ValueType;
553 static constexpr
size_t size = 1UL;
558 template<
typename T >
561 template<
typename T >
562 BLAZE_ALWAYS_INLINE SIMDcuint16& operator=(
const SIMDci16<T>& v ) noexcept { value = (~v).value;
return *
this; }
584 template<
typename T >
586 :
public SIMDPack< T >
599 :
public SIMDi32< SIMDint32 >
601 using This = SIMDint32;
602 using BaseType = SIMDi32<This>;
603 using ValueType = int32_t;
605 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 606 using IntrinsicType = __m512i;
608 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
609 static constexpr
size_t size = 16UL;
610 #elif BLAZE_AVX2_MODE 611 using IntrinsicType = __m256i;
613 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
614 static constexpr
size_t size = 8UL;
615 #elif BLAZE_SSE2_MODE 616 using IntrinsicType = __m128i;
618 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
619 static constexpr
size_t size = 4UL;
621 using IntrinsicType = ValueType;
624 static constexpr
size_t size = 1UL;
629 template<
typename T >
632 template<
typename T >
633 BLAZE_ALWAYS_INLINE SIMDint32& operator=(
const SIMDi32<T>& v ) noexcept { value = (~v).value;
return *
this; }
648 :
public SIMDi32< SIMDuint32 >
650 using This = SIMDuint32;
651 using BaseType = SIMDi32<This>;
652 using ValueType = uint32_t;
654 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 655 using IntrinsicType = __m512i;
657 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
658 static constexpr
size_t size = 16UL;
659 #elif BLAZE_AVX2_MODE 660 using IntrinsicType = __m256i;
662 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
663 static constexpr
size_t size = 8UL;
664 #elif BLAZE_SSE2_MODE 665 using IntrinsicType = __m128i;
667 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
668 static constexpr
size_t size = 4UL;
670 using IntrinsicType = ValueType;
673 static constexpr
size_t size = 1UL;
678 template<
typename T >
681 template<
typename T >
682 BLAZE_ALWAYS_INLINE SIMDuint32& operator=(
const SIMDi32<T>& v ) noexcept { value = (~v).value;
return *
this; }
704 template<
typename T >
706 :
public SIMDPack< T >
719 :
public SIMDci32< SIMDcint32 >
721 using This = SIMDcint32;
722 using BaseType = SIMDci32<This>;
723 using ValueType = complex<int32_t>;
725 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 726 using IntrinsicType = __m512i;
728 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
729 static constexpr
size_t size = 8UL;
730 #elif BLAZE_AVX2_MODE 731 using IntrinsicType = __m256i;
733 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
734 static constexpr
size_t size = 4UL;
735 #elif BLAZE_SSE2_MODE 736 using IntrinsicType = __m128i;
738 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
739 static constexpr
size_t size = 2UL;
741 using IntrinsicType = ValueType;
744 static constexpr
size_t size = 1UL;
749 template<
typename T >
752 template<
typename T >
753 BLAZE_ALWAYS_INLINE SIMDcint32& operator=(
const SIMDci32<T>& v ) noexcept { value = (~v).value;
return *
this; }
768 :
public SIMDci32< SIMDcuint32 >
770 using This = SIMDcuint32;
771 using BaseType = SIMDci32<This>;
772 using ValueType = complex<uint32_t>;
774 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 775 using IntrinsicType = __m512i;
777 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
778 static constexpr
size_t size = 8UL;
779 #elif BLAZE_AVX2_MODE 780 using IntrinsicType = __m256i;
782 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
783 static constexpr
size_t size = 4UL;
784 #elif BLAZE_SSE2_MODE 785 using IntrinsicType = __m128i;
787 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
788 static constexpr
size_t size = 2UL;
790 using IntrinsicType = ValueType;
793 static constexpr
size_t size = 1UL;
798 template<
typename T >
801 template<
typename T >
802 BLAZE_ALWAYS_INLINE SIMDcuint32& operator=(
const SIMDci32<T>& v ) noexcept { value = (~v).value;
return *
this; }
824 template<
typename T >
826 :
public SIMDPack< T >
839 :
public SIMDi64< SIMDint64 >
841 using This = SIMDint64;
842 using BaseType = SIMDi64<This>;
843 using ValueType = int64_t;
845 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 846 using IntrinsicType = __m512i;
848 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
849 static constexpr
size_t size = 8UL;
850 #elif BLAZE_AVX2_MODE 851 using IntrinsicType = __m256i;
853 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
854 static constexpr
size_t size = 4UL;
855 #elif BLAZE_SSE2_MODE 856 using IntrinsicType = __m128i;
858 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
859 static constexpr
size_t size = 2UL;
861 using IntrinsicType = ValueType;
864 static constexpr
size_t size = 1UL;
869 template<
typename T >
872 template<
typename T >
873 BLAZE_ALWAYS_INLINE SIMDint64& operator=(
const SIMDi64<T>& v ) noexcept { value = (~v).value;
return *
this; }
888 :
public SIMDi64< SIMDuint64 >
890 using This = SIMDuint64;
891 using BaseType = SIMDi64<This>;
892 using ValueType = uint64_t;
894 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 895 using IntrinsicType = __m512i;
897 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
898 static constexpr
size_t size = 8UL;
899 #elif BLAZE_AVX2_MODE 900 using IntrinsicType = __m256i;
902 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
903 static constexpr
size_t size = 4UL;
904 #elif BLAZE_SSE2_MODE 905 using IntrinsicType = __m128i;
907 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
908 static constexpr
size_t size = 2UL;
910 using IntrinsicType = ValueType;
913 static constexpr
size_t size = 1UL;
918 template<
typename T >
921 template<
typename T >
922 BLAZE_ALWAYS_INLINE SIMDuint64& operator=(
const SIMDi64<T>& v ) noexcept { value = (~v).value;
return *
this; }
944 template<
typename T >
946 :
public SIMDPack< T >
959 :
public SIMDci64< SIMDcint64 >
961 using This = SIMDcint64;
962 using BaseType = SIMDci64<This>;
963 using ValueType = complex<int64_t>;
965 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 966 using IntrinsicType = __m512i;
968 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
969 static constexpr
size_t size = 4UL;
970 #elif BLAZE_AVX2_MODE 971 using IntrinsicType = __m256i;
973 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
974 static constexpr
size_t size = 2UL;
975 #elif BLAZE_SSE2_MODE 976 using IntrinsicType = __m128i;
978 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
979 static constexpr
size_t size = 1UL;
981 using IntrinsicType = ValueType;
984 static constexpr
size_t size = 1UL;
989 template<
typename T >
992 template<
typename T >
993 BLAZE_ALWAYS_INLINE SIMDcint64& operator=(
const SIMDci64<T>& v ) noexcept { value = (~v).value;
return *
this; }
1008 :
public SIMDci64< SIMDcuint64 >
1010 using This = SIMDcuint64;
1011 using BaseType = SIMDci64<This>;
1012 using ValueType = complex<uint64_t>;
1014 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 1015 using IntrinsicType = __m512i;
1017 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1018 static constexpr
size_t size = 4UL;
1019 #elif BLAZE_AVX2_MODE 1020 using IntrinsicType = __m256i;
1022 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1023 static constexpr
size_t size = 2UL;
1024 #elif BLAZE_SSE2_MODE 1025 using IntrinsicType = __m128i;
1027 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1028 static constexpr
size_t size = 1UL;
1030 using IntrinsicType = ValueType;
1033 static constexpr
size_t size = 1UL;
1038 template<
typename T >
1041 template<
typename T >
1042 BLAZE_ALWAYS_INLINE SIMDcuint64& operator=(
const SIMDci64<T>& v ) noexcept { value = (~v).value;
return *
this; }
1044 IntrinsicType value;
1064 template<
typename T >
1066 :
public SIMDPack< T >
1079 :
public SIMDf32< SIMDfloat >
1081 using This = SIMDfloat;
1082 using BaseType = SIMDf32<This>;
1083 using ValueType = float;
1085 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 1086 using IntrinsicType = __m512;
1088 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1089 static constexpr
size_t size = 16UL;
1090 #elif BLAZE_AVX_MODE 1091 using IntrinsicType = __m256;
1093 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1094 static constexpr
size_t size = 8UL;
1095 #elif BLAZE_SSE_MODE 1096 using IntrinsicType = __m128;
1098 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1099 static constexpr
size_t size = 4UL;
1101 using IntrinsicType = ValueType;
1104 static constexpr
size_t size = 1UL;
1109 template<
typename T >
1112 template<
typename T >
1113 BLAZE_ALWAYS_INLINE SIMDfloat& operator=(
const SIMDf32<T>& v ) noexcept { value = (~v).
eval().value;
return *
this; }
1117 IntrinsicType value;
1137 template<
typename T >
1139 :
public SIMDPack< T >
1152 :
public SIMDcf32< SIMDcfloat >
1154 using This = SIMDcfloat;
1155 using BaseType = SIMDcf32<This>;
1156 using ValueType = complex<float>;
1158 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 1159 using IntrinsicType = __m512;
1161 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1162 static constexpr
size_t size = 8UL;
1163 #elif BLAZE_AVX_MODE 1164 using IntrinsicType = __m256;
1166 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1167 static constexpr
size_t size = 4UL;
1168 #elif BLAZE_SSE_MODE 1169 using IntrinsicType = __m128;
1171 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1172 static constexpr
size_t size = 2UL;
1174 using IntrinsicType = ValueType;
1177 static constexpr
size_t size = 1UL;
1182 template<
typename T >
1185 template<
typename T >
1186 BLAZE_ALWAYS_INLINE SIMDcfloat& operator=(
const SIMDcf32<T>& v ) noexcept { value = (~v).value;
return *
this; }
1188 IntrinsicType value;
1208 template<
typename T >
1210 :
public SIMDPack< T >
1223 :
public SIMDf64< SIMDdouble >
1225 using This = SIMDdouble;
1226 using BaseType = SIMDf64<This>;
1227 using ValueType = double;
1229 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 1230 using IntrinsicType = __m512d;
1232 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1233 static constexpr
size_t size = 8UL;
1234 #elif BLAZE_AVX_MODE 1235 using IntrinsicType = __m256d;
1237 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1238 static constexpr
size_t size = 4UL;
1239 #elif BLAZE_SSE2_MODE 1240 using IntrinsicType = __m128d;
1242 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1243 static constexpr
size_t size = 2UL;
1245 using IntrinsicType = ValueType;
1248 static constexpr
size_t size = 1UL;
1253 template<
typename T >
1256 template<
typename T >
1257 BLAZE_ALWAYS_INLINE SIMDdouble& operator=(
const SIMDf64<T>& v ) noexcept { value = (~v).
eval().value;
return *
this; }
1261 IntrinsicType value;
1281 template<
typename T >
1283 :
public SIMDPack< T >
1296 :
public SIMDcf64< SIMDcdouble >
1298 using This = SIMDcdouble;
1299 using BaseType = SIMDcf64<This>;
1300 using ValueType = complex<double>;
1302 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 1303 using IntrinsicType = __m512d;
1305 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1306 static constexpr
size_t size = 4UL;
1307 #elif BLAZE_AVX_MODE 1308 using IntrinsicType = __m256d;
1310 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1311 static constexpr
size_t size = 2UL;
1312 #elif BLAZE_SSE2_MODE 1313 using IntrinsicType = __m128d;
1315 BLAZE_ALWAYS_INLINE ValueType operator[](
size_t i )
const noexcept {
return reinterpret_cast<const ValueType*>( &value )[i]; }
1316 static constexpr
size_t size = 1UL;
1318 using IntrinsicType = ValueType;
1321 static constexpr
size_t size = 1UL;
1326 template<
typename T >
1329 template<
typename T >
1330 BLAZE_ALWAYS_INLINE SIMDcdouble& operator=(
const SIMDcf64<T>& v ) noexcept { value = (~v).value;
return *
this; }
1332 IntrinsicType value;
1354 template<
typename T1
1358 (~lhs) = (~lhs) + (~rhs);
1372 template<
typename T1
1376 (~lhs) = (~lhs) - (~rhs);
1390 template<
typename T1
1394 (~lhs) = (~lhs) * (~rhs);
1408 template<
typename T1
1412 (~lhs) = (~lhs) / (~rhs);
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:432
Header file for basic type definitions.
Header file for the SIMDPack base class.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:370
Base class for all SIMD data types.The SIMDPack class template is a base class for all SIMD data type...
Definition: SIMDPack.h:63
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:786
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( ).
Definition: DenseMatrix.h:558
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
System settings for the SSE mode.
auto operator *=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:494
Header file for the complex data type.
System settings for the inline keywords.