Skip to content

Commit 4e3bd94

Browse files
committed
[SYCL][Bindless] Fix compiler Werrors
Fix compiler error/warnings related to unused variables/parameters Post-commit fix for PR: intel#10454
1 parent 474461c commit 4e3bd94

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

sycl/include/sycl/ext/oneapi/bindless_images.hpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@ template <typename CoordT> constexpr size_t coord_size() {
619619
* another
620620
*/
621621
template <typename DataT, typename CoordT>
622-
DataT read_image(const unsampled_image_handle &imageHandle,
623-
const CoordT &coords) {
622+
DataT read_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
623+
const CoordT &coords [[maybe_unused]]) {
624624
constexpr size_t coordSize = detail::coord_size<CoordT>();
625625
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
626626
"Expected input coordinate to be have 1, 2, or 4 components "
@@ -655,8 +655,8 @@ DataT read_image(const unsampled_image_handle &imageHandle,
655655
* another
656656
*/
657657
template <typename DataT, typename CoordT>
658-
DataT read_image(const sampled_image_handle &imageHandle,
659-
const CoordT &coords) {
658+
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
659+
const CoordT &coords [[maybe_unused]]) {
660660
constexpr size_t coordSize = detail::coord_size<CoordT>();
661661
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
662662
"Expected input coordinate to be have 1, 2, or 4 components "
@@ -686,8 +686,9 @@ DataT read_image(const sampled_image_handle &imageHandle,
686686
* @return Mipmap image data with LOD filtering
687687
*/
688688
template <typename DataT, typename CoordT>
689-
DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
690-
const float level) {
689+
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
690+
const CoordT &coords [[maybe_unused]],
691+
const float level [[maybe_unused]]) {
691692
constexpr size_t coordSize = detail::coord_size<CoordT>();
692693
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
693694
"Expected input coordinate to be have 1, 2, or 4 components "
@@ -718,8 +719,10 @@ DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
718719
* @return Mipmap image data with anisotropic filtering
719720
*/
720721
template <typename DataT, typename CoordT>
721-
DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
722-
const CoordT &dX, const CoordT &dY) {
722+
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
723+
const CoordT &coords [[maybe_unused]],
724+
const CoordT &dX [[maybe_unused]],
725+
const CoordT &dY [[maybe_unused]]) {
723726
constexpr size_t coordSize = detail::coord_size<CoordT>();
724727
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
725728
"Expected input coordinate and gradient to have 1, 2, or 4 "
@@ -748,8 +751,9 @@ DataT read_image(const sampled_image_handle &imageHandle, const CoordT &coords,
748751
* @param coords The coordinates at which to write image data
749752
*/
750753
template <typename DataT, typename CoordT>
751-
void write_image(const unsampled_image_handle &imageHandle,
752-
const CoordT &Coords, const DataT &Color) {
754+
void write_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
755+
const CoordT &Coords [[maybe_unused]],
756+
const DataT &Color [[maybe_unused]]) {
753757
constexpr size_t coordSize = detail::coord_size<CoordT>();
754758
static_assert(coordSize == 1 || coordSize == 2 || coordSize == 4,
755759
"Expected input coordinate to be have 1, 2, or 4 components "

0 commit comments

Comments
 (0)