Skip to content

Commit

Permalink
make sure that DistArray of (non-async) lazy tiles can be reduced
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Oct 30, 2024
1 parent 486ae16 commit 63d3201
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/expressions_mixed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ BOOST_AUTO_TEST_CASE(mult_factories) {
// BOOST_CHECK_NO_THROW(w("a,b") = u("a,b") * v("a,b"));
}

BOOST_AUTO_TEST_CASE(reduction_factories) {
BOOST_CHECK_NO_THROW(v("a,b").norm());
}

BOOST_AUTO_TEST_CASE(kronecker) {
#if !MULT_DENSE_SPARSE_TO_SPARSE
// ok
Expand Down
4 changes: 3 additions & 1 deletion tests/sparse_tile.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,9 @@ typename EigenSparseTile<T, TagType>::numeric_type product(
// foreach(i) result += arg[i] * arg[i]
template <typename T, typename TagType>
typename EigenSparseTile<T, TagType>::numeric_type squared_norm(
const EigenSparseTile<T, TagType>& arg);
const EigenSparseTile<T, TagType>& arg) {
return arg.matrix().squaredNorm();
}
// sqrt(squared_norm(arg))
template <typename T, typename TagType>
typename EigenSparseTile<T, TagType>::numeric_type norm(
Expand Down

0 comments on commit 63d3201

Please sign in to comment.