mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
[RFC] Move logic for test registration to the test harness (#2151)
And use in device_timer suite. Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -67,21 +67,18 @@ int test_function(cl_device_id deviceID,
|
||||
}
|
||||
|
||||
|
||||
#define TEST_FUNCTION(TYPE) \
|
||||
TEST_SPIRV_FUNC(function_##TYPE) \
|
||||
{ \
|
||||
int num = 1 << 20; \
|
||||
std::vector<cl_float> in(num); \
|
||||
RandomSeed seed(gRandomSeed); \
|
||||
for (int i = 0; i < num; i++) { \
|
||||
in[i] = genrand<cl_float>(seed); \
|
||||
} \
|
||||
return test_function(deviceID, \
|
||||
context, \
|
||||
queue, \
|
||||
#TYPE, \
|
||||
in); \
|
||||
} \
|
||||
#define TEST_FUNCTION(TYPE) \
|
||||
REGISTER_TEST(function_##TYPE) \
|
||||
{ \
|
||||
int num = 1 << 20; \
|
||||
std::vector<cl_float> in(num); \
|
||||
RandomSeed seed(gRandomSeed); \
|
||||
for (int i = 0; i < num; i++) \
|
||||
{ \
|
||||
in[i] = genrand<cl_float>(seed); \
|
||||
} \
|
||||
return test_function(deviceID, context, queue, #TYPE, in); \
|
||||
}
|
||||
|
||||
TEST_FUNCTION(none)
|
||||
TEST_FUNCTION(inline)
|
||||
|
||||
Reference in New Issue
Block a user