8000 Fix test casting error (#826) · oneapi-src/distributed-ranges@9329ff9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9329ff9

Browse files
authored
Fix test casting error (#826)
1 parent 10f8b32 commit 9329ff9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/gtest/sp/gemv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ TEST(SparseMatrix, ZeroVector) {
6969
std::vector<std::pair<std::pair<I, I>, T>> base;
7070
for (int i = 0; i < m; i++) {
7171
for (int j = 0; j < k; j++) {
72-
base.push_back({{i, j}, i + j});
72+
base.push_back({{i, j}, static_cast<float>(i + j)});
7373
}
7474
}
7575

test/gtest/sp/sparse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TEST(SparseMatrix, IterationForward) {
1111
std::vector<std::pair<std::pair<I, I>, T>> base;
1212
for (int i = 0; i < m; i++) {
1313
for (int j = 0; j < k; j++) {
14-
base.push_back({{i, j}, i + j});
14+
base.push_back({{i, j}, static_cast<float>(i + j)});
1515
}
1616
}
1717
std::vector<std::pair<std::pair<I, I>, T>> reference(base.size());
@@ -43,7 +43,7 @@ TEST(SparseMatrix, IterationReverse) {
4343
std::vector<std::pair<std::pair<I, I>, T>> base;
4444
for (int i = 0; i < m; i++) {
4545
for (int j = 0; j < k; j++) {
46-
base.push_back({{i, j}, i + j});
46+
base.push_back({{i, j}, static_cast<float>(i + j)});
4747
}
4848
}
4949
std::vector<std::pair<std::pair<I, I>, T>> reference(base.size());

0 commit comments

Comments
 (0)
0