Skip to content

Commit 268df04

Browse files
committed
try again
1 parent c5a6622 commit 268df04

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

cpp/include/raft/core/bitset.cuh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ void bitset<bitset_t, index_t>::resize(const raft::resources& res,
234234
// If the new size is larger, set the new bits to the default value
235235
auto new_elements_view = raft::make_device_vector_view<bitset_t, index_t>(
236236
bitset_.data() + old_size, new_size - old_size);
237-
raft::linalg::map(
238-
res,
239-
new_elements_view,
240-
raft::const_op<bitset_t>{default_value ? bitset_t{~bitset_t{0}} : bitset_t{0}});
237+
raft::linalg::map(res,
238+
new_elements_view,
239+
raft::const_op<bitset_t>{default_value ? static_cast<bitset_t>(-1)
240+
: static_cast<bitset_t>(0)});
241241
}
242242
}
243243

@@ -293,9 +293,10 @@ template <typename bitset_t, typename index_t>
293293
void bitset<bitset_t, index_t>::reset(const raft::resources& res, bool default_value)
294294
{
295295
auto bitset_view = raft::make_device_vector_view<bitset_t, index_t>(bitset_.data(), n_elements());
296-
raft::linalg::map(res,
297-
bitset_view,
298-
raft::const_op<bitset_t>{default_value ? bitset_t{~bitset_t{0}} : bitset_t{0}});
296+
raft::linalg::map(
297+
res,
298+
bitset_view,
299+
raft::const_op<bitset_t>{default_value ? static_cast<bitset_t>(-1) : static_cast<bitset_t>(0)});
299300
}
300301

301302
template <typename bitset_t, typename index_t>

0 commit comments

Comments
 (0)