All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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/Byte.h>
44 #include <blaze/util/Types.h>
45 #include <blaze/util/Unused.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // DIMENSIONOF FUNCTIONALITY
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
64 template< unsigned int N >
65 struct Array {
66  byte array[N];
67 };
69 //*************************************************************************************************
70 
71 
72 //*************************************************************************************************
92 template< typename T, unsigned int N >
93 inline size_t dimensionof( T(&a)[N] )
94 {
95  UNUSED_PARAMETER( a );
96  return sizeof( Array<N> );
97 }
98 //*************************************************************************************************
99 
100 } // namespace blaze
101 
102 #endif
Header file for the UNUSED_PARAMETER function template.
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:84
Header file for the byte type.
size_t dimensionof(T(&a)[N])
Static evaluation of array dimensions.
Definition: DimensionOf.h:93
unsigned char byte
Byte data type of the Blaze library.The byte data type is guaranteed to be an integral data type of s...
Definition: Byte.h:61
Header file for basic type definitions.