Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
simd
Ceil.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_SIMD_CEIL_H_
36
#define _BLAZE_MATH_SIMD_CEIL_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#if BLAZE_SLEEF_MODE
44
# include <sleef.h>
45
#endif
46
#include <
blaze/math/simd/BasicTypes.h
>
47
#include <
blaze/system/Inline.h
>
48
#include <
blaze/system/Vectorization.h
>
49
50
51
namespace
blaze {
52
53
//=================================================================================================
54
//
55
// 32-BIT FLOATING POINT SIMD TYPES
56
//
57
//=================================================================================================
58
59
//*************************************************************************************************
69
template
<
typename
T >
// Type of the operand
70
BLAZE_ALWAYS_INLINE
const
SIMDfloat
ceil
(
const
SIMDf32<T>& a )
noexcept
71
#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
72
{
73
return
_mm512_ceil_ps( (*a).eval().value );
74
}
75
#elif BLAZE_SLEEF_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
76
{
77
return
Sleef_ceilf16( (*a).eval().value );
78
}
79
#elif BLAZE_XSIMD_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
80
{
81
return
SIMDfloat{ xsimd::ceil( xsimd::batch<float>{ (*a).eval().value } ).
data
};
82
}
83
#elif BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
84
=
delete
;
85
#elif BLAZE_AVX_MODE
86
{
87
return
_mm256_ceil_ps( (*a).eval().value );
88
}
89
#elif BLAZE_SSE4_MODE
90
{
91
return
_mm_ceil_ps( (*a).eval().value );
92
}
93
#else
94
=
delete
;
95
#endif
96
//*************************************************************************************************
97
98
99
100
101
//=================================================================================================
102
//
103
// 64-BIT FLOATING POINT SIMD TYPES
104
//
105
//=================================================================================================
106
107
//*************************************************************************************************
117
template
<
typename
T >
// Type of the operand
118
BLAZE_ALWAYS_INLINE
const
SIMDdouble
ceil
(
const
SIMDf64<T>& a )
noexcept
119
#if BLAZE_SVML_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
120
{
121
return
_mm512_ceil_pd( (*a).eval().value );
122
}
123
#elif BLAZE_SLEEF_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
124
{
125
return
Sleef_ceild8( (*a).eval().value );
126
}
127
#elif BLAZE_XSIMD_MODE && ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE )
128
{
129
return
SIMDdouble{ xsimd::ceil( xsimd::batch<double>{ (*a).eval().value } ).
data
};
130
}
131
#elif BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
132
=
delete
;
133
#elif BLAZE_AVX_MODE
134
{
135
return
_mm256_ceil_pd( (*a).eval().value );
136
}
137
#elif BLAZE_SSE4_MODE
138
{
139
return
_mm_ceil_pd( (*a).eval().value );
140
}
141
#else
142
=
delete
;
143
#endif
144
//*************************************************************************************************
145
146
}
// namespace blaze
147
148
#endif
BasicTypes.h
Header file for the basic SIMD types.
SIMDdouble
SIMD type for 64-bit double precision floating point data values.
SIMDfloat
SIMD type for 32-bit single precision floating point data values.
blaze::ceil
decltype(auto) ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition
DMatMapExpr.h:1380
blaze::data
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition
DenseMatrix.h:182
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition
Inline.h:85
Inline.h
System settings for the inline keywords.
Vectorization.h
System settings for the SSE mode.
Generated by
1.18.0