Blaze 3.9
BandTrait.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TRAITS_BANDTRAIT_H_
36#define _BLAZE_MATH_TRAITS_BANDTRAIT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
44#include <blaze/math/Infinity.h>
46#include <blaze/util/Types.h>
47
48
49namespace blaze {
50
51//=================================================================================================
52//
53// CLASS DEFINITION
54//
55//=================================================================================================
56
57//*************************************************************************************************
59template< typename, ptrdiff_t... > struct BandTrait;
60template< typename, ptrdiff_t, typename = void > struct BandTraitEval1;
61template< typename, ptrdiff_t, typename = void > struct BandTraitEval2;
63//*************************************************************************************************
64
65
66//*************************************************************************************************
68template< ptrdiff_t I, typename T >
69auto evalBandTrait( const volatile T& ) -> BandTraitEval1<T,I>;
70
71template< typename T >
72auto evalBandTrait( const volatile T& ) -> BandTraitEval1<T,inf>;
74//*************************************************************************************************
75
76
77//*************************************************************************************************
122template< typename MT // Type of the matrix
123 , ptrdiff_t... CBAs > // Compile time band arguments
125 : public decltype( evalBandTrait<CBAs...>( std::declval<MT&>() ) )
126{};
127//*************************************************************************************************
128
129
130//*************************************************************************************************
143template< typename MT // Type of the matrix
144 , ptrdiff_t... CBAs > // Compile time band arguments
145using BandTrait_t = typename BandTrait<MT,CBAs...>::Type;
146//*************************************************************************************************
147
148
149//*************************************************************************************************
154template< typename MT // Type of the matrix
155 , ptrdiff_t I // Compile time band index
156 , typename > // Restricting condition
157struct BandTraitEval1
158 : public BandTraitEval2<MT,I>
159{};
161//*************************************************************************************************
162
163
164//*************************************************************************************************
169template< typename MT // Type of the matrix
170 , ptrdiff_t I // Compile time band index
171 , typename > // Restricting condition
172struct BandTraitEval2
173{};
175//*************************************************************************************************
176
177} // namespace blaze
178
179#endif
Numerical infinity for built-in data types.
Utility type for generic codes.
Pointer difference type of the Blaze library.
typename BandTrait< MT, CBAs... >::Type BandTrait_t
Auxiliary alias declaration for the BandTrait type trait.
Definition: BandTrait.h:145
Base template for the BandTrait class.
Definition: BandTrait.h:126
Header file for basic type definitions.