Skip to content

Commit d62d3c4

Browse files
authored
Fix atomic stores for 16-bit types (AdaptiveCpp#1881)
1 parent 650cc8b commit d62d3c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/hipSYCL/sycl/libkernel/sscp/atomic_builtins.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ HIPSYCL_BUILTIN void __acpp_atomic_store(T *addr, T x, memory_order order,
3838
} else if constexpr (sizeof(T) == 2) {
3939
__acpp_sscp_atomic_store_i16(S, order, scope,
4040
reinterpret_cast<__acpp_int16 *>(addr),
41-
__builtin_bit_cast(__acpp_int8, x));
41+
__builtin_bit_cast(__acpp_int16, x));
4242
} else if constexpr (sizeof(T) == 4) {
4343
__acpp_sscp_atomic_store_i32(S, order, scope,
4444
reinterpret_cast<__acpp_int32 *>(addr),

0 commit comments

Comments
 (0)