DimensionOf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_DIMENSIONOF_H_
36 #define _BLAZE_UTIL_DIMENSIONOF_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/Types.h>
44 #include <blaze/util/Unused.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // DIMENSIONOF FUNCTIONALITY
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
63 template< unsigned int N >
64 struct Array {
65  byte_t array[N];
66 };
68 //*************************************************************************************************
69 
70 
71 //*************************************************************************************************
91 template< typename T, unsigned int N >
92 inline size_t dimensionof( T(&a)[N] )
93 {
94  UNUSED_PARAMETER( a );
95  return sizeof( Array<N> );
96 }
97 //*************************************************************************************************
98 
99 } // namespace blaze
100 
101 #endif
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
unsigned char byte_t
Byte data type of the Blaze library.The byte data type is guaranteed to be an integral data type of s...
Definition: Types.h:79
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
size_t dimensionof(T(&a)[N])
Static evaluation of array dimensions.
Definition: DimensionOf.h:92
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81