Floor.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SIMD_FLOOR_H_
36 #define _BLAZE_MATH_SIMD_FLOOR_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 //*************************************************************************************************
66 template< typename T > // Type of the operand
67 BLAZE_ALWAYS_INLINE const SIMDfloat floor( const SIMDf32<T>& a ) noexcept
68 #if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
69 {
70  return _mm512_floor_ps( (~a).eval().value );
71 }
72 #elif BLAZE_AVX_MODE
73 {
74  return _mm256_floor_ps( (~a).eval().value );
75 }
76 #elif BLAZE_SSE4_MODE
77 {
78  return _mm_floor_ps( (~a).eval().value );
79 }
80 #else
81 = delete;
82 #endif
83 //*************************************************************************************************
84 
85 
86 
87 
88 //=================================================================================================
89 //
90 // 64-BIT FLOATING POINT SIMD TYPES
91 //
92 //=================================================================================================
93 
94 //*************************************************************************************************
104 template< typename T > // Type of the operand
105 BLAZE_ALWAYS_INLINE const SIMDdouble floor( const SIMDf64<T>& a ) noexcept
106 #if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
107 {
108  return _mm512_floor_pd( (~a).eval().value );
109 }
110 #elif BLAZE_AVX_MODE
111 {
112  return _mm256_floor_pd( (~a).eval().value );
113 }
114 #elif BLAZE_SSE4_MODE
115 {
116  return _mm_floor_pd( (~a).eval().value );
117 }
118 #else
119 = delete;
120 #endif
121 //*************************************************************************************************
122 
123 } // namespace blaze
124 
125 #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) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:794
Header file for the basic SIMD types.
decltype(auto) floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1205
System settings for the SSE mode.
System settings for the inline keywords.