IsBlasCompatible.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISBLASCOMPATIBLE_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISBLASCOMPATIBLE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/Complex.h>
44 #include <blaze/util/FalseType.h>
45 #include <blaze/util/SelectType.h>
46 #include <blaze/util/TrueType.h>
50 
51 
52 namespace blaze {
53 
54 //=================================================================================================
55 //
56 // CLASS DEFINITION
57 //
58 //=================================================================================================
59 
60 //*************************************************************************************************
65 template< typename T >
66 struct IsBlasCompatibleHelper
67 {
68  //**********************************************************************************************
69  enum { value = ( IsFloat<T>::value || IsSame<complex<float>,T>::value ||
70  IsDouble<T>::value || IsSame<complex<double>,T>::value ) };
71  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
72  //**********************************************************************************************
73 };
75 //*************************************************************************************************
76 
77 
78 //*************************************************************************************************
98 template< typename T >
99 struct IsBlasCompatible : public IsBlasCompatibleHelper<T>::Type
100 {
101  public:
102  //**********************************************************************************************
104  enum { value = IsBlasCompatibleHelper<T>::value };
105  typedef typename IsBlasCompatibleHelper<T>::Type Type;
107  //**********************************************************************************************
108 };
109 //*************************************************************************************************
110 
111 } // namespace blaze
112 
113 #endif
Header file for the FalseType type/value trait base class.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsFloat type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsDouble type trait.
Header file for the SelectType class template.
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsBlasCompatible.h:99
Header file for the complex data type.
Header file for the TrueType type/value trait base class.