MyContainerTypeDefs.hpp
Go to the documentation of this file.
00001 #ifndef ApproxMVBB_Common_MyContainerTypeDefs_hpp
00002 #define ApproxMVBB_Common_MyContainerTypeDefs_hpp
00003 
00004 //#define EIGEN_DONT_VECTORIZE
00005 //#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
00006 
00007 #include <vector>
00008 #include <map>
00009 #include <unordered_map>
00010 #include <Eigen/StdVector>
00011 
00012 #include <Eigen/Dense>
00013 
00017 namespace ApproxMVBB{
00018 namespace MyContainers {
00019 
00020     // Sepcial STL map where the type is 16byte aligned
00021     template<typename Key, typename Type, typename Comp = std::less<Key> >
00022     using StdMapAligned = std::map<Key, Type, Comp, Eigen::aligned_allocator<std::pair<const Key, Type> > >;
00023 
00024     // Sepcial STL map where the type is 16byte aligned
00025     template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> >
00026     using StdUMapAligned = std::unordered_map<Key, Type, Hash, Pred, Eigen::aligned_allocator<std::pair<const Key, Type> > >;
00027 
00028      // Special STL vectors where the type is 16byte aligned
00029     template<typename Type >
00030     using StdVecAligned = std::vector<Type, Eigen::aligned_allocator<Type> >;
00031 
00032 }
00033 }
00034 
00038 #define ApproxMVBB_DEFINE_CONTAINER_TYPES \
00039    \
00040    template<typename Key, typename Type, typename Comp = std::less<Key> > \
00041    using StdMapAligned = ApproxMVBB::MyContainers::StdMapAligned<Key, Type, Comp >; \
00042    \
00043    template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> > \
00044    using StdUMapAligned =  ApproxMVBB::MyContainers::StdUMapAligned<Key, Type, Hash,Pred >; \
00045    \
00046    template<typename Type > \
00047    using StdVecAligned =  ApproxMVBB::MyContainers::StdVecAligned< Type >;
00048 
00049 #endif


asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Sat Jun 8 2019 20:21:49