Division.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_INTRINSICS_DIVISION_H_
36 #define _BLAZE_MATH_INTRINSICS_DIVISION_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // INTRINSIC DIVISION OPERATORS
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
65 #if BLAZE_MIC_MODE
66 BLAZE_ALWAYS_INLINE simd_int32_t operator/( const simd_int32_t& a, const simd_int32_t& b )
67 {
68  return _mm512_div_epi32( a.value, b.value );
69 }
70 #endif
71 //*************************************************************************************************
72 
73 
74 //*************************************************************************************************
83 #if BLAZE_MIC_MODE
84 BLAZE_ALWAYS_INLINE simd_int64_t operator/( const simd_int64_t& a, const simd_int64_t& b )
85 {
86  return _mm512_div_epi64( a.value, b.value );
87 }
88 #endif
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
101 #if BLAZE_MIC_MODE
102 BLAZE_ALWAYS_INLINE simd_float_t operator/( const simd_float_t& a, const simd_float_t& b )
103 {
104  return _mm512_div_ps( a.value, b.value );
105 }
106 #elif BLAZE_AVX_MODE
107 BLAZE_ALWAYS_INLINE simd_float_t operator/( const simd_float_t& a, const simd_float_t& b )
108 {
109  return _mm256_div_ps( a.value, b.value );
110 }
111 #elif BLAZE_SSE_MODE
112 BLAZE_ALWAYS_INLINE simd_float_t operator/( const simd_float_t& a, const simd_float_t& b )
113 {
114  return _mm_div_ps( a.value, b.value );
115 }
116 #endif
117 //*************************************************************************************************
118 
119 
120 //*************************************************************************************************
129 #if BLAZE_MIC_MODE
130 BLAZE_ALWAYS_INLINE simd_double_t operator/( const simd_double_t& a, const simd_double_t& b )
131 {
132  return _mm512_div_pd( a.value, b.value );
133 }
134 #elif BLAZE_AVX_MODE
135 BLAZE_ALWAYS_INLINE simd_double_t operator/( const simd_double_t& a, const simd_double_t& b )
136 {
137  return _mm256_div_pd( a.value, b.value );
138 }
139 #elif BLAZE_SSE2_MODE
140 BLAZE_ALWAYS_INLINE simd_double_t operator/( const simd_double_t& a, const simd_double_t& b )
141 {
142  return _mm_div_pd( a.value, b.value );
143 }
144 #endif
145 //*************************************************************************************************
146 
147 
148 //*************************************************************************************************
157 #if BLAZE_MIC_MODE
158 BLAZE_ALWAYS_INLINE simd_cint32_t operator/( const simd_cint32_t& a, const simd_int32_t& b )
159 {
160  return _mm512_div_epi32( a.value, b.value );
161 }
162 #endif
163 //*************************************************************************************************
164 
165 
166 //*************************************************************************************************
175 #if BLAZE_MIC_MODE
176 BLAZE_ALWAYS_INLINE simd_cint64_t operator/( const simd_cint64_t& a, const simd_int64_t& b )
177 {
178  return _mm512_div_epi64( a.value, b.value );
179 }
180 #endif
181 //*************************************************************************************************
182 
183 
184 //*************************************************************************************************
193 #if BLAZE_MIC_MODE
194 BLAZE_ALWAYS_INLINE simd_cfloat_t operator/( const simd_cfloat_t& a, const simd_float_t& b )
195 {
196  return _mm512_div_ps( a.value, b.value );
197 }
198 #elif BLAZE_AVX_MODE
199 BLAZE_ALWAYS_INLINE simd_cfloat_t operator/( const simd_cfloat_t& a, const simd_float_t& b )
200 {
201  return _mm256_div_ps( a.value, b.value );
202 }
203 #elif BLAZE_SSE_MODE
204 BLAZE_ALWAYS_INLINE simd_cfloat_t operator/( const simd_cfloat_t& a, const simd_float_t& b )
205 {
206  return _mm_div_ps( a.value, b.value );
207 }
208 #endif
209 //*************************************************************************************************
210 
211 
212 //*************************************************************************************************
221 #if BLAZE_MIC_MODE
222 BLAZE_ALWAYS_INLINE simd_cdouble_t operator/( const simd_cdouble_t& a, const simd_double_t& b )
223 {
224  return _mm512_div_pd( a.value, b.value );
225 }
226 #elif BLAZE_AVX_MODE
227 BLAZE_ALWAYS_INLINE simd_cdouble_t operator/( const simd_cdouble_t& a, const simd_double_t& b )
228 {
229  return _mm256_div_pd( a.value, b.value );
230 }
231 #elif BLAZE_SSE2_MODE
232 BLAZE_ALWAYS_INLINE simd_cdouble_t operator/( const simd_cdouble_t& a, const simd_double_t& b )
233 {
234  return _mm_div_pd( a.value, b.value );
235 }
236 #endif
237 //*************************************************************************************************
238 
239 } // namespace blaze
240 
241 #endif
const EnableIf< IsNumeric< T2 >, typename DivExprTrait< T1, T2 >::Type >::Type operator/(const DenseMatrix< T1, SO > &mat, T2 scalar)
Division operator for the division of a dense matrix by a scalar value ( ).
Definition: DMatScalarDivExpr.h:962
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
Header file for the basic intrinsic types.
System settings for the SSE mode.
System settings for the inline keywords.