Co-authored-by: Karen <kkaspar@codereckons.com> Co-authored-by: Joel FALCOU <jfalcou@codereckons.com> See merge request oss/rotgen!9
49 lines
No EOL
1.6 KiB
C++
49 lines
No EOL
1.6 KiB
C++
//==================================================================================================
|
|
/*
|
|
ROTGEN - Runtime Overlay for Eigen
|
|
Copyright : CODE RECKONS
|
|
SPDX-License-Identifier: BSL-1.0
|
|
*/
|
|
//==================================================================================================
|
|
#define TTS_MAIN
|
|
#include "tts.hpp"
|
|
#include <rotgen/detail/static_info.hpp>
|
|
#include <functional>
|
|
|
|
namespace rotgen::tests
|
|
{
|
|
template<auto N> struct constant { static constexpr auto value = N; };
|
|
|
|
using scalar = tts::types<float,double>;
|
|
using order = tts::types<constant<ColMajor>,constant<RowMajor>>;
|
|
|
|
using types = tts::types< tts::types<float ,constant<ColMajor>>
|
|
, tts::types<double,constant<ColMajor>>
|
|
, tts::types<float ,constant<RowMajor>>
|
|
, tts::types<double,constant<RowMajor>>
|
|
>;
|
|
|
|
struct matrix_descriptor
|
|
{
|
|
std::size_t rows, cols;
|
|
std::function<double(std::size_t,std::size_t)> init_fn;
|
|
};
|
|
|
|
template<typename MatrixType>
|
|
struct matrix_block_test_case
|
|
{
|
|
std::size_t rows, cols;
|
|
std::function<typename MatrixType::scalar_type(std::size_t, std::size_t)> init_fn;
|
|
std::size_t i0, j0, ni, nj;
|
|
};
|
|
|
|
template<typename MatrixType, std::size_t NI, std::size_t NJ>
|
|
struct static_matrix_block_test_case
|
|
{
|
|
std::size_t rows, cols;
|
|
std::function<typename MatrixType::scalar_type(std::size_t, std::size_t)> init_fn;
|
|
static constexpr std::size_t ni = NI;
|
|
static constexpr std::size_t nj = NJ;
|
|
std::size_t i0, j0;
|
|
};
|
|
} |