Skip to content

Commit

Permalink
Fix type conversion warning in sycl launch
Browse files Browse the repository at this point in the history
  • Loading branch information
long58 committed Jul 9, 2024
1 parent d21504e commit 36afa05
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/RAJA/policy/sycl/launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>> {
launch_params.threads.value[0] * launch_params.teams.value[0]);

// Only launch kernel if we have something to iterate over
constexpr size_t zero = 0;
constexpr int zero = 0;
if ( launch_params.threads.value[0] > zero && launch_params.threads.value[1] > zero && launch_params.threads.value[2] > zero &&
launch_params.teams.value[0] > zero && launch_params.teams.value[1] > zero && launch_params.teams.value[2]> zero ) {

Expand Down Expand Up @@ -182,6 +182,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>> {
exec(RAJA::resources::Resource res, const LaunchParams &params, const char *kernel_name,
BODY_IN &&body_in, ReduceParams &RAJA_UNUSED_ARG(launch_reducers))
{
(void*)kernel_name; // quiet the compiler warning about unused variable

/*Get the queue from concrete resource */
::sycl::queue* q = res.get<camp::resources::Sycl>().get_queue();
Expand All @@ -199,7 +200,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>> {
params.threads.value[0] * params.teams.value[0]);

// Only launch kernel if we have something to iterate over
constexpr size_t zero = 0;
constexpr int zero = 0;
if ( params.threads.value[0] > zero && params.threads.value[1] > zero && params.threads.value[2] > zero &&
params.teams.value[0] > zero && params.teams.value[1] > zero && params.teams.value[2]> zero ) {

Expand Down Expand Up @@ -253,6 +254,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>> {
exec(RAJA::resources::Resource res, const LaunchParams &launch_params, const char *kernel_name,
BODY_IN &&body_in, ReduceParams launch_reducers)
{
(void*)kernel_name; // quiet the compiler warning about unused variable

/*Get the queue from concrete resource */
::sycl::queue* q = res.get<camp::resources::Sycl>().get_queue();
Expand All @@ -272,7 +274,7 @@ struct LaunchExecute<RAJA::sycl_launch_t<async, 0>> {
launch_params.threads.value[0] * launch_params.teams.value[0]);

// Only launch kernel if we have something to iterate over
constexpr size_t zero = 0;
constexpr int zero = 0;
if ( launch_params.threads.value[0] > zero && launch_params.threads.value[1] > zero && launch_params.threads.value[2] > zero &&
launch_params.teams.value[0] > zero && launch_params.teams.value[1] > zero && launch_params.teams.value[2]> zero ) {

Expand Down

0 comments on commit 36afa05

Please sign in to comment.