Skip to content
Snippets Groups Projects
Commit 7662149d authored by Jö Fahlke's avatar Jö Fahlke
Browse files

[AlignedNumber] Run the SIMD testsuite.

Also run the simd testsuite on AlignedNumber, sind it does provide a SIMD
abstraction.

Also fixes one issue with that abstraction (though I do not recall why exactly
I did not allow `const Scalar<T> &lane(T &&)`, but required the return type to
be one of `Scalar<T>` or `Scalar<T>&&`).
parent 463250d2
Branches
Tags
1 merge request!511[AlignedNumber] Run the SIMD testsuite.
Pipeline #
......@@ -460,7 +460,7 @@ namespace Dune {
}
template<class T, std::size_t align>
const T& lane(ADLTag<5>, std::size_t l, const AlignedNumber<T, align> &v)
T lane(ADLTag<5>, std::size_t l, const AlignedNumber<T, align> &v)
{
assert(l == 0);
return v.value();
......
......@@ -77,6 +77,10 @@ dune_add_test(SOURCES debugaligntest.cc
LINK_LIBRARIES dunecommon
LABELS quick)
dune_add_test(SOURCES debugalignsimdtest.cc
LINK_LIBRARIES dunecommon
LABELS quick)
dune_add_test(SOURCES densematrixassignmenttest.cc
LINK_LIBRARIES dunecommon
LABELS quick)
......
#include <config.h>
#include <cstdlib>
#include <dune/common/debugalign.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/simd/test.hh>
int main(int argc, char **argv)
{
Dune::MPIHelper::instance(argc, argv);
Dune::Simd::UnitTest test;
test.checkVector<Dune::AlignedNumber<double> >();
return test.good() ? EXIT_SUCCESS : EXIT_FAILURE;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment