Blaze  3.6
Exp2.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SIMD_EXP2_H_
36 #define _BLAZE_MATH_SIMD_EXP2_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // 32-BIT FLOATING POINT SIMD TYPES
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
65 template< typename T > // Type of the operand
66 BLAZE_ALWAYS_INLINE const SIMDfloat exp2( const SIMDf32<T>& a ) noexcept
67 #if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
68 {
69  return _mm512_exp2_ps( (~a).eval().value );
70 }
71 #elif BLAZE_SVML_MODE && BLAZE_AVX_MODE
72 {
73  return _mm256_exp2_ps( (~a).eval().value );
74 }
75 #elif BLAZE_SVML_MODE && BLAZE_SSE_MODE
76 {
77  return _mm_exp2_ps( (~a).eval().value );
78 }
79 #else
80 = delete;
81 #endif
82 //*************************************************************************************************
83 
84 
85 
86 
87 //=================================================================================================
88 //
89 // 64-BIT FLOATING POINT SIMD TYPES
90 //
91 //=================================================================================================
92 
93 //*************************************************************************************************
102 template< typename T > // Type of the operand
103 BLAZE_ALWAYS_INLINE const SIMDdouble exp2( const SIMDf64<T>& a ) noexcept
104 #if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
105 {
106  return _mm512_exp2_pd( (~a).eval().value );
107 }
108 #elif BLAZE_SVML_MODE && BLAZE_AVX_MODE
109 {
110  return _mm256_exp2_pd( (~a).eval().value );
111 }
112 #elif BLAZE_SVML_MODE && BLAZE_SSE_MODE
113 {
114  return _mm_exp2_pd( (~a).eval().value );
115 }
116 #else
117 = delete;
118 #endif
119 //*************************************************************************************************
120 
121 } // namespace blaze
122 
123 #endif
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
decltype(auto) exp2(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1660
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:786
Header file for the basic SIMD types.
System settings for the SSE mode.
System settings for the inline keywords.