mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 00:09:02 +00:00
cl20: Use single array for function list (#146)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
committed by
Kévin Petit
parent
a223b8a9a2
commit
a344529c9b
@@ -23,39 +23,21 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
basefn basefn_list[] = {
|
||||
test_geom_cross,
|
||||
test_geom_dot,
|
||||
test_geom_distance,
|
||||
test_geom_fast_distance,
|
||||
test_geom_length,
|
||||
test_geom_fast_length,
|
||||
test_geom_normalize,
|
||||
test_geom_fast_normalize
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST( geom_cross ),
|
||||
ADD_TEST( geom_dot ),
|
||||
ADD_TEST( geom_distance ),
|
||||
ADD_TEST( geom_fast_distance ),
|
||||
ADD_TEST( geom_length ),
|
||||
ADD_TEST( geom_fast_length ),
|
||||
ADD_TEST( geom_normalize ),
|
||||
ADD_TEST( geom_fast_normalize ),
|
||||
};
|
||||
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"geom_cross",
|
||||
"geom_dot",
|
||||
"geom_distance",
|
||||
"geom_fast_distance",
|
||||
"geom_length",
|
||||
"geom_fast_length",
|
||||
"geom_normalize",
|
||||
"geom_fast_normalize",
|
||||
};
|
||||
|
||||
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
|
||||
|
||||
int num_fns = sizeof(basefn_names) / sizeof(char *);
|
||||
|
||||
const unsigned int g_vecSizeof[] = {0,1,2,4,4,0,0,0,8,
|
||||
0,0,0,0,0,0,0,16};
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return runTestHarness( argc, argv, num_fns, basefn_list, basefn_names, false, false, 0 );
|
||||
return runTestHarness( argc, argv, test_num, test_list, false, false, 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#include "../../test_common/harness/threadTesting.h"
|
||||
#include "../../test_common/harness/typeWrappers.h"
|
||||
|
||||
extern const unsigned int g_vecSizeof[];
|
||||
|
||||
extern int create_program_and_kernel(const char *source, const char *kernel_name, cl_program *program_ret, cl_kernel *kernel_ret);
|
||||
|
||||
extern int test_geom_cross(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
|
||||
Reference in New Issue
Block a user