Blaze 3.9
Loading...
Searching...
No Matches
DeclIdTrait.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TRAITS_DECLIDTRAIT_H_
36#define _BLAZE_MATH_TRAITS_DECLIDTRAIT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
48#include <blaze/util/EnableIf.h>
49
50
51namespace blaze {
52
53//=================================================================================================
54//
55// CLASS DEFINITION
56//
57//=================================================================================================
58
59//*************************************************************************************************
61template< typename > struct DeclIdTrait;
62template< typename, typename = void > struct DeclIdTraitEval;
64//*************************************************************************************************
65
66
67//*************************************************************************************************
69template< typename T >
70auto evalDeclIdTrait( const volatile T& ) -> DeclIdTraitEval<T>;
72//*************************************************************************************************
73
74
75//*************************************************************************************************
124template< typename MT > // Type of the matrix
126 : public decltype( evalDeclIdTrait( std::declval<MT&>() ) )
127{};
128//*************************************************************************************************
129
130
131//*************************************************************************************************
144template< typename MT > // Type of the matrix
146//*************************************************************************************************
147
148
149//*************************************************************************************************
154template< typename MT // Type of the matrix
155 , typename > // Restricting condition
156struct DeclIdTraitEval
157{};
159//*************************************************************************************************
160
161
162//*************************************************************************************************
167template< typename MT > // Type of the matrix
168struct DeclIdTraitEval< MT
169 , EnableIf_t< IsMatrix_v<MT> &&
173{
174 using Type = IdentityMatrix< typename MT::ElementType, StorageOrder_v<MT> >;
175};
177//*************************************************************************************************
178
179} // namespace blaze
180
181#endif
Header file for the EnableIf class template.
Header file for the IsMatrix type trait.
typename DeclIdTrait< MT >::Type DeclIdTrait_t
Auxiliary alias declaration for the DeclIdTrait type trait.
Definition DeclIdTrait.h:145
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition Size.h:176
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition Size.h:72
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition IsMatrix.h:124
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
Header file for all forward declarations for sparse vectors and matrices.
Header file for the Size type trait.
Header file for the StorageOrder type trait.
Base template for the DeclIdTrait class.
Definition DeclIdTrait.h:127