Skip to content

Commit

Permalink
Fix error outputs from MSVC build
Browse files Browse the repository at this point in the history
  • Loading branch information
ldh4 committed Oct 4, 2024
1 parent 4f3871c commit 6c7b30e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions simd/unit_tests/include/TestSIMD_ShiftOps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ inline void host_check_shift_on_one_loader(ShiftOp shift_op,
shift_op.on_host(value, static_cast<int>(shift_by[i]));
EXPECT_EQ(value, value);
}
loader.host_load(test_vals, width, simd_vals);
simd_type const computed_result =
shift_op.on_host(simd_vals, static_cast<int>(shift_by[i]));
host_check_equality(expected_result, computed_result, width);
Expand All @@ -70,7 +69,6 @@ inline void host_check_shift_by_lanes_on_one_loader(
shift_op.on_host(value, static_cast<int>(shift_by[lane]));
EXPECT_EQ(value, value);
}
loader.host_load(test_vals, width, simd_vals);
simd_type const computed_result = shift_op.on_host(simd_vals, shift_by);
host_check_equality(expected_result, computed_result, width);
}
Expand Down Expand Up @@ -174,10 +172,10 @@ KOKKOS_INLINE_FUNCTION void device_check_shift_on_one_loader(
simd_type expected_result;

for (std::size_t lane = 0; lane < width; ++lane) {
expected_result[lane] = shift_op.on_device(DataType(simd_vals[lane]),
static_cast<int>(shift_by[i]));
DataType value = simd_vals[lane];
expected_result[lane] =
shift_op.on_device(value, static_cast<int>(shift_by[i]));
}

simd_type const computed_result =
shift_op.on_device(simd_vals, static_cast<int>(shift_by[i]));
device_check_equality(expected_result, computed_result, width);
Expand All @@ -197,8 +195,9 @@ KOKKOS_INLINE_FUNCTION void device_check_shift_by_lanes_on_one_loader(
simd_type expected_result;

for (std::size_t lane = 0; lane < width; ++lane) {
expected_result[lane] = shift_op.on_device(
DataType(simd_vals[lane]), static_cast<int>(shift_by[lane]));
DataType value = simd_vals[lane];
expected_result[lane] =
shift_op.on_device(value, static_cast<int>(shift_by[lane]));
}
simd_type const computed_result = shift_op.on_device(simd_vals, shift_by);
device_check_equality(expected_result, computed_result, width);
Expand Down

0 comments on commit 6c7b30e

Please sign in to comment.