Implements map and ref for both static & dynamic mode

See merge request oss/rotgen!12
This commit is contained in:
Joel Falcou 2025-08-13 17:43:57 +02:00
parent aacae1cbb1
commit 6c2b260229
58 changed files with 4121 additions and 1205 deletions

View file

@ -8,6 +8,7 @@
#define TTS_MAIN
#define TTS_CUSTOM_DRIVER_FUNCTION rotgen_main
#include "tts.hpp"
#include "unit/common/references.hpp"
#include <rotgen/detail/static_info.hpp>
#include <rotgen/config.hpp>
#include <rotgen/concepts.hpp>
@ -25,30 +26,6 @@ namespace rotgen::tests
, tts::types<float ,constant<RowMajor>>
, tts::types<double,constant<RowMajor>>
>;
struct matrix_descriptor
{
rotgen::Index rows, cols;
std::function<double(std::size_t,std::size_t)> init_fn;
};
template<typename MatrixType>
struct matrix_block_test_case
{
rotgen::Index rows, cols;
std::function<typename MatrixType::scalar_type(std::size_t, rotgen::Index)> init_fn;
rotgen::Index i0, j0, ni, nj;
};
template<typename MatrixType, rotgen::Index NI, rotgen::Index NJ>
struct static_matrix_block_test_case
{
rotgen::Index rows, cols;
std::function<typename MatrixType::scalar_type(std::size_t, rotgen::Index)> init_fn;
static constexpr rotgen::Index ni = NI;
static constexpr rotgen::Index nj = NJ;
rotgen::Index i0, j0;
};
}
#include <iostream>
@ -56,7 +33,8 @@ namespace rotgen::tests
template<typename T>
constexpr bool verify_rotgen_reentrance(T const&)
{
return rotgen::concepts::entity<T>;
if constexpr(rotgen::use_expression_templates) return true;
else return rotgen::concepts::entity<T>;
}
int main(int argc, char const **argv)