Skip to content

Commit

Permalink
[SYCL][Bindless][Exp] Remove const from non-reference and non-pointer…
Browse files Browse the repository at this point in the history
… type parameters (intel#14238)
  • Loading branch information
isaacault authored Jun 24, 2024
1 parent f917e3b commit d4f2fe5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ and the array index.
// Fetch an unsampled image array
template <typename DataT, typename HintT = DataT, typename CoordT>
DataT fetch_image_array(const unsampled_image_handle &ImageHandle,
const CoordT &Coords, const unsigned int ArrayLayer);
const CoordT &Coords, unsigned int ArrayLayer);
```

Fetching an image array follows the same restrictions on what coordinate types
Expand All @@ -1390,7 +1390,7 @@ provided that type is trivially copyable.
// Write to an unsampled image array
template <typename DataT, typename CoordT>
DataT write_image_array(unsampled_image_handle ImageHandle,
const CoordT &Coords, const unsigned int ArrayLayer
const CoordT &Coords, unsigned int ArrayLayer
const DataT &Color);
```

Expand Down Expand Up @@ -1495,7 +1495,7 @@ sampling depends on the sampler attributes passed upon creation of the cubemap.
template <typename DataT, typename HintT = DataT>
DataT fetch_cubemap(const unsampled_image_handle &ImageHandle,
const int2 &Coords,
const int Face);
int Face);

// Sampled cubemap read
template <typename DataT, typename HintT = DataT>
Expand All @@ -1506,7 +1506,7 @@ DataT sample_cubemap(const sampled_image_handle &ImageHandle,
template <typename DataT>
void write_cubemap(unsampled_image_handle ImageHandle,
const int2 &Coords,
const int Face,
int Face,
const DataT &Color);
```

Expand Down
16 changes: 8 additions & 8 deletions sycl/include/sycl/ext/oneapi/bindless_images.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void free_mipmap_mem(image_mem_handle handle, const sycl::queue &syclQueue);
* @return Memory handle to the individual mipmap image
*/
__SYCL_EXPORT image_mem_handle get_mip_level_mem_handle(
const image_mem_handle mipMem, const unsigned int level,
const image_mem_handle mipMem, unsigned int level,
const sycl::device &syclDevice, const sycl::context &syclContext);

/**
Expand All @@ -192,9 +192,9 @@ __SYCL_EXPORT image_mem_handle get_mip_level_mem_handle(
* @param syclQueue The queue in which we created our memory handle
* @return Memory handle to the individual mipmap image
*/
__SYCL_EXPORT image_mem_handle get_mip_level_mem_handle(
const image_mem_handle mipMem, const unsigned int level,
const sycl::queue &syclQueue);
__SYCL_EXPORT image_mem_handle
get_mip_level_mem_handle(const image_mem_handle mipMem, unsigned int level,
const sycl::queue &syclQueue);

/**
* @brief Import external memory taking an external memory handle (the type
Expand Down Expand Up @@ -1299,7 +1299,7 @@ template <typename DataT, typename HintT = DataT, typename CoordT>
DataT fetch_image_array(const unsampled_image_handle &imageHandle
[[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const int arrayLayer [[maybe_unused]]) {
int arrayLayer [[maybe_unused]]) {
detail::assert_unsampled_coords<CoordT>();
constexpr size_t coordSize = detail::coord_size<CoordT>();
static_assert(coordSize == 1 || coordSize == 2,
Expand Down Expand Up @@ -1347,7 +1347,7 @@ DataT fetch_image_array(const unsampled_image_handle &imageHandle
*/
template <typename DataT, typename HintT = DataT>
DataT fetch_cubemap(const unsampled_image_handle &imageHandle,
const int2 &coords, const unsigned int face) {
const int2 &coords, unsigned int face) {
return fetch_image_array<DataT, HintT>(imageHandle, coords, face);
}

Expand Down Expand Up @@ -1442,7 +1442,7 @@ void write_image(unsampled_image_handle imageHandle [[maybe_unused]],
template <typename DataT, typename CoordT>
void write_image_array(unsampled_image_handle imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const int arrayLayer [[maybe_unused]],
int arrayLayer [[maybe_unused]],
const DataT &color [[maybe_unused]]) {
detail::assert_unsampled_coords<CoordT>();
constexpr size_t coordSize = detail::coord_size<CoordT>();
Expand Down Expand Up @@ -1482,7 +1482,7 @@ void write_image_array(unsampled_image_handle imageHandle [[maybe_unused]],
*/
template <typename DataT>
void write_cubemap(unsampled_image_handle imageHandle, const sycl::int2 &coords,
const int face, const DataT &color) {
int face, const DataT &color) {
return write_image_array(imageHandle, coords, face, color);
}

Expand Down

0 comments on commit d4f2fe5

Please sign in to comment.