Blaze 3.9
Div.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SIMD_DIV_H_
36#define _BLAZE_MATH_SIMD_DIV_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44#include <blaze/system/Inline.h>
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// 8-BIT INTEGRAL SIMD TYPES
53//
54//=================================================================================================
55
56//*************************************************************************************************
67 operator/( const SIMDint8& a, const SIMDint8& b ) noexcept
68#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
69{
70 return _mm512_div_epi8( a.value, b.value );
71}
72#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
73{
74 return _mm256_div_epi8( a.value, b.value );
75}
76#else
77= delete;
78#endif
79//*************************************************************************************************
80
81
82//*************************************************************************************************
93 operator/( const SIMDuint8& a, const SIMDuint8& b ) noexcept
94#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
95{
96 return _mm512_div_epu8( a.value, b.value );
97}
98#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
99{
100 return _mm256_div_epu8( a.value, b.value );
101}
102#else
103= delete;
104#endif
105//*************************************************************************************************
106
107
108//*************************************************************************************************
119 operator/( const SIMDcint8& a, const SIMDint8& b ) noexcept
120#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
121{
122 return _mm512_div_epi8( a.value, b.value );
123}
124#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
125{
126 return _mm256_div_epi8( a.value, b.value );
127}
128#else
129= delete;
130#endif
131//*************************************************************************************************
132
133
134//*************************************************************************************************
145 operator/( const SIMDcuint8& a, const SIMDuint8& b ) noexcept
146#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
147{
148 return _mm512_div_epu8( a.value, b.value );
149}
150#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
151{
152 return _mm256_div_epu8( a.value, b.value );
153}
154#else
155= delete;
156#endif
157//*************************************************************************************************
158
159
160
161
162//=================================================================================================
163//
164// 16-BIT INTEGRAL SIMD TYPES
165//
166//=================================================================================================
167
168//*************************************************************************************************
179 operator/( const SIMDint16& a, const SIMDint16& b ) noexcept
180#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
181{
182 return _mm512_div_epi16( a.value, b.value );
183}
184#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
185{
186 return _mm256_div_epi16( a.value, b.value );
187}
188#else
189= delete;
190#endif
191//*************************************************************************************************
192
193
194//*************************************************************************************************
205 operator/( const SIMDuint16& a, const SIMDuint16& b ) noexcept
206#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
207{
208 return _mm512_div_epu16( a.value, b.value );
209}
210#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
211{
212 return _mm256_div_epu16( a.value, b.value );
213}
214#else
215= delete;
216#endif
217//*************************************************************************************************
218
219
220//*************************************************************************************************
231 operator/( const SIMDcint16& a, const SIMDint16& b ) noexcept
232#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
233{
234 return _mm512_div_epi16( a.value, b.value );
235}
236#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
237{
238 return _mm256_div_epi16( a.value, b.value );
239}
240#else
241= delete;
242#endif
243//*************************************************************************************************
244
245
246//*************************************************************************************************
257 operator/( const SIMDcuint16& a, const SIMDuint16& b ) noexcept
258#if BLAZE_SVML_MODE && BLAZE_AVX512BW_MODE
259{
260 return _mm512_div_epu16( a.value, b.value );
261}
262#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
263{
264 return _mm256_div_epu16( a.value, b.value );
265}
266#else
267= delete;
268#endif
269//*************************************************************************************************
270
271
272
273
274//=================================================================================================
275//
276// 32-BIT INTEGRAL SIMD TYPES
277//
278//=================================================================================================
279
280//*************************************************************************************************
291 operator/( const SIMDint32& a, const SIMDint32& b ) noexcept
292#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
293{
294 return _mm512_div_epi32( a.value, b.value );
295}
296#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
297{
298 return _mm256_div_epi32( a.value, b.value );
299}
300#else
301= delete;
302#endif
303//*************************************************************************************************
304
305
306//*************************************************************************************************
317 operator/( const SIMDuint32& a, const SIMDuint32& b ) noexcept
318#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
319{
320 return _mm512_div_epu32( a.value, b.value );
321}
322#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
323{
324 return _mm256_div_epu32( a.value, b.value );
325}
326#else
327= delete;
328#endif
329//*************************************************************************************************
330
331
332//*************************************************************************************************
343 operator/( const SIMDcint32& a, const SIMDint32& b ) noexcept
344#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
345{
346 return _mm512_div_epi32( a.value, b.value );
347}
348#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
349{
350 return _mm256_div_epi32( a.value, b.value );
351}
352#else
353= delete;
354#endif
355//*************************************************************************************************
356
357
358//*************************************************************************************************
369 operator/( const SIMDcuint32& a, const SIMDuint32& b ) noexcept
370#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
371{
372 return _mm512_div_epu32( a.value, b.value );
373}
374#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
375{
376 return _mm256_div_epu32( a.value, b.value );
377}
378#else
379= delete;
380#endif
381//*************************************************************************************************
382
383
384
385
386//=================================================================================================
387//
388// 64-BIT INTEGRAL SIMD TYPES
389//
390//=================================================================================================
391
392//*************************************************************************************************
403 operator/( const SIMDint64& a, const SIMDint64& b ) noexcept
404#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
405{
406 return _mm512_div_epi64( a.value, b.value );
407}
408#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
409{
410 return _mm256_div_epi64( a.value, b.value );
411}
412#else
413= delete;
414#endif
415//*************************************************************************************************
416
417
418//*************************************************************************************************
429 operator/( const SIMDuint64& a, const SIMDuint64& b ) noexcept
430#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
431{
432 return _mm512_div_epu64( a.value, b.value );
433}
434#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
435{
436 return _mm256_div_epu64( a.value, b.value );
437}
438#else
439= delete;
440#endif
441//*************************************************************************************************
442
443
444//*************************************************************************************************
455 operator/( const SIMDcint64& a, const SIMDint64& b ) noexcept
456#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
457{
458 return _mm512_div_epi64( a.value, b.value );
459}
460#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
461{
462 return _mm256_div_epi64( a.value, b.value );
463}
464#else
465= delete;
466#endif
467//*************************************************************************************************
468
469
470//*************************************************************************************************
481 operator/( const SIMDcuint64& a, const SIMDuint64& b ) noexcept
482#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
483{
484 return _mm512_div_epu64( a.value, b.value );
485}
486#elif BLAZE_SVML_MODE && BLAZE_AVX2_MODE
487{
488 return _mm256_div_epu64( a.value, b.value );
489}
490#else
491= delete;
492#endif
493//*************************************************************************************************
494
495
496
497
498//=================================================================================================
499//
500// 32-BIT FLOATING POINT SIMD TYPES
501//
502//=================================================================================================
503
504//*************************************************************************************************
514template< typename T1 // Type of the left-hand side operand
515 , typename T2 > // Type of the right-hand side operand
517 operator/( const SIMDf32<T1>& a, const SIMDf32<T2>& b ) noexcept
518#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
519{
520 return _mm512_div_ps( (*a).eval().value, (*b).eval().value );
521}
522#elif BLAZE_AVX_MODE
523{
524 return _mm256_div_ps( (*a).eval().value, (*b).eval().value );
525}
526#elif BLAZE_SSE_MODE
527{
528 return _mm_div_ps( (*a).eval().value, (*b).eval().value );
529}
530#else
531= delete;
532#endif
533//*************************************************************************************************
534
535
536//*************************************************************************************************
547 operator/( const SIMDcfloat& a, const SIMDfloat& b ) noexcept
548#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
549{
550 return _mm512_div_ps( a.value, b.value );
551}
552#elif BLAZE_AVX_MODE
553{
554 return _mm256_div_ps( a.value, b.value );
555}
556#elif BLAZE_SSE_MODE
557{
558 return _mm_div_ps( a.value, b.value );
559}
560#else
561= delete;
562#endif
563//*************************************************************************************************
564
565
566
567
568//=================================================================================================
569//
570// 64-BIT FLOATING POINT SIMD TYPES
571//
572//=================================================================================================
573
574//*************************************************************************************************
584template< typename T1 // Type of the left-hand side operand
585 , typename T2 > // Type of the right-hand side operand
587 operator/( const SIMDf64<T1>& a, const SIMDf64<T2>& b ) noexcept
588#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
589{
590 return _mm512_div_pd( (*a).eval().value, (*b).eval().value );
591}
592#elif BLAZE_AVX_MODE
593{
594 return _mm256_div_pd( (*a).eval().value, (*b).eval().value );
595}
596#elif BLAZE_SSE2_MODE
597{
598 return _mm_div_pd( (*a).eval().value, (*b).eval().value );
599}
600#else
601= delete;
602#endif
603//*************************************************************************************************
604
605
606//*************************************************************************************************
617 operator/( const SIMDcdouble& a, const SIMDdouble& b ) noexcept
618#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
619{
620 return _mm512_div_pd( a.value, b.value );
621}
622#elif BLAZE_AVX_MODE
623{
624 return _mm256_div_pd( a.value, b.value );
625}
626#elif BLAZE_SSE2_MODE
627{
628 return _mm_div_pd( a.value, b.value );
629}
630#else
631= delete;
632#endif
633//*************************************************************************************************
634
635} // namespace blaze
636
637#endif
Header file for the basic SIMD types.
SIMD type for 64-bit double precision complex values.
SIMD type for 32-bit single precision complex values.
SIMD type for 16-bit signed integral complex values.
SIMD type for 32-bit signed integral complex values.
SIMD type for 64-bit signed integral complex values.
SIMD type for 8-bit signed integral complex values.
SIMD type for 16-bit unsigned integral complex values.
SIMD type for 32-bit unsigned integral complex values.
SIMD type for 64-bit unsigned integral complex values.
SIMD type for 8-bit unsigned integral complex values.
SIMD type for 64-bit double precision floating point data values.
SIMD type for 32-bit single precision floating point data values.
SIMD type for 16-bit signed integral data values.
SIMD type for 32-bit signed integral data values.
SIMD type for 64-bit integral data values.
SIMD type for 8-bit signed integral data values.
SIMD type for 16-bit unsigned integral data values.
SIMD type for 32-bit unsigned integral data values.
SIMD type for 64-bit unsigned integral data values.
SIMD type for 8-bit unsigned integral data values.
BLAZE_ALWAYS_INLINE const SIMDcdouble operator/(const SIMDcdouble &a, const SIMDdouble &b) noexcept=delete
Scaling of a vector of double precision floating point values complex SIMD values.
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
System settings for the inline keywords.
System settings for the SSE mode.