Skip to content

Commit

Permalink
Address compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanC committed Oct 3, 2024
1 parent 3e20b57 commit c4f7c49
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_openclhpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4200,21 +4200,21 @@ void testCommandBufferKhrUpdateMutableCommands() {
clUpdateMutableCommandsKHR_testCommandBufferKhrUpdateMutableCommands);
response = commandBufferKhrPool[0].updateMutableCommands(&config);
#else
cl_uint num_configs = 1;
std::array<cl_command_buffer_update_type_khr, 1> config_types = {{
constexpr cl_uint num_configs = 1;
std::array<cl_command_buffer_update_type_khr, num_configs> config_types = {{
CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR
}};
std::array<const void*, 1> configs = {&dispatch_list};
std::array<const void*, num_configs> configs = {&dispatch_list};
clUpdateMutableCommandsKHR_StubWithCallback(
clUpdateMutableCommandsKHR_testCommandBufferKhrUpdateMutableCommands);
response = commandBufferKhrPool[0].updateMutableCommands<1>(config_types, configs);
response = commandBufferKhrPool[0].updateMutableCommands<num_configs>(config_types, configs);
#endif
TEST_ASSERT_EQUAL(CL_SUCCESS, response);
}

static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoCommandQueue(
cl_mutable_command_khr command, cl_mutable_command_info_khr param_name,
size_t param_value_size, void* param_value, size_t* param_value_size_ret,
size_t param_value_size, void* param_value, size_t* /*param_value_size_ret*/,
int num_calls)
{
TEST_ASSERT_EQUAL(command, mutableCommandKhrPool[0]());
Expand Down Expand Up @@ -4330,7 +4330,7 @@ void testMutableCommandKhrGetInfoPropertiesArray()

TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, kernel_properties.size());
for (int i = 0; i < kernel_properties.size(); i++)
for (size_t i = 0; i < kernel_properties.size(); i++)
{
TEST_ASSERT_EQUAL(i + 1, kernel_properties[i]);
}
Expand Down Expand Up @@ -4461,7 +4461,7 @@ void testMutableCommandKhrGetInfoGlobalWorkOffset()
cl::vector<cl::size_type> global_work_offset = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_GLOBAL_WORK_OFFSET_KHR>(&err);
TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, global_work_offset.size());
for (int i = 0; i < global_work_offset.size(); i++)
for (cl::size_type i = 0; i < global_work_offset.size(); i++)
{
TEST_ASSERT_EQUAL(i + 2, global_work_offset[i]);
}
Expand Down Expand Up @@ -4491,7 +4491,7 @@ static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoGlobalWorkS
if (param_value != nullptr)
{
cl::size_type data[] = { 3, 4, 5 };
for (int i = 0; i < 3; i++)
for (cl::size_type i = 0; i < 3; i++)
{
*(&(static_cast<cl::size_type*>(param_value)[i])) = data[i];
}
Expand All @@ -4511,7 +4511,7 @@ void testMutableCommandKhrGetInfoGlobalWorkSize()
cl::vector<cl::size_type> global_work_size = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_GLOBAL_WORK_SIZE_KHR>(&err);
TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, global_work_size.size());
for (int i = 0; i < global_work_size.size(); i++)
for (cl::size_type i = 0; i < global_work_size.size(); i++)
{
TEST_ASSERT_EQUAL(i + 3, global_work_size[i]);
}
Expand Down Expand Up @@ -4561,7 +4561,7 @@ void testMutableCommandKhrGetInfoLocalWorkSize()
cl::vector<cl::size_type> local_work_size = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_LOCAL_WORK_SIZE_KHR>(&err);
TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, local_work_size.size());
for (int i = 0; i < local_work_size.size(); i++)
for (cl::size_type i = 0; i < local_work_size.size(); i++)
{
TEST_ASSERT_EQUAL(i + 4, local_work_size[i]);
}
Expand Down

0 comments on commit c4f7c49

Please sign in to comment.