Skip to content

Commit

Permalink
Fixed C-style casts
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Grützmacher <thomas.gruetzmacher@kit.edu>
  • Loading branch information
Slaedr and Thomas Grützmacher committed Mar 28, 2021
1 parent 7669264 commit b2ea21f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/matrix/fbcsr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ void Fbcsr<ValueType, IndexType>::read(const mat_data &data)
const index_type num_brows = detail::get_num_blocks(bs, data.size[0]);

acc::range<acc::block_col_major<value_type, 3>> values(
std::array<size_type, 3>{blocks.size(), (size_type)bs, (size_type)bs},
std::array<size_type, 3>{blocks.size(), static_cast<size_type>(bs),
static_cast<size_type>(bs)},
tmp->values_.get_data());

for (auto it = blocks.begin(); it != blocks.end(); it++) {
Expand Down
4 changes: 3 additions & 1 deletion reference/matrix/fbcsr_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ void spmv(const std::shared_ptr<const ReferenceExecutor>,
auto col_idxs = a->get_const_col_idxs();
auto vals = a->get_const_values();
const acc::range<acc::block_col_major<const ValueType, 3>> avalues{
std::array<size_type, 3>{nbnz, (size_type)bs, (size_type)bs}, vals};
std::array<size_type, 3>{nbnz, static_cast<size_type>(bs),
static_cast<size_type>(bs)},
vals};

for (IndexType ibrow = 0; ibrow < nbrows; ++ibrow) {
for (IndexType i = ibrow * bs * nvecs; i < (ibrow + 1) * bs * nvecs;
Expand Down

0 comments on commit b2ea21f

Please sign in to comment.