@@ -696,9 +696,8 @@ template <typename CoordT> constexpr size_t coord_size() {
696
696
}
697
697
}
698
698
699
- #if defined(__NVPTX__)
700
- // bit_cast Color to a type the NVPTX backend is known to accept
701
- template <typename DataT> constexpr auto convert_color_nvptx (DataT Color) {
699
+ // bit_cast Color to a type the backend is known to accept
700
+ template <typename DataT> constexpr auto convert_color (DataT Color) {
702
701
constexpr size_t dataSize = sizeof (DataT);
703
702
static_assert (
704
703
dataSize == 1 || dataSize == 2 || dataSize == 4 || dataSize == 8 ||
@@ -717,7 +716,6 @@ template <typename DataT> constexpr auto convert_color_nvptx(DataT Color) {
717
716
return sycl::bit_cast<sycl::vec<uint32_t , 4 >>(Color);
718
717
}
719
718
}
720
- #endif
721
719
722
720
// assert coords or elements of coords is of an integer type
723
721
template <typename CoordT> constexpr void assert_unsampled_coords () {
@@ -1048,18 +1046,14 @@ void write_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
1048
1046
" for 1D, 2D and 3D images, respectively." );
1049
1047
1050
1048
#ifdef __SYCL_DEVICE_ONLY__
1051
- #if defined(__NVPTX__)
1052
1049
if constexpr (detail::is_recognized_standard_type<DataT>()) {
1053
1050
__invoke__ImageWrite ((uint64_t )imageHandle.raw_handle , coords, color);
1054
1051
} else {
1055
1052
// Convert DataT to a supported backend write type when user-defined type is
1056
1053
// passed
1057
1054
__invoke__ImageWrite ((uint64_t )imageHandle.raw_handle , coords,
1058
- detail::convert_color_nvptx (color));
1055
+ detail::convert_color (color));
1059
1056
}
1060
- #else
1061
- __invoke__ImageWrite ((uint64_t )imageHandle.raw_handle , coords, color);
1062
- #endif
1063
1057
#else
1064
1058
assert (false ); // Bindless images not yet implemented on host
1065
1059
#endif
0 commit comments