mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add special test for generic address space atomics (#1959)
The atomic operations are tested with generic pointers but in a way where the compiler can infer the original pointer address space. This commit adds tests specifically for the case where the compiler cannot make inferences. Test that the correct address is used with atomics when the address is group variant and invariant.
This commit is contained in:
committed by
GitHub
parent
8e6c519354
commit
e2c7e901b8
@@ -40,31 +40,39 @@ extern int test_generic_advanced_casting(cl_device_id deviceID, cl_context conte
|
||||
extern int test_generic_ptr_to_host_mem(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_generic_ptr_to_host_mem_svm(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
extern int test_max_number_of_params(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements);
|
||||
// atomic tests
|
||||
int test_generic_atomics_invariant(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
int test_generic_atomics_variant(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
|
||||
test_definition test_list[] = {
|
||||
// basic tests
|
||||
ADD_TEST( function_get_fence ),
|
||||
ADD_TEST( function_to_address_space ),
|
||||
ADD_TEST( variable_get_fence ),
|
||||
ADD_TEST( variable_to_address_space ),
|
||||
ADD_TEST( casting ),
|
||||
ADD_TEST( conditional_casting ),
|
||||
ADD_TEST( chain_casting ),
|
||||
ADD_TEST( ternary_operator_casting ),
|
||||
ADD_TEST( language_struct ),
|
||||
ADD_TEST( language_union ),
|
||||
ADD_TEST( multiple_calls_same_function ),
|
||||
ADD_TEST( compare_pointers ),
|
||||
ADD_TEST(function_get_fence),
|
||||
ADD_TEST(function_to_address_space),
|
||||
ADD_TEST(variable_get_fence),
|
||||
ADD_TEST(variable_to_address_space),
|
||||
ADD_TEST(casting),
|
||||
ADD_TEST(conditional_casting),
|
||||
ADD_TEST(chain_casting),
|
||||
ADD_TEST(ternary_operator_casting),
|
||||
ADD_TEST(language_struct),
|
||||
ADD_TEST(language_union),
|
||||
ADD_TEST(multiple_calls_same_function),
|
||||
ADD_TEST(compare_pointers),
|
||||
// advanced tests
|
||||
ADD_TEST( library_function ),
|
||||
ADD_TEST( generic_variable_volatile ),
|
||||
ADD_TEST( generic_variable_const ),
|
||||
ADD_TEST( generic_variable_gentype ),
|
||||
ADD_TEST( builtin_functions ),
|
||||
ADD_TEST( generic_advanced_casting ),
|
||||
ADD_TEST( generic_ptr_to_host_mem ),
|
||||
ADD_TEST( generic_ptr_to_host_mem_svm ),
|
||||
ADD_TEST( max_number_of_params ),
|
||||
ADD_TEST(library_function),
|
||||
ADD_TEST(generic_variable_volatile),
|
||||
ADD_TEST(generic_variable_const),
|
||||
ADD_TEST(generic_variable_gentype),
|
||||
ADD_TEST(builtin_functions),
|
||||
ADD_TEST(generic_advanced_casting),
|
||||
ADD_TEST(generic_ptr_to_host_mem),
|
||||
ADD_TEST(generic_ptr_to_host_mem_svm),
|
||||
ADD_TEST(max_number_of_params),
|
||||
// atomic tests
|
||||
ADD_TEST(generic_atomics_invariant),
|
||||
ADD_TEST(generic_atomics_variant),
|
||||
};
|
||||
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
|
||||
Reference in New Issue
Block a user