35 #ifndef _BLAZE_MATH_SIMD_ADDITION_H_ 36 #define _BLAZE_MATH_SIMD_ADDITION_H_ 66 template<
typename T >
68 operator+(
const SIMDi8<T>& a,
const SIMDi8<T>& b ) noexcept
69 #if BLAZE_AVX512BW_MODE 71 return _mm512_add_epi8( (~a).value, (~b).value );
75 return _mm256_add_epi8( (~a).value, (~b).value );
79 return _mm_add_epi8( (~a).value, (~b).value );
100 operator+(
const SIMDi8<T1>& a,
const SIMDi8<T2>& b ) noexcept
101 #if BLAZE_AVX512BW_MODE 103 return _mm512_add_epi8( (~a).value, (~b).value );
105 #elif BLAZE_AVX2_MODE 107 return _mm256_add_epi8( (~a).value, (~b).value );
109 #elif BLAZE_SSE2_MODE 111 return _mm_add_epi8( (~a).value, (~b).value );
129 template<
typename T >
131 operator+(
const SIMDci8<T>& a,
const SIMDci8<T>& b ) noexcept
132 #if BLAZE_AVX512BW_MODE 134 return _mm512_add_epi8( (~a).value, (~b).value );
136 #elif BLAZE_AVX2_MODE 138 return _mm256_add_epi8( (~a).value, (~b).value );
140 #elif BLAZE_SSE2_MODE 142 return _mm_add_epi8( (~a).value, (~b).value );
168 template<
typename T >
170 operator+(
const SIMDi16<T>& a,
const SIMDi16<T>& b ) noexcept
171 #if BLAZE_AVX512BW_MODE 173 return _mm512_add_epi16( (~a).value, (~b).value );
175 #elif BLAZE_AVX2_MODE 177 return _mm256_add_epi16( (~a).value, (~b).value );
179 #elif BLAZE_SSE2_MODE 181 return _mm_add_epi16( (~a).value, (~b).value );
199 template<
typename T1
202 operator+(
const SIMDi16<T1>& a,
const SIMDi16<T2>& b ) noexcept
203 #if BLAZE_AVX512BW_MODE 205 return _mm512_add_epi16( (~a).value, (~b).value );
207 #elif BLAZE_AVX2_MODE 209 return _mm256_add_epi16( (~a).value, (~b).value );
211 #elif BLAZE_SSE2_MODE 213 return _mm_add_epi16( (~a).value, (~b).value );
231 template<
typename T >
233 operator+(
const SIMDci16<T>& a,
const SIMDci16<T>& b ) noexcept
234 #if BLAZE_AVX512BW_MODE 236 return _mm512_add_epi16( (~a).value, (~b).value );
238 #elif BLAZE_AVX2_MODE 240 return _mm256_add_epi16( (~a).value, (~b).value );
242 #elif BLAZE_SSE2_MODE 244 return _mm_add_epi16( (~a).value, (~b).value );
270 template<
typename T >
272 operator+(
const SIMDi32<T>& a,
const SIMDi32<T>& b ) noexcept
273 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 275 return _mm512_add_epi32( (~a).value, (~b).value );
277 #elif BLAZE_AVX2_MODE 279 return _mm256_add_epi32( (~a).value, (~b).value );
281 #elif BLAZE_SSE2_MODE 283 return _mm_add_epi32( (~a).value, (~b).value );
301 template<
typename T1
304 operator+(
const SIMDi32<T1>& a,
const SIMDi32<T2>& b ) noexcept
305 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 307 return _mm512_add_epi32( (~a).value, (~b).value );
309 #elif BLAZE_AVX2_MODE 311 return _mm256_add_epi32( (~a).value, (~b).value );
313 #elif BLAZE_SSE2_MODE 315 return _mm_add_epi32( (~a).value, (~b).value );
333 template<
typename T >
335 operator+(
const SIMDci32<T>& a,
const SIMDci32<T>& b ) noexcept
336 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 338 return _mm512_add_epi32( (~a).value, (~b).value );
340 #elif BLAZE_AVX2_MODE 342 return _mm256_add_epi32( (~a).value, (~b).value );
344 #elif BLAZE_SSE2_MODE 346 return _mm_add_epi32( (~a).value, (~b).value );
372 template<
typename T >
374 operator+(
const SIMDi64<T>& a,
const SIMDi64<T>& b ) noexcept
375 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 377 return _mm512_add_epi64( (~a).value, (~b).value );
379 #elif BLAZE_AVX2_MODE 381 return _mm256_add_epi64( (~a).value, (~b).value );
383 #elif BLAZE_SSE2_MODE 385 return _mm_add_epi64( (~a).value, (~b).value );
403 template<
typename T1
406 operator+(
const SIMDi64<T1>& a,
const SIMDi64<T2>& b ) noexcept
407 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 409 return _mm512_add_epi64( (~a).value, (~b).value );
411 #elif BLAZE_AVX2_MODE 413 return _mm256_add_epi64( (~a).value, (~b).value );
415 #elif BLAZE_SSE2_MODE 417 return _mm_add_epi64( (~a).value, (~b).value );
435 template<
typename T >
437 operator+(
const SIMDci64<T>& a,
const SIMDci64<T>& b ) noexcept
438 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 440 return _mm512_add_epi64( (~a).value, (~b).value );
442 #elif BLAZE_AVX2_MODE 444 return _mm256_add_epi64( (~a).value, (~b).value );
446 #elif BLAZE_SSE2_MODE 448 return _mm_add_epi64( (~a).value, (~b).value );
474 template<
typename T1
477 operator+(
const SIMDf32<T1>& a,
const SIMDf32<T2>& b ) noexcept
478 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 480 return _mm512_add_ps( (~a).
eval().value, (~b).
eval().value );
484 return _mm256_add_ps( (~a).
eval().value, (~b).
eval().value );
488 return _mm_add_ps( (~a).
eval().value, (~b).
eval().value );
507 operator+(
const SIMDcfloat& a,
const SIMDcfloat& b ) noexcept
508 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 510 return _mm512_add_ps( a.value, b.value );
514 return _mm256_add_ps( a.value, b.value );
518 return _mm_add_ps( a.value, b.value );
544 template<
typename T1
547 operator+(
const SIMDf64<T1>& a,
const SIMDf64<T2>& b ) noexcept
548 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 550 return _mm512_add_pd( (~a).
eval().value, (~b).
eval().value );
554 return _mm256_add_pd( (~a).
eval().value, (~b).
eval().value );
556 #elif BLAZE_SSE2_MODE 558 return _mm_add_pd( (~a).
eval().value, (~b).
eval().value );
577 operator+(
const SIMDcdouble& a,
const SIMDcdouble& b ) noexcept
578 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 580 return _mm512_add_pd( a.value, b.value );
584 return _mm256_add_pd( a.value, b.value );
586 #elif BLAZE_SSE2_MODE 588 return _mm_add_pd( a.value, b.value );
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:699
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:797
Header file for the basic SIMD types.
System settings for the SSE mode.
System settings for the inline keywords.