All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AlignedStorage.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_ALIGNEDSTORAGE_H_
23 #define _BLAZE_UTIL_ALIGNEDSTORAGE_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <blaze/system/Alignment.h>
34 
35 
36 namespace blaze {
37 
38 //=================================================================================================
39 //
40 // CLASS DEFINITION
41 //
42 //=================================================================================================
43 
44 //*************************************************************************************************
49 template< size_t Alignment >
50 struct AlignedStorageHelper;
52 //*************************************************************************************************
53 
54 
55 //*************************************************************************************************
60 template<>
61 struct BLAZE_ALIGN( 1UL ) AlignedStorageHelper<1UL>
62 {};
64 //*************************************************************************************************
65 
66 
67 //*************************************************************************************************
72 template<>
73 struct BLAZE_ALIGN( 2UL ) AlignedStorageHelper<2UL>
74 {};
76 //*************************************************************************************************
77 
78 
79 //*************************************************************************************************
84 template<>
85 struct BLAZE_ALIGN( 4UL ) AlignedStorageHelper<4UL>
86 {};
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
96 template<>
97 struct BLAZE_ALIGN( 8UL ) AlignedStorageHelper<8UL>
98 {};
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
108 template<>
109 struct BLAZE_ALIGN( 16UL ) AlignedStorageHelper<16UL>
110 {};
112 //*************************************************************************************************
113 
114 
115 //*************************************************************************************************
120 template<>
121 struct BLAZE_ALIGN( 32UL ) AlignedStorageHelper<32UL>
122 {};
124 //*************************************************************************************************
125 
126 
127 //*************************************************************************************************
132 template<>
133 struct BLAZE_ALIGN( 64UL ) AlignedStorageHelper<64UL>
134 {};
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
162 template< typename T >
163 class AlignedStorage : private AlignedStorageHelper< AlignmentTrait<T>::value >
164 {
165  //**Compile time checks*************************************************************************
170  //**********************************************************************************************
171 };
172 //*************************************************************************************************
173 
174 } // namespace blaze
175 
176 #endif