Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
IsSIMDCombinable.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TYPETRAITS_ISSIMDCOMBINABLE_H_
36
#define _BLAZE_MATH_TYPETRAITS_ISSIMDCOMBINABLE_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/util/IntegralConstant.h
>
44
#include <
blaze/util/typetraits/IsIntegral.h
>
45
#include <
blaze/util/typetraits/IsNumeric.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
61
template
<
typename
T1
62
,
typename
T2
63
,
typename
... Ts >
64
struct
IsSIMDCombinableHelper
65
:
public
BoolConstant
< IsSIMDCombinableHelper<T1,T2>::value &&
66
IsSIMDCombinableHelper<T2,Ts...>::value >
67
{};
69
//*************************************************************************************************
70
71
72
//*************************************************************************************************
75
template
<
typename
T >
76
struct
IsSIMDCombinableHelper<T,T>
77
:
public
BoolConstant
< IsNumeric_v<T> >
78
{};
80
//*************************************************************************************************
81
82
83
//*************************************************************************************************
86
template
<
typename
T1,
typename
T2 >
87
struct
IsSIMDCombinableHelper<T1,T2>
88
:
public
BoolConstant
< IsNumeric_v<T1> && IsIntegral_v<T1> &&
89
IsNumeric_v<T2> && IsIntegral_v<T2> &&
90
sizeof(T1) == sizeof(T2) >
91
{};
93
//*************************************************************************************************
94
95
96
//*************************************************************************************************
116
template
<
typename
T1,
typename
T2,
typename
... Ts >
117
struct
IsSIMDCombinable
118
:
public
BoolConstant
< IsSIMDCombinableHelper< T1, T2, Ts... >::value >
119
{};
120
//*************************************************************************************************
121
122
123
//*************************************************************************************************
136
template
<
typename
T1,
typename
T2,
typename
... Ts >
137
constexpr
bool
IsSIMDCombinable_v
=
IsSIMDCombinable
<T1,T2,Ts...>::value;
138
//*************************************************************************************************
139
140
}
// namespace blaze
141
142
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
IsIntegral.h
Header file for the IsIntegral type trait.
IsNumeric.h
Header file for the IsNumeric type trait.
blaze::IsSIMDCombinable_v
constexpr bool IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.
Definition
IsSIMDCombinable.h:137
blaze::BoolConstant
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition
IntegralConstant.h:110
blaze::IsSIMDCombinable
Compile time check for data types.
Definition
IsSIMDCombinable.h:119
Generated by
1.18.0