parent
3313e257c8
commit
ddf8816c5b
12 changed files with 165 additions and 46 deletions
|
|
@ -61,4 +61,36 @@ TTS_CASE_TPL("Test static matrix reduction-like operations", rotgen::tests::type
|
|||
};
|
||||
|
||||
std::apply([&](auto const&... d) { (process(d),...);}, cases);
|
||||
};
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
|
||||
{
|
||||
auto a = rotgen::setConstant<rotgen::matrix<T,rotgen::Dynamic,1>>(8,1,2);
|
||||
auto b = rotgen::setConstant<rotgen::matrix<T,rotgen::Dynamic,1>>(8,1,2);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
|
||||
{
|
||||
auto a = rotgen::setConstant<rotgen::matrix<T,1,8>>(2);
|
||||
auto b = rotgen::setConstant<rotgen::matrix<T,1,8>>(2);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
|
||||
{
|
||||
auto a = rotgen::setConstant<rotgen::matrix<T,8,1>>(2);
|
||||
auto b = rotgen::setConstant<rotgen::matrix<T,8,1>>(2);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue