MyContainerTypeDefs.hpp
Go to the documentation of this file.
1 #ifndef ApproxMVBB_Common_MyContainerTypeDefs_hpp
2 #define ApproxMVBB_Common_MyContainerTypeDefs_hpp
3 
4 //#define EIGEN_DONT_VECTORIZE
5 //#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
6 
7 #include <vector>
8 #include <map>
9 #include <unordered_map>
10 #include <Eigen/StdVector>
11 
12 #include <Eigen/Dense>
13 
17 namespace ApproxMVBB{
18 namespace MyContainers {
19 
20  // Sepcial STL map where the type is 16byte aligned
21  template<typename Key, typename Type, typename Comp = std::less<Key> >
22  using StdMapAligned = std::map<Key, Type, Comp, Eigen::aligned_allocator<std::pair<const Key, Type> > >;
23 
24  // Sepcial STL map where the type is 16byte aligned
25  template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> >
26  using StdUMapAligned = std::unordered_map<Key, Type, Hash, Pred, Eigen::aligned_allocator<std::pair<const Key, Type> > >;
27 
28  // Special STL vectors where the type is 16byte aligned
29  template<typename Type >
30  using StdVecAligned = std::vector<Type, Eigen::aligned_allocator<Type> >;
31 
32 }
33 }
34 
38 #define ApproxMVBB_DEFINE_CONTAINER_TYPES \
39  \
40  template<typename Key, typename Type, typename Comp = std::less<Key> > \
41  using StdMapAligned = ApproxMVBB::MyContainers::StdMapAligned<Key, Type, Comp >; \
42  \
43  template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> > \
44  using StdUMapAligned = ApproxMVBB::MyContainers::StdUMapAligned<Key, Type, Hash,Pred >; \
45  \
46  template<typename Type > \
47  using StdVecAligned = ApproxMVBB::MyContainers::StdVecAligned< Type >;
48 
49 #endif
These are some container definitions.
std::vector< Type, Eigen::aligned_allocator< Type > > StdVecAligned
std::unordered_map< Key, Type, Hash, Pred, Eigen::aligned_allocator< std::pair< const Key, Type > > > StdUMapAligned
std::map< Key, Type, Comp, Eigen::aligned_allocator< std::pair< const Key, Type > > > StdMapAligned


asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Mon Jun 10 2019 12:38:08