Skip to content

[SYCL][Bindless] Fix compiler Werrors #10574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions sycl/include/sycl/ext/oneapi/bindless_images.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ template <typename CoordT> constexpr size_t coord_size() {
* another
*/
template <typename DataT, typename CoordT>
DataT read_image(const unsampled_image_handle &imageHandle,
const CoordT &coords) {
DataT read_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]]) {
constexpr size_t coordSize = detail::coord_size<CoordT>();
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
"Expected input coordinate to be have 1, 2, or 4 components "
Expand Down Expand Up @@ -655,8 +655,8 @@ DataT read_image(const unsampled_image_handle &imageHandle,
* another
*/
template <typename DataT, typename CoordT>
DataT read_image(const sampled_image_handle &imageHandle,
const CoordT &coords) {
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]]) {
constexpr size_t coordSize = detail::coord_size<CoordT>();
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
"Expected input coordinate to be have 1, 2, or 4 components "
Expand Down Expand Up @@ -686,8 +686,9 @@ DataT read_image(const sampled_image_handle &imageHandle,
* @return Mipmap image data with LOD filtering
*/
template <typename DataT, typename CoordT>
DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
const float level) {
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const float level [[maybe_unused]]) {
constexpr size_t coordSize = detail::coord_size<CoordT>();
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
"Expected input coordinate to be have 1, 2, or 4 components "
Expand Down Expand Up @@ -718,8 +719,10 @@ DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
* @return Mipmap image data with anisotropic filtering
*/
template <typename DataT, typename CoordT>
DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
const CoordT &dX, const CoordT &dY) {
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const CoordT &dX [[maybe_unused]],
const CoordT &dY [[maybe_unused]]) {
constexpr size_t coordSize = detail::coord_size<CoordT>();
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
"Expected input coordinate and gradient to have 1, 2, or 4 "
Expand Down Expand Up @@ -748,8 +751,9 @@ DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
* @param coords The coordinates at which to write image data
*/
template <typename DataT, typename CoordT>
void write_image(const unsampled_image_handle &imageHandle,
const CoordT &Coords, const DataT &Color) {
void write_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &Coords [[maybe_unused]],
const DataT &Color [[maybe_unused]]) {
constexpr size_t coordSize = detail::coord_size<CoordT>();
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
"Expected input coordinate to be have 1, 2, or 4 components "
Expand Down