Skip to content

Commit

Permalink
replaceSumInto tests: initialize bool atomic_ member
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Kelley <[email protected]>
  • Loading branch information
brian-kelley committed Nov 6, 2024
1 parent 34ad45e commit a6a6c19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions sparse/unit_test/Test_Sparse_replaceSumInto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
#include <gtest/gtest.h>
#include "KokkosSparse_CrsMatrix.hpp"

// #ifndef kokkos_complex_double
// #define kokkos_complex_double Kokkos::complex<double>
// #define kokkos_complex_float Kokkos::complex<float>
// #endif

typedef Kokkos::complex<double> kokkos_complex_double;
typedef Kokkos::complex<float> kokkos_complex_float;

Expand All @@ -40,8 +35,8 @@ class ModifyEvenNumberedRows {
typedef typename CrsMatrixType::ordinal_type ordinal_type;
typedef typename CrsMatrixType::value_type value_type;

ModifyEvenNumberedRows(const CrsMatrixType& A, const bool replace, const bool sorted, const bool /*atomic*/)
: A_(A), replace_(replace), sorted_(sorted) {}
ModifyEvenNumberedRows(const CrsMatrixType& A, const bool replace, const bool sorted, const bool atomic)
: A_(A), replace_(replace), sorted_(sorted), atomic_(atomic) {}

KOKKOS_FUNCTION void operator()(const ordinal_type& lclRow) const {
if (lclRow % static_cast<ordinal_type>(2) == 0) {
Expand Down
4 changes: 2 additions & 2 deletions sparse/unit_test/Test_Sparse_replaceSumIntoLonger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class ModifyEntries {
// The type of the reduction result.
typedef ordinal_type value_type;

ModifyEntries(const CrsMatrixType& A, const bool replace, const bool sorted, const bool /*atomic*/)
: A_(A), replace_(replace), sorted_(sorted) {}
ModifyEntries(const CrsMatrixType& A, const bool replace, const bool sorted, const bool atomic)
: A_(A), replace_(replace), sorted_(sorted), atomic_(atomic) {}

KOKKOS_FUNCTION void operator()(const ordinal_type& lclRow, ordinal_type& numModified) const {
typedef Kokkos::ArithTraits<scalar_type> KAT;
Expand Down

0 comments on commit a6a6c19

Please sign in to comment.