Adding clang-format configuration file and formatting all source files
Co-authored-by: Jules Pénuchot <jules@penuchot.com> Co-authored-by: Joel FALCOU <jfalcou@codereckons.com> See merge request oss/rotgen!41
This commit is contained in:
parent
e92e824a18
commit
648dd768ee
94 changed files with 6778 additions and 4722 deletions
|
|
@ -8,40 +8,46 @@
|
|||
#include "unit/tests.hpp"
|
||||
#include <rotgen/rotgen.hpp>
|
||||
|
||||
TTS_CASE_TPL("noalias behavior - dynamicallly sized", rotgen::tests::types)
|
||||
<typename T, typename O>( tts::type< tts::types<T,O>> )
|
||||
TTS_CASE_TPL("noalias behavior - dynamicallly sized",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
{
|
||||
rotgen::matrix<T,rotgen::Dynamic,rotgen::Dynamic,O::value> a{{1,2},{3,4}};
|
||||
rotgen::matrix<T,rotgen::Dynamic,rotgen::Dynamic,O::value> ref{{7,10},{15,22}};
|
||||
rotgen::matrix<T,rotgen::Dynamic,rotgen::Dynamic,O::value> b(2,2),c(2,2),d(2,2);
|
||||
rotgen::matrix<T, rotgen::Dynamic, rotgen::Dynamic, O::value> a{{1, 2},
|
||||
{3, 4}};
|
||||
rotgen::matrix<T, rotgen::Dynamic, rotgen::Dynamic, O::value> ref{{7, 10},
|
||||
{15, 22}};
|
||||
rotgen::matrix<T, rotgen::Dynamic, rotgen::Dynamic, O::value> b(2, 2),
|
||||
c(2, 2), d(2, 2);
|
||||
|
||||
rotgen::noalias(b) = a * a;
|
||||
TTS_EQUAL(b, ref);
|
||||
|
||||
auto e = rotgen::extract(c,0,0,2,2);
|
||||
auto e = rotgen::extract(c, 0, 0, 2, 2);
|
||||
rotgen::noalias(e) = a * a;
|
||||
TTS_EQUAL(c, ref);
|
||||
|
||||
rotgen::map<rotgen::matrix<T,rotgen::Dynamic,rotgen::Dynamic,O::value>> m(d.data(),2,2);
|
||||
rotgen::map<rotgen::matrix<T, rotgen::Dynamic, rotgen::Dynamic, O::value>> m(
|
||||
d.data(), 2, 2);
|
||||
rotgen::noalias(m) = a * a;
|
||||
TTS_EQUAL(m, ref);
|
||||
};
|
||||
|
||||
TTS_CASE_TPL("noalias behavior - statically sized", rotgen::tests::types)
|
||||
<typename T, typename O>( tts::type< tts::types<T,O>> )
|
||||
TTS_CASE_TPL("noalias behavior - statically sized",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
{
|
||||
rotgen::matrix<T,2,2,O::value> a{{1,2},{3,4}};
|
||||
rotgen::matrix<T,2,2,O::value> ref{{7,10},{15,22}};
|
||||
rotgen::matrix<T,2,2,O::value> b,c,d;
|
||||
rotgen::matrix<T, 2, 2, O::value> a{{1, 2}, {3, 4}};
|
||||
rotgen::matrix<T, 2, 2, O::value> ref{{7, 10}, {15, 22}};
|
||||
rotgen::matrix<T, 2, 2, O::value> b, c, d;
|
||||
|
||||
rotgen::noalias(b) = a * a;
|
||||
TTS_EQUAL(b, ref);
|
||||
|
||||
auto e = rotgen::extract(c,0,0,2,2);
|
||||
auto e = rotgen::extract(c, 0, 0, 2, 2);
|
||||
rotgen::noalias(e) = a * a;
|
||||
TTS_EQUAL(c, ref);
|
||||
|
||||
rotgen::map<rotgen::matrix<T,2,2,O::value>> m(d.data());
|
||||
rotgen::map<rotgen::matrix<T, 2, 2, O::value>> m(d.data());
|
||||
rotgen::noalias(m) = a * a;
|
||||
TTS_EQUAL(m, ref);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue