Thea
Array.hpp
1 //============================================================================
2 //
3 // This file is part of the Thea toolkit.
4 //
5 // This software is distributed under the BSD license, as detailed in the
6 // accompanying LICENSE.txt file. Portions are derived from other works:
7 // their respective licenses and copyright information are reproduced in
8 // LICENSE.txt and/or in the relevant source files.
9 //
10 // Author: Siddhartha Chaudhuri
11 // First version: 2011
12 //
13 //============================================================================
14 
15 #ifndef __Thea_Array_hpp__
16 #define __Thea_Array_hpp__
17 
18 #include "Platform.hpp"
19 #include "AlignedAllocator.hpp"
20 #include <vector>
21 
22 namespace Thea {
23 
25 template < typename T, typename Alloc = std::allocator<T> > using Array = std::vector<T, Alloc>;
26 
28 template < typename T, size_t N = 16 > using AlignedArray = std::vector< T, AlignedAllocator<T, N> >;
29 
30 } // namespace Thea
31 
32 #endif
Root namespace for the Thea library.
std::vector< T, AlignedAllocator< T, N > > AlignedArray
Dynamically resizable array with aligned memory allocation.
Definition: Array.hpp:28
std::vector< T, Alloc > Array
Dynamically resizable array.
Definition: Array.hpp:25
This file must be included in every file in the project, before any other include.