All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsBlasCompatible.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_ISBLASCOMPATIBLE_H_
23 #define _BLAZE_MATH_TYPETRAITS_ISBLASCOMPATIBLE_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <blaze/util/Complex.h>
31 #include <blaze/util/FalseType.h>
32 #include <blaze/util/SelectType.h>
33 #include <blaze/util/TrueType.h>
37 
38 
39 namespace blaze {
40 
41 //=================================================================================================
42 //
43 // CLASS DEFINITION
44 //
45 //=================================================================================================
46 
47 //*************************************************************************************************
52 template< typename T >
53 struct IsBlasCompatibleHelper
54 {
55  //**********************************************************************************************
56  enum { value = ( IsFloat<T>::value || IsSame<complex<float>,T>::value ||
57  IsDouble<T>::value || IsSame<complex<double>,T>::value ) };
58  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
59  //**********************************************************************************************
60 };
62 //*************************************************************************************************
63 
64 
65 //*************************************************************************************************
85 template< typename T >
86 struct IsBlasCompatible : public IsBlasCompatibleHelper<T>::Type
87 {
88  public:
89  //**********************************************************************************************
91  enum { value = IsBlasCompatibleHelper<T>::value };
92  typedef typename IsBlasCompatibleHelper<T>::Type Type;
94  //**********************************************************************************************
95 };
96 //*************************************************************************************************
97 
98 } // namespace blaze
99 
100 #endif