Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
HasSIMDSqrt.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDSQRT_H_
36
#define _BLAZE_MATH_TYPETRAITS_HASSIMDSQRT_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/system/Vectorization.h
>
44
#include <
blaze/util/IntegralConstant.h
>
45
#include <
blaze/util/typetraits/RemoveCVRef.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
61
template
<
typename
T >
// Type of the operand
62
using
HasSIMDSqrtHelper =
63
BoolConstant
< (
IsFloat_v<T>
&&
64
( bool(
BLAZE_SSE_MODE
) ||
65
bool(
BLAZE_AVX_MODE
) ||
66
bool(
BLAZE_MIC_MODE
) ||
67
bool(
BLAZE_AVX512F_MODE
) ) ) ||
68
(
IsDouble_v<T>
&&
69
(
bool
(
BLAZE_SSE2_MODE
) ||
70
bool
(
BLAZE_AVX_MODE
) ||
71
bool
(
BLAZE_MIC_MODE
) ||
72
bool
(
BLAZE_AVX512F_MODE
) ) ) >;
74
//*************************************************************************************************
75
76
77
//*************************************************************************************************
98
template
<
typename
T >
// Type of the operand
99
struct
HasSIMDSqrt
100
:
public
BoolConstant
< HasSIMDSqrtHelper< RemoveCVRef_t<T> >::value >
101
{};
102
//*************************************************************************************************
103
104
105
//*************************************************************************************************
118
template
<
typename
T >
// Type of the operand
119
constexpr
bool
HasSIMDSqrt_v
=
HasSIMDSqrt<T>::value
;
120
//*************************************************************************************************
121
122
}
// namespace blaze
123
124
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
RemoveCVRef.h
Header file for the RemoveCVRef type trait.
blaze::HasSIMDSqrt_v
constexpr bool HasSIMDSqrt_v
Auxiliary variable template for the HasSIMDSqrt type trait.
Definition
HasSIMDSqrt.h:119
BLAZE_AVX_MODE
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.
Definition
Vectorization.h:211
BLAZE_AVX512F_MODE
#define BLAZE_AVX512F_MODE
Compilation switch for the AVX512F mode.
Definition
Vectorization.h:246
BLAZE_MIC_MODE
#define BLAZE_MIC_MODE
Compilation switch for the MIC mode.
Definition
Vectorization.h:299
BLAZE_SSE_MODE
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.
Definition
Vectorization.h:126
BLAZE_SSE2_MODE
#define BLAZE_SSE2_MODE
Compilation switch for the SSE2 mode.
Definition
Vectorization.h:143
blaze::IsFloat_v
constexpr bool IsFloat_v
Auxiliary variable template for the IsFloat type trait.
Definition
IsFloat.h:138
blaze::IsDouble_v
constexpr bool IsDouble_v
Auxiliary variable template for the IsDouble type trait.
Definition
IsDouble.h:138
blaze::BoolConstant
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition
IntegralConstant.h:110
blaze::HasSIMDSqrt
Availability of a SIMD square root operation for the given data type.
Definition
HasSIMDSqrt.h:101
Vectorization.h
System settings for the SSE mode.
Generated by
1.18.0