IsInvertible.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISINVERTIBLE_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISINVERTIBLE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 #include <blaze/util/FalseType.h>
47 #include <blaze/util/SelectType.h>
48 #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 IsInvertibleHelper
67 {
68  //**********************************************************************************************
69  typedef typename UnderlyingElement<T>::Type UET;
70  //**********************************************************************************************
71 
72  //**********************************************************************************************
73  enum { value = ( IsBlasCompatible<T>::value || IsLongDouble<T>::value ||
74  ( IsDenseMatrix<T>::value && IsBlasCompatible<UET>::value ) ) };
75  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
76  //**********************************************************************************************
77 };
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
103 template< typename T >
104 struct IsInvertible : public IsInvertibleHelper<T>::Type
105 {
106  public:
107  //**********************************************************************************************
109  enum { value = IsInvertibleHelper<T>::value };
110  typedef typename IsInvertibleHelper<T>::Type Type;
112  //**********************************************************************************************
113 };
114 //*************************************************************************************************
115 
116 } // namespace blaze
117 
118 #endif
Header file for the FalseType type/value trait base class.
Header file for the UnderlyingElement type trait.
Header file for the IsLongDouble type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsBlasCompatible type trait.
Header file for the SelectType class template.
Header file for the IsDenseMatrix type trait.
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsInvertible.h:104
Header file for the TrueType type/value trait base class.