Skip to content

Commit 39ae497

Browse files
committed
fixes tests
1 parent 7d52f8c commit 39ae497

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

core/matrix/dense.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ void row_scatter_impl(const IndexContainer* row_idxs,
11691169
GKO_ASSERT_EQUAL_DIMENSIONS(expected_dim, orig);
11701170
GKO_ASSERT_EQUAL_COLS(orig, target);
11711171

1172-
bool invalid_access;
1172+
bool invalid_access = false;
11731173

11741174
exec->run(dense::make_row_scatter(
11751175
make_temporary_clone(exec, row_idxs).get(), orig,

dpcpp/matrix/dense_kernels.dp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ void row_scatter(std::shared_ptr<const DefaultExecutor> exec,
654654
const matrix::Dense<ValueType>* orig,
655655
matrix::Dense<OutputType>* target, bool& invalid_access)
656656
{
657-
array<bool> invalid_access_arr;
657+
array<bool> invalid_access_arr{exec, {false}};
658658

659659
kernel::row_scatter_impl(exec, row_idxs, orig, target,
660660
invalid_access_arr.get_data());

include/ginkgo/core/matrix/dense.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ class Dense
546546
/**
547547
* Copies this matrix into the given rows of the target matrix.
548548
*
549-
* @tparam IndexType the index type, either int32 or int 64
549+
* @tparam IndexType the index type, either int32 or int64
550550
*
551551
* @param scatter_indices row indices of the target matrix. It must
552552
* have the same number of indices as rows in
@@ -566,7 +566,7 @@ class Dense
566566
/**
567567
* Copies this matrix into the given rows of the target matrix.
568568
*
569-
* @tparam IndexType the index type, either int32 or int 64
569+
* @tparam IndexType the index type, either int32 or int64
570570
*
571571
* @param scatter_indices row indices of the target matrix. It must
572572
* have the same number of indices as rows in

test/matrix/dense_kernels.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class Dense : public CommonTestFixture {
161161
rgather_idxs =
162162
std::unique_ptr<Arr>(new Arr{ref, tmp3.begin(), tmp3.end()});
163163
rscatter_idxs = std::unique_ptr<Arr>(
164-
new Arr{ref, tmp2.begin(), tmp2.begin() + u->get_size()[0]});
164+
new Arr{ref, tmp.begin(), tmp.begin() + u->get_size()[0]});
165165
rscatter_idxs_sub = std::unique_ptr<Arr>(
166166
new Arr{ref, tmp4.begin(), tmp4.begin() + u->get_size()[0]});
167167
}

0 commit comments

Comments
 (0)