115 lines
3.7 KiB
C++
115 lines
3.7 KiB
C++
//==================================================================================================
|
|
/*
|
|
ROTGEN - Runtime Overlay for Eigen
|
|
Copyright : CODE RECKONS
|
|
SPDX-License-Identifier: BSL-1.0
|
|
*/
|
|
//==================================================================================================
|
|
#pragma once
|
|
|
|
#include <rotgen/detail/generators.hpp>
|
|
#include <rotgen/impl/matrix.hpp>
|
|
#include <rotgen/common/strides.hpp>
|
|
#include <initializer_list>
|
|
#include <cstddef>
|
|
#include <memory>
|
|
|
|
namespace rotgen
|
|
{
|
|
#define USE_CONST
|
|
#define CONST const
|
|
#define SIZE 64
|
|
#define TYPE double
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_col)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_row)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#undef SIZE
|
|
#undef TYPE
|
|
|
|
#define SIZE 32
|
|
#define TYPE float
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_col)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_row)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#undef SIZE
|
|
#undef TYPE
|
|
#undef CONST
|
|
#undef USE_CONST
|
|
|
|
#define SIZE 64
|
|
#define TYPE double
|
|
#define CONST
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_impl,SIZE,_col)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_impl,SIZE,_row)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#undef SIZE
|
|
#undef TYPE
|
|
|
|
#define SIZE 32
|
|
#define TYPE float
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_impl,SIZE,_col)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#define CLASSNAME ROTGEN_MATRIX_NAME(map_impl,SIZE,_row)
|
|
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
|
#include <rotgen/impl/map_model.hpp>
|
|
#undef CLASSNAME
|
|
#undef SOURCENAME
|
|
|
|
#undef SIZE
|
|
#undef TYPE
|
|
#undef CONST
|
|
|
|
template<typename Scalar,int Options, bool isConst> struct find_map_impl;
|
|
|
|
template<> struct find_map_impl<float , ColMajor, true> { using type = map_const_impl32_col; };
|
|
template<> struct find_map_impl<float , RowMajor, true> { using type = map_const_impl32_row; };
|
|
template<> struct find_map_impl<double, ColMajor, true> { using type = map_const_impl64_col; };
|
|
template<> struct find_map_impl<double, RowMajor, true> { using type = map_const_impl64_row; };
|
|
template<> struct find_map_impl<float , ColMajor, false> { using type = map_impl32_col; };
|
|
template<> struct find_map_impl<float , RowMajor, false> { using type = map_impl32_row; };
|
|
template<> struct find_map_impl<double, ColMajor, false> { using type = map_impl64_col; };
|
|
template<> struct find_map_impl<double, RowMajor, false> { using type = map_impl64_row; };
|
|
|
|
template<typename Ref>
|
|
using find_map = typename find_map_impl < typename std::remove_const_t<Ref>::value_type
|
|
, Ref::storage_order
|
|
, std::is_const_v<Ref>
|
|
>::type;
|
|
}
|
|
|
|
#include <rotgen/impl/map_operators.hpp>
|