Skip to content

Commit 26c10bd

Browse files
authored
Merge pull request #1796 from LLNL/task/rhornung67/squash-more-warnings
Squash compiler warnings that appear in various CI checks
2 parents de26abc + 75333e8 commit 26c10bd

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

include/RAJA/policy/sycl/forall.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ forall_impl(resources::Sycl& sycl_res,
102102
ForallParam)
103103
{
104104

105-
using Iterator = camp::decay<decltype(std::begin(iter))>;
106-
using LOOP_BODY = camp::decay<LoopBody>;
105+
using Iterator = camp::decay<decltype(std::begin(iter))>;
107106
using IndexType =
108107
camp::decay<decltype(std::distance(std::begin(iter), std::end(iter)))>;
109108

@@ -247,8 +246,7 @@ forall_impl(resources::Sycl& sycl_res,
247246
ForallParam f_params)
248247

249248
{
250-
using Iterator = camp::decay<decltype(std::begin(iter))>;
251-
using LOOP_BODY = camp::decay<LoopBody>;
249+
using Iterator = camp::decay<decltype(std::begin(iter))>;
252250
using IndexType =
253251
camp::decay<decltype(std::distance(std::begin(iter), std::end(iter)))>;
254252
using EXEC_POL = camp::decay<decltype(pol)>;
@@ -271,6 +269,7 @@ forall_impl(resources::Sycl& sycl_res,
271269
//
272270
sycl_dim_t blockSize {BlockSize};
273271
sycl_dim_t gridSize = impl::getGridDim(static_cast<size_t>(len), BlockSize);
272+
RAJA_UNUSED_VAR(gridSize);
274273

275274
::sycl::queue* q = sycl_res.get_queue();
276275

@@ -348,6 +347,7 @@ forall_impl(resources::Sycl& sycl_res,
348347
//
349348
sycl_dim_t blockSize {BlockSize};
350349
sycl_dim_t gridSize = impl::getGridDim(static_cast<size_t>(len), BlockSize);
350+
RAJA_UNUSED_VAR(gridSize);
351351

352352
::sycl::queue* q = sycl_res.get_queue();
353353

include/RAJA/policy/sycl/kernel/Lambda.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct SyclStatementExecutor<Data,
5151
{
5252

5353
static inline RAJA_DEVICE void exec(Data& data,
54-
::sycl::nd_item<3> item,
54+
::sycl::nd_item<3> RAJA_UNUSED_ARG(item),
5555
bool thread_active)
5656
{
5757
// Only execute the lambda if it hasn't been masked off

include/RAJA/policy/sycl/kernel/SyclKernel.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct SyclLaunchHelper<false, sycl_launch<async0>, StmtList, Data, Types>
128128

129129
static void launch(Data&& data,
130130
internal::LaunchDims launch_dims,
131-
size_t shmem,
131+
size_t RAJA_UNUSED_ARG(shmem),
132132
::sycl::queue* qu)
133133
{
134134

@@ -169,7 +169,7 @@ struct SyclLaunchHelper<true, sycl_launch<async0>, StmtList, Data, Types>
169169

170170
static void launch(Data&& data,
171171
internal::LaunchDims launch_dims,
172-
size_t shmem,
172+
size_t RAJA_UNUSED_ARG(shmem),
173173
::sycl::queue* qu)
174174
{
175175

include/RAJA/policy/sycl/kernel/internal.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ struct LaunchDims
124124
// Prefer larger z -> y -> x
125125
if (launch_local.x * launch_local.y * launch_local.z > max_work_group_size)
126126
{
127-
int remaining = 1;
127+
unsigned long remaining = 1;
128128
// local z cannot be > max_wrk from above
129129
// if equal then remaining is 1, on handle <
130130
if (max_work_group_size > launch_local.z)
@@ -236,7 +236,9 @@ struct SyclStatementListExecutorHelper<num_stmts, num_stmts, StmtList>
236236
{
237237

238238
template<typename Data>
239-
inline static RAJA_DEVICE void exec(Data&, ::sycl::nd_item<3> item, bool)
239+
inline static RAJA_DEVICE void exec(Data&,
240+
::sycl::nd_item<3> RAJA_UNUSED_ARG(item),
241+
bool)
240242
{
241243
// nop terminator
242244
}

include/RAJA/policy/sycl/launch.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>>
6565
params.threads.value[0] * params.teams.value[0]);
6666

6767
// Only launch kernel if we have something to iterate over
68-
constexpr size_t zero = 0;
68+
constexpr int zero = 0;
6969
if (params.threads.value[0] > zero && params.threads.value[1] > zero &&
7070
params.threads.value[2] > zero && params.teams.value[0] > zero &&
7171
params.teams.value[1] > zero && params.teams.value[2] > zero)
@@ -139,7 +139,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>>
139139
launch_params.threads.value[0] * launch_params.teams.value[0]);
140140

141141
// Only launch kernel if we have something to iterate over
142-
constexpr size_t zero = 0;
142+
constexpr int zero = 0;
143143
if (launch_params.threads.value[0] > zero &&
144144
launch_params.threads.value[1] > zero &&
145145
launch_params.threads.value[2] > zero &&
@@ -206,7 +206,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>>
206206
RAJA::expt::type_traits::is_ForallParamPack_empty<ReduceParams>>
207207
exec(RAJA::resources::Resource res,
208208
const LaunchParams& params,
209-
const char* kernel_name,
209+
const char* RAJA_UNUSED_ARG(kernel_name),
210210
BODY_IN&& body_in,
211211
ReduceParams& RAJA_UNUSED_ARG(launch_reducers))
212212
{
@@ -228,7 +228,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>>
228228
params.threads.value[0] * params.teams.value[0]);
229229

230230
// Only launch kernel if we have something to iterate over
231-
constexpr size_t zero = 0;
231+
constexpr int zero = 0;
232232
if (params.threads.value[0] > zero && params.threads.value[1] > zero &&
233233
params.threads.value[2] > zero && params.teams.value[0] > zero &&
234234
params.teams.value[1] > zero && params.teams.value[2] > zero)
@@ -283,7 +283,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>>
283283
RAJA::expt::type_traits::is_ForallParamPack_empty<ReduceParams>>>
284284
exec(RAJA::resources::Resource res,
285285
const LaunchParams& launch_params,
286-
const char* kernel_name,
286+
const char* RAJA_UNUSED_ARG(kernel_name),
287287
BODY_IN&& body_in,
288288
ReduceParams launch_reducers)
289289
{
@@ -308,7 +308,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>>
308308
launch_params.threads.value[0] * launch_params.teams.value[0]);
309309

310310
// Only launch kernel if we have something to iterate over
311-
constexpr size_t zero = 0;
311+
constexpr int zero = 0;
312312
if (launch_params.threads.value[0] > zero &&
313313
launch_params.threads.value[1] > zero &&
314314
launch_params.threads.value[2] > zero &&

include/RAJA/policy/sycl/reduce.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ struct Reduce_Data
140140
Reduce_Data(const Reduce_Data&) = default;
141141

142142
//! transfers from the host to the device -- exit() is called upon failure
143-
RAJA_INLINE void hostToDevice(Offload_Info& info)
143+
RAJA_INLINE void hostToDevice(Offload_Info& RAJA_UNUSED_ARG(info))
144144
{
145145
::sycl::queue* q = ::camp::resources::Sycl::get_default().get_queue();
146146

@@ -159,7 +159,7 @@ struct Reduce_Data
159159
}
160160

161161
//! transfers from the device to the host -- exit() is called upon failure
162-
RAJA_INLINE void deviceToHost(Offload_Info& info)
162+
RAJA_INLINE void deviceToHost(Offload_Info& RAJA_UNUSED_ARG(info))
163163
{
164164
::sycl::queue* q = ::camp::resources::Sycl::get_default().get_queue();
165165

@@ -178,7 +178,7 @@ struct Reduce_Data
178178
}
179179

180180
//! frees all data from the offload information passed
181-
RAJA_INLINE void cleanup(Offload_Info& info)
181+
RAJA_INLINE void cleanup(Offload_Info& RAJA_UNUSED_ARG(info))
182182
{
183183
::sycl::queue* q = ::camp::resources::Sycl::get_default().get_queue();
184184

@@ -207,8 +207,8 @@ struct TargetReduce
207207
TargetReduce(const TargetReduce&) = default;
208208

209209
explicit TargetReduce(T init_val)
210-
: info(),
211-
val(Reducer::identity(), Reducer::identity(), info),
210+
: val(Reducer::identity(), Reducer::identity(), info),
211+
info(),
212212
initVal(init_val),
213213
finalVal(Reducer::identity())
214214
{}

tpl/camp

Submodule camp updated 81 files

0 commit comments

Comments
 (0)