Commit 5b5ffb2f authored by Jö Fahlke's avatar Jö Fahlke

Do not access indeterminate values using lane.

See core/dune-common!519.
parent 19066694
......@@ -317,7 +317,7 @@ namespace Dune {
namespace MathOverloads {
template<class Vec, typename = std::enable_if_t<Simd::VectorclassImpl::IsVector<Vec>::value>>
auto isNaN(const Vec &v , PriorityTag<3>, ADLTag) {
Simd::Mask<Vec> out;
Simd::Mask<Vec> out{false};
for(auto l : range(Simd::lanes(v)))
Simd::lane(l, out) = Dune::isNaN(Simd::lane(l, v));
return out;
......@@ -325,7 +325,7 @@ namespace Dune {
template<class Vec, typename = std::enable_if_t<Simd::VectorclassImpl::IsVector<Vec>::value>>
auto isInf(const Vec &v , PriorityTag<3>, ADLTag) {
Simd::Mask<Vec> out;
Simd::Mask<Vec> out{false};
for(auto l : range(Simd::lanes(v)))
Simd::lane(l, out) = Dune::isInf(Simd::lane(l, v));
return out;
......@@ -333,7 +333,7 @@ namespace Dune {
template<class Vec, typename = std::enable_if_t<Simd::VectorclassImpl::IsVector<Vec>::value>>
auto isFinite(const Vec &v , PriorityTag<3>, ADLTag) {
Simd::Mask<Vec> out;
Simd::Mask<Vec> out{false};
for(auto l : range(Simd::lanes(v)))
Simd::lane(l, out) = Dune::isFinite(Simd::lane(l, v));
return out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment