parent
3313e257c8
commit
ddf8816c5b
12 changed files with 165 additions and 46 deletions
|
|
@ -72,3 +72,41 @@ TTS_CASE_TPL("Test static block reduction-like operations", rotgen::tests::types
|
|||
|
||||
std::apply([&](auto const&... d) { (process(d),...);}, cases);
|
||||
};
|
||||
|
||||
|
||||
|
||||
TTS_CASE_TPL("Test dot product", float, double)
|
||||
<typename T>( tts::type<T> )
|
||||
{
|
||||
{
|
||||
auto v = rotgen::setConstant<rotgen::matrix<T,1,rotgen::Dynamic>>(1,16,2);
|
||||
auto a = rotgen::head(v,8);
|
||||
auto b = rotgen::tail(v,8);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
|
||||
{
|
||||
auto v = rotgen::setConstant<rotgen::matrix<T,rotgen::Dynamic,1>>(16,1,2);
|
||||
auto a = rotgen::head(v,8);
|
||||
auto b = rotgen::tail(v,8);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
|
||||
{
|
||||
auto v = rotgen::setConstant<rotgen::matrix<T,1,rotgen::Dynamic>>(1,16,2);
|
||||
auto a = rotgen::head<8>(v);
|
||||
auto b = rotgen::tail<8>(v);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
|
||||
{
|
||||
auto v = rotgen::setConstant<rotgen::matrix<T,rotgen::Dynamic,1>>(16,1,2);
|
||||
auto a = rotgen::head<8>(v);
|
||||
auto b = rotgen::tail<8>(v);
|
||||
|
||||
TTS_EQUAL(rotgen::dot(a,b), 32);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue