rotgen/include/rotgen/container/matrix/dynamic/impl.hpp
Jules Pénuchot 648dd768ee Adding clang-format configuration file and formatting all source files
Co-authored-by: Jules Pénuchot <jules@penuchot.com>
Co-authored-by: Joel FALCOU <jfalcou@codereckons.com>

See merge request oss/rotgen!41
2025-10-14 16:19:03 +02:00

84 lines
2.2 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/format/dynamic.hpp>
#include <rotgen/config.hpp>
#include <initializer_list>
#include <cstddef>
#include <memory>
namespace rotgen
{
class matrix_impl64_row;
class matrix_impl64_col;
class matrix_impl32_row;
class matrix_impl32_col;
#define SIZE 64
#define TYPE double
#define CLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _col)
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _row)
#include <rotgen/container/matrix/dynamic/model.hpp>
#undef CLASSNAME
#undef TRANSCLASSNAME
#define CLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _row)
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _col)
#include <rotgen/container/matrix/dynamic/model.hpp>
#undef CLASSNAME
#undef TRANSCLASSNAME
#undef SIZE
#undef TYPE
#define SIZE 32
#define TYPE float
#define CLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _col)
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _row)
#include <rotgen/container/matrix/dynamic/model.hpp>
#undef CLASSNAME
#undef TRANSCLASSNAME
#define CLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _row)
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(matrix_impl, SIZE, _col)
#include <rotgen/container/matrix/dynamic/model.hpp>
#undef CLASSNAME
#undef TRANSCLASSNAME
#undef SIZE
#undef TYPE
template<typename Scalar, int Options> struct find_matrix_impl;
template<> struct find_matrix_impl<float, ColMajor>
{
using type = matrix_impl32_col;
};
template<> struct find_matrix_impl<float, RowMajor>
{
using type = matrix_impl32_row;
};
template<> struct find_matrix_impl<double, ColMajor>
{
using type = matrix_impl64_col;
};
template<> struct find_matrix_impl<double, RowMajor>
{
using type = matrix_impl64_row;
};
template<typename Scalar, int Options>
using find_matrix = typename find_matrix_impl<Scalar, (Options & 1)>::type;
}