Skip to content

Commit

Permalink
Fix mdr error control issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JieyangChen7 committed Nov 15, 2024
1 parent 011fc99 commit 523203f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions include/mgard-x/MDR-X/BitplaneEncoder/GroupedBPEncoderGPU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class GroupedEncoderFunctor : public Functor<DeviceType> {
if (local_bitplane_idx < num_bitplanes + 1) {
sm_errors[local_bitplane_idx] = 0;
}

if (local_data_idx < num_elems_per_TB) {
sm_fix_point[local_data_idx] = 0;
sm_shifted[local_data_idx] = 0;
}
}

MGARDX_EXEC void Operation2() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ template <> class DeviceCollective<OPENMP> {
bool workspace_allocated, int queue_idx) {

if (workspace_allocated) {
*result((IDX)0) = std::accumulate(v((IDX)0), v((IDX)n), 0);
*result((IDX)0) = std::accumulate(v((IDX)0), v((IDX)n), (T)0);
} else {
workspace.resize({(SIZE)1}, queue_idx);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ template <> class DeviceCollective<SERIAL> {
bool workspace_allocated, int queue_idx) {

if (workspace_allocated) {
*result((IDX)0) = std::accumulate(v((IDX)0), v((IDX)n), 0);
*result((IDX)0) = std::accumulate(v((IDX)0), v((IDX)n), (T)0);
} else {
workspace.resize({(SIZE)1}, queue_idx);
}
Expand Down

0 comments on commit 523203f

Please sign in to comment.