Skip to content

Commit ff1879f

Browse files
committed
Fix MSVC unused variable warnerr
1 parent f4d84af commit ff1879f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cub/test/catch2_test_device_histogram_env_api.cu

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ C2H_TEST("cub::DeviceHistogram::MultiHistogramEven accepts env with stream (1D)"
8585
{
8686
// example-begin multi-histogram-even-1d-env
8787
// 4-channel RGBA pixels, histogram 3 active channels
88-
constexpr int NUM_CHANNELS = 4;
89-
constexpr int NUM_ACTIVE_CHANNELS = 3;
88+
[[maybe_unused]] constexpr int NUM_CHANNELS = 4;
89+
[[maybe_unused]] constexpr int NUM_ACTIVE_CHANNELS = 3;
9090

9191
// clang-format off
9292
// 2 pixels: (R=0, G=2, B=1, A=255), (R=3, G=4, B=2, A=128)
@@ -137,8 +137,8 @@ C2H_TEST("cub::DeviceHistogram::MultiHistogramEven accepts env with stream (2D)"
137137
{
138138
// example-begin multi-histogram-even-2d-env
139139
// 4-channel RGBA pixels, histogram 3 active channels, 2D region
140-
constexpr int NUM_CHANNELS = 4;
141-
constexpr int NUM_ACTIVE_CHANNELS = 3;
140+
[[maybe_unused]] constexpr int NUM_CHANNELS = 4;
141+
[[maybe_unused]] constexpr int NUM_ACTIVE_CHANNELS = 3;
142142

143143
// 2 rows, 2 pixels per row, with row stride = 2 pixels * 4 channels * 1 byte = 8 bytes
144144
// Row 0: (R=0, G=2, B=1, A=255), (R=3, G=4, B=2, A=128)
@@ -199,8 +199,8 @@ C2H_TEST("cub::DeviceHistogram::MultiHistogramRange accepts env with stream (1D)
199199
{
200200
// example-begin multi-histogram-range-1d-env
201201
// 4-channel RGBA pixels, histogram 3 active channels
202-
constexpr int NUM_CHANNELS = 4;
203-
constexpr int NUM_ACTIVE_CHANNELS = 3;
202+
[[maybe_unused]] constexpr int NUM_CHANNELS = 4;
203+
[[maybe_unused]] constexpr int NUM_ACTIVE_CHANNELS = 3;
204204

205205
// 2 pixels: (R=0, G=2, B=1, A=255), (R=3, G=4, B=2, A=128)
206206
auto d_samples = thrust::device_vector<unsigned char>{0, 2, 1, 255, 3, 4, 2, 128};
@@ -256,8 +256,8 @@ C2H_TEST("cub::DeviceHistogram::MultiHistogramRange accepts env with stream (2D)
256256
{
257257
// example-begin multi-histogram-range-2d-env
258258
// 4-channel RGBA pixels, histogram 3 active channels, 2D region
259-
constexpr int NUM_CHANNELS = 4;
260-
constexpr int NUM_ACTIVE_CHANNELS = 3;
259+
[[maybe_unused]] constexpr int NUM_CHANNELS = 4;
260+
[[maybe_unused]] constexpr int NUM_ACTIVE_CHANNELS = 3;
261261

262262
// 2 rows, 2 pixels per row
263263
// Row 0: (R=0, G=2, B=1, A=255), (R=3, G=4, B=2, A=128)

0 commit comments

Comments
 (0)