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_AVX512F_MODE || BLAZE_MIC_MODE
73 = delete;
74 #elif BLAZE_AVX_MODE
75 {
76  return _mm256_floor_ps( (~a).eval().value );
77 }
78 #elif BLAZE_SSE4_MODE
79 {
80  return _mm_floor_ps( (~a).eval().value );
81 }
82 #else
83 = delete;
84 #endif
85 //*************************************************************************************************
86 
87 
88 
89 
90 //=================================================================================================
91 //
92 // 64-BIT FLOATING POINT SIMD TYPES
93 //
94 //=================================================================================================
95 
96 //*************************************************************************************************
106 template< typename T > // Type of the operand
107 BLAZE_ALWAYS_INLINE const SIMDdouble floor( const SIMDf64<T>& a ) noexcept
108 #if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
109 {
110  return _mm512_floor_pd( (~a).eval().value );
111 }
112 #elif BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
113 = delete;
114 #elif BLAZE_AVX_MODE
115 {
116  return _mm256_floor_pd( (~a).eval().value );
117 }
118 #elif BLAZE_SSE4_MODE
119 {
120  return _mm_floor_pd( (~a).eval().value );
121 }
122 #else
123 = delete;
124 #endif
125 //*************************************************************************************************
126 
127 } // namespace blaze
128 
129 #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:786
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:1210
System settings for the SSE mode.
System settings for the inline keywords.