mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 15:39:03 +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
@@ -24,145 +24,76 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
basefn basefn_list[] = {
|
||||
test_load_program_source,
|
||||
test_load_multistring_source,
|
||||
test_load_two_kernel_source,
|
||||
test_load_null_terminated_source,
|
||||
test_load_null_terminated_multi_line_source,
|
||||
test_load_null_terminated_partial_multi_line_source,
|
||||
test_load_discreet_length_source,
|
||||
test_get_program_source,
|
||||
test_get_program_build_info,
|
||||
test_get_program_info,
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST( load_program_source ),
|
||||
ADD_TEST( load_multistring_source ),
|
||||
ADD_TEST( load_two_kernel_source ),
|
||||
ADD_TEST( load_null_terminated_source ),
|
||||
ADD_TEST( load_null_terminated_multi_line_source ),
|
||||
ADD_TEST( load_null_terminated_partial_multi_line_source ),
|
||||
ADD_TEST( load_discreet_length_source ),
|
||||
ADD_TEST( get_program_source ),
|
||||
ADD_TEST( get_program_build_info ),
|
||||
ADD_TEST( get_program_info ),
|
||||
|
||||
test_large_compile,
|
||||
test_async_build_pieces,
|
||||
ADD_TEST( large_compile ),
|
||||
ADD_TEST( async_build ),
|
||||
|
||||
test_options_optimizations,
|
||||
test_options_build_macro,
|
||||
test_options_build_macro_existence,
|
||||
test_options_include_directory,
|
||||
test_options_denorm_cache,
|
||||
ADD_TEST( options_build_optimizations ),
|
||||
ADD_TEST( options_build_macro ),
|
||||
ADD_TEST( options_build_macro_existence ),
|
||||
ADD_TEST( options_include_directory ),
|
||||
ADD_TEST( options_denorm_cache ),
|
||||
|
||||
test_preprocessor_define_udef,
|
||||
test_preprocessor_include,
|
||||
test_preprocessor_line_error,
|
||||
test_preprocessor_pragma,
|
||||
ADD_TEST( preprocessor_define_udef ),
|
||||
ADD_TEST( preprocessor_include ),
|
||||
ADD_TEST( preprocessor_line_error ),
|
||||
ADD_TEST( preprocessor_pragma ),
|
||||
|
||||
test_compiler_defines_for_extensions,
|
||||
test_image_macro,
|
||||
ADD_TEST( compiler_defines_for_extensions ),
|
||||
ADD_TEST( image_macro ),
|
||||
|
||||
test_simple_compile_only,
|
||||
test_simple_static_compile_only,
|
||||
test_simple_extern_compile_only,
|
||||
test_simple_compile_with_callback,
|
||||
test_simple_embedded_header_compile,
|
||||
test_simple_link_only,
|
||||
test_two_file_regular_variable_access,
|
||||
test_two_file_regular_struct_access,
|
||||
test_two_file_regular_function_access,
|
||||
test_simple_link_with_callback,
|
||||
test_simple_embedded_header_link,
|
||||
test_execute_after_simple_compile_and_link,
|
||||
test_execute_after_simple_compile_and_link_no_device_info,
|
||||
test_execute_after_simple_compile_and_link_with_defines,
|
||||
test_execute_after_simple_compile_and_link_with_callbacks,
|
||||
test_execute_after_simple_library_with_link,
|
||||
test_execute_after_two_file_link,
|
||||
test_execute_after_embedded_header_link,
|
||||
test_execute_after_included_header_link,
|
||||
test_execute_after_serialize_reload_object,
|
||||
test_execute_after_serialize_reload_library,
|
||||
test_simple_library_only,
|
||||
test_simple_library_with_callback,
|
||||
test_simple_library_with_link,
|
||||
test_two_file_link,
|
||||
test_multi_file_libraries,
|
||||
test_multiple_files,
|
||||
test_multiple_libraries,
|
||||
test_multiple_files_multiple_libraries,
|
||||
test_multiple_embedded_headers,
|
||||
ADD_TEST( simple_compile_only ),
|
||||
ADD_TEST( simple_static_compile_only ),
|
||||
ADD_TEST( simple_extern_compile_only ),
|
||||
ADD_TEST( simple_compile_with_callback ),
|
||||
ADD_TEST( simple_embedded_header_compile ),
|
||||
ADD_TEST( simple_link_only ),
|
||||
ADD_TEST( two_file_regular_variable_access ),
|
||||
ADD_TEST( two_file_regular_struct_access ),
|
||||
ADD_TEST( two_file_regular_function_access ),
|
||||
ADD_TEST( simple_link_with_callback ),
|
||||
ADD_TEST( simple_embedded_header_link ),
|
||||
ADD_TEST( execute_after_simple_compile_and_link ),
|
||||
ADD_TEST( execute_after_simple_compile_and_link_no_device_info ),
|
||||
ADD_TEST( execute_after_simple_compile_and_link_with_defines ),
|
||||
ADD_TEST( execute_after_simple_compile_and_link_with_callbacks ),
|
||||
ADD_TEST( execute_after_simple_library_with_link ),
|
||||
ADD_TEST( execute_after_two_file_link ),
|
||||
ADD_TEST( execute_after_embedded_header_link ),
|
||||
ADD_TEST( execute_after_included_header_link ),
|
||||
ADD_TEST( execute_after_serialize_reload_object ),
|
||||
ADD_TEST( execute_after_serialize_reload_library ),
|
||||
ADD_TEST( simple_library_only ),
|
||||
ADD_TEST( simple_library_with_callback ),
|
||||
ADD_TEST( simple_library_with_link ),
|
||||
ADD_TEST( two_file_link ),
|
||||
ADD_TEST( multi_file_libraries ),
|
||||
ADD_TEST( multiple_files ),
|
||||
ADD_TEST( multiple_libraries ),
|
||||
ADD_TEST( multiple_files_multiple_libraries ),
|
||||
ADD_TEST( multiple_embedded_headers ),
|
||||
|
||||
test_program_binary_type,
|
||||
test_compile_and_link_status_options_log,
|
||||
ADD_TEST( program_binary_type ),
|
||||
ADD_TEST( compile_and_link_status_options_log ),
|
||||
|
||||
test_pragma_unroll
|
||||
ADD_TEST( pragma_unroll ),
|
||||
};
|
||||
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"load_program_source",
|
||||
"load_multistring_source",
|
||||
"load_two_kernel_source",
|
||||
"load_null_terminated_source",
|
||||
"load_null_terminated_multi_line_source",
|
||||
"load_null_terminated_partial_multi_line_source",
|
||||
"load_discreet_length_source",
|
||||
"get_program_source",
|
||||
"get_program_build_info",
|
||||
"get_program_info",
|
||||
|
||||
"large_compile",
|
||||
"async_build",
|
||||
|
||||
"options_build_optimizations",
|
||||
"options_build_macro",
|
||||
"options_build_macro_existence",
|
||||
"options_include_directory",
|
||||
"options_denorm_cache",
|
||||
|
||||
"preprocessor_define_udef",
|
||||
"preprocessor_include",
|
||||
"preprocessor_line_error",
|
||||
"preprocessor_pragma",
|
||||
|
||||
"compiler_defines_for_extensions",
|
||||
"image_macro",
|
||||
|
||||
"simple_compile_only",
|
||||
"simple_static_compile_only",
|
||||
"simple_extern_compile_only",
|
||||
"simple_compile_with_callback",
|
||||
"simple_embedded_header_compile",
|
||||
"simple_link_only",
|
||||
"two_file_regular_variable_access",
|
||||
"two_file_regular_struct_access",
|
||||
"two_file_regular_function_access",
|
||||
"simple_link_with_callback",
|
||||
"simple_embedded_header_link",
|
||||
"execute_after_simple_compile_and_link",
|
||||
"execute_after_simple_compile_and_link_no_device_info",
|
||||
"execute_after_simple_compile_and_link_with_defines",
|
||||
"execute_after_simple_compile_and_link_with_callbacks",
|
||||
"execute_after_simple_library_with_link",
|
||||
"execute_after_two_file_link",
|
||||
"execute_after_embedded_header_link",
|
||||
"execute_after_included_header_link",
|
||||
"execute_after_serialize_reload_object",
|
||||
"execute_after_serialize_reload_library",
|
||||
"simple_library_only",
|
||||
"simple_library_with_callback",
|
||||
"simple_library_with_link",
|
||||
"two_file_link",
|
||||
"multi_file_libraries",
|
||||
"multiple_files",
|
||||
"multiple_libraries",
|
||||
"multiple_files_multiple_libraries",
|
||||
"multiple_embedded_headers",
|
||||
"program_binary_type",
|
||||
"compile_and_link_status_options_log",
|
||||
|
||||
"pragma_unroll",
|
||||
};
|
||||
|
||||
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 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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ extern int test_get_program_build_info(cl_device_id deviceID, cl_context
|
||||
extern int test_get_program_info(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
|
||||
extern int test_large_compile(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_async_build_pieces(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_async_build(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
|
||||
extern int test_options_optimizations(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_options_build_optimizations(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_options_build_macro(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_options_build_macro_existence(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_options_include_directory(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
@@ -85,4 +85,4 @@ extern int test_multiple_embedded_headers(cl_device_id deviceID, cl_context
|
||||
extern int test_program_binary_type(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_compile_and_link_status_options_log(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
|
||||
extern int test_pragma_unroll(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_pragma_unroll(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
|
||||
@@ -43,7 +43,7 @@ void CL_CALLBACK test_notify_build_complete( cl_program program, void *userData
|
||||
log_info( "\n <-- program successfully built\n" );
|
||||
}
|
||||
|
||||
int test_async_build_pieces(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_async_build(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
int error;
|
||||
cl_program program;
|
||||
|
||||
@@ -90,7 +90,7 @@ cl_int get_result_from_program( cl_context context, cl_command_queue queue, cl_p
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
int test_options_optimizations(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_options_build_optimizations(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
int error;
|
||||
cl_build_status status;
|
||||
|
||||
Reference in New Issue
Block a user