Resolve "[API-#2] Pseudo-privatization of rotgen entity member functions"
Closes #18 Co-authored-by: Jules Pénuchot <jules@penuchot.com> See merge request oss/rotgen!50
This commit is contained in:
parent
6489697c05
commit
e151e136d6
52 changed files with 2212 additions and 1556 deletions
|
|
@ -13,8 +13,9 @@
|
|||
#include "unit/tests.hpp"
|
||||
|
||||
TTS_CASE_TPL("Test dynamic matrix transposition-like operations",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
rotgen::tests::types)
|
||||
|
||||
<typename T, typename O>(tts::type<tts::types<T, O>>)
|
||||
{
|
||||
auto const cases = rotgen::tests::generate_matrix_references();
|
||||
for (auto const& [rows, cols, fn] : cases)
|
||||
|
|
@ -27,14 +28,15 @@ TTS_CASE_TPL("Test dynamic matrix transposition-like operations",
|
|||
};
|
||||
|
||||
TTS_CASE_TPL("Test static matrix transposition-like operations",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
rotgen::tests::types)
|
||||
|
||||
<typename T, typename O>(tts::type<tts::types<T, O>>)
|
||||
{
|
||||
auto const cases = rotgen::tests::generate_static_matrix_references();
|
||||
|
||||
auto process = []<typename D>(D const& desc) {
|
||||
rotgen::matrix<T, D::rows, D::cols, O::value> input;
|
||||
rotgen::tests::prepare(input.rows(), input.cols(), desc.init_fn, input);
|
||||
rotgen::tests::prepare(rows(input), cols(input), desc.init_fn, input);
|
||||
rotgen::tests::check_shape_functions(input);
|
||||
};
|
||||
|
||||
|
|
@ -42,8 +44,9 @@ TTS_CASE_TPL("Test static matrix transposition-like operations",
|
|||
};
|
||||
|
||||
TTS_CASE_TPL("Test dynamic matrix reduction-like operations",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
rotgen::tests::types)
|
||||
|
||||
<typename T, typename O>(tts::type<tts::types<T, O>>)
|
||||
{
|
||||
auto const cases = rotgen::tests::generate_matrix_references();
|
||||
for (auto const& [rows, cols, fn] : cases)
|
||||
|
|
@ -56,21 +59,23 @@ TTS_CASE_TPL("Test dynamic matrix reduction-like operations",
|
|||
};
|
||||
|
||||
TTS_CASE_TPL("Test static matrix reduction-like operations",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
rotgen::tests::types)
|
||||
|
||||
<typename T, typename O>(tts::type<tts::types<T, O>>)
|
||||
{
|
||||
auto const cases = rotgen::tests::generate_static_matrix_references();
|
||||
|
||||
auto process = []<typename D>(D const& desc) {
|
||||
rotgen::matrix<T, D::rows, D::cols, O::value> input;
|
||||
rotgen::tests::prepare(input.rows(), input.cols(), desc.init_fn, input);
|
||||
rotgen::tests::prepare(rows(input), cols(input), desc.init_fn, input);
|
||||
rotgen::tests::check_reduction_functions(input);
|
||||
};
|
||||
|
||||
std::apply([&](auto const&... d) { (process(d), ...); }, cases);
|
||||
};
|
||||
|
||||
TTS_CASE_TPL("Test dot product", float, double)<typename T>(tts::type<T>){
|
||||
TTS_CASE_TPL("Test dot product", float, double)
|
||||
<typename T>(tts::type<T>){
|
||||
{auto a = rotgen::setConstant<rotgen::matrix<T, 1, rotgen::Dynamic>>(1, 8, 2);
|
||||
auto b = rotgen::setConstant<rotgen::matrix<T, 1, rotgen::Dynamic>>(1, 8, 2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue