[NFC] Change the name of the default device provided by the new registration framework (#2186)

The code base uses a mix of 'device' and 'deviceID'. I suggest we
standardise on 'device' which is shorter and slightly more prevalent.

Contributes to #2181

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kévin Petit
2024-12-12 21:24:04 +00:00
committed by GitHub
parent 56d383b2e9
commit 5b7af4b36d
42 changed files with 174 additions and 162 deletions

View File

@@ -68,7 +68,7 @@ int test_copy(cl_device_id deviceID, cl_context context,
REGISTER_TEST(op_copy_##NAME##_simple) \
{ \
std::vector<type> results(1024, (type)value); \
return test_copy(deviceID, context, queue, "copy_" #NAME "_simple", \
return test_copy(device, context, queue, "copy_" #NAME "_simple", \
results); \
}
@@ -97,29 +97,31 @@ REGISTER_TEST(op_copy_int4_simple)
{
cl_int4 value = { { 123, 122, 121, 119 } };
std::vector<cl_int4> results(256, value);
return test_copy(deviceID, context, queue, "copy_int4_simple", results);
return test_copy(device, context, queue, "copy_int4_simple", results);
}
REGISTER_TEST(op_copy_int3_simple)
{
cl_int3 value = { { 123, 122, 121, 0 } };
std::vector<cl_int3> results(256, value);
return test_copy(deviceID, context, queue, "copy_int3_simple",
results, isVectorNotEqual<cl_int3, 3>);
return test_copy(device, context, queue, "copy_int3_simple", results,
isVectorNotEqual<cl_int3, 3>);
}
REGISTER_TEST(op_copy_struct_int_float_simple)
{
AbstractStruct2<int, float> value = {1024, 3.1415};
std::vector<AbstractStruct2<int, float> > results(256, value);
return test_copy(deviceID, context, queue, "copy_struct_int_float_simple", results);
return test_copy(device, context, queue, "copy_struct_int_float_simple",
results);
}
REGISTER_TEST(op_copy_struct_int_char_simple)
{
AbstractStruct2<int, char> value = { 2100483600, (char)128 };
std::vector<AbstractStruct2<int, char> > results(256, value);
return test_copy(deviceID, context, queue, "copy_struct_int_char_simple", results);
return test_copy(device, context, queue, "copy_struct_int_char_simple",
results);
}
REGISTER_TEST(op_copy_struct_struct_simple)
@@ -132,14 +134,13 @@ REGISTER_TEST(op_copy_struct_struct_simple)
CustomType2 value2 = {intvals, value1};
std::vector<CustomType2> results(256, value2);
return test_copy(deviceID, context, queue, "copy_struct_struct_simple", results);
return test_copy(device, context, queue, "copy_struct_struct_simple",
results);
}
REGISTER_TEST(op_copy_half_simple)
{
PASSIVE_REQUIRE_FP16_SUPPORT(deviceID);
PASSIVE_REQUIRE_FP16_SUPPORT(device);
std::vector<cl_float> results(1024, 3.25);
return test_copy(deviceID, context, queue,
"copy_half_simple",
results);
return test_copy(device, context, queue, "copy_half_simple", results);
}