Squashed feature branch:
* Added CUDA support * Performance improvements * API improvements * Added "depth" parameter to GEMM * Android cross-compilation
This commit is contained in:
41
include/isaac/tools/make_map.hpp
Normal file
41
include/isaac/tools/make_map.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef ISAAC_TOOLS_MAKE_MAP_HPP
|
||||
#define ISAAC_TOOLD_MAKE_MAP_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace isaac
|
||||
{
|
||||
|
||||
namespace tools
|
||||
{
|
||||
|
||||
template<typename MapT>
|
||||
class make_map
|
||||
{
|
||||
typedef typename MapT::key_type T;
|
||||
typedef typename MapT::mapped_type U;
|
||||
public:
|
||||
make_map(const T& key, const U& val)
|
||||
{
|
||||
map_.insert(std::make_pair(key,val));
|
||||
}
|
||||
|
||||
make_map<MapT>& operator()(const T& key, const U& val)
|
||||
{
|
||||
map_.insert(std::make_pair(key,val));
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator MapT()
|
||||
{
|
||||
return map_;
|
||||
}
|
||||
private:
|
||||
MapT map_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user