mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
cl22: Use single array for function list (#148)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
committed by
Kévin Petit
parent
394dece0d7
commit
07196c351a
@@ -22,26 +22,16 @@
|
||||
|
||||
MTdata gMTdata;
|
||||
|
||||
basefn basefn_list[] = {
|
||||
test_sub_group_info,
|
||||
test_work_item_functions,
|
||||
test_work_group_functions,
|
||||
test_barrier_functions,
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST( sub_group_info ),
|
||||
ADD_TEST( work_item_functions ),
|
||||
ADD_TEST( work_group_functions ),
|
||||
ADD_TEST( barrier_functions ),
|
||||
};
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"sub_group_info",
|
||||
"work_item_functions",
|
||||
"work_group_functions",
|
||||
"barrier_functions",
|
||||
};
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
|
||||
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
|
||||
|
||||
static const int num_fns = sizeof(basefn_names) / sizeof(char *);
|
||||
|
||||
static test_status
|
||||
checkSubGroupsExtension(cl_device_id device)
|
||||
static test_status checkSubGroupsExtension(cl_device_id device)
|
||||
{
|
||||
if (!is_extension_available(device, "cl_khr_subgroups")) {
|
||||
log_error("'cl_khr_subgroups' is a required extension, failing.\n");
|
||||
@@ -51,10 +41,9 @@ checkSubGroupsExtension(cl_device_id device)
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
gMTdata = init_genrand(0);
|
||||
return runTestHarnessWithCheck(argc, argv, num_fns, basefn_list, basefn_names, false, false, NULL, checkSubGroupsExtension);
|
||||
return runTestHarnessWithCheck(argc, argv, test_num, test_list, false, false, NULL, checkSubGroupsExtension);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user