mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Migrate generic_address_space suite to the new test registration framework (#2333)
Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/2181. Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
This commit is contained in:
@@ -97,7 +97,8 @@ private:
|
||||
const std::vector<std::string> _kernels;
|
||||
};
|
||||
|
||||
int test_function_get_fence(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(function_get_fence)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION = common::CONFORMANCE_VERIFY_FENCE +
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -142,10 +143,11 @@ int test_function_get_fence(cl_device_id deviceID, cl_context context, cl_comman
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_function_to_address_space(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(function_to_address_space)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION =
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -190,10 +192,11 @@ int test_function_to_address_space(cl_device_id deviceID, cl_context context, cl
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_variable_get_fence(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(variable_get_fence)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION = common::CONFORMANCE_VERIFY_FENCE +
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -223,10 +226,11 @@ int test_variable_get_fence(cl_device_id deviceID, cl_context context, cl_comman
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_variable_to_address_space(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(variable_to_address_space)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION =
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -256,10 +260,11 @@ int test_variable_to_address_space(cl_device_id deviceID, cl_context context, cl
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_casting(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(casting)
|
||||
{
|
||||
std::vector<std::string> KERNEL_FUNCTIONS;
|
||||
|
||||
// pointers to global, local or private are implicitly convertible to generic
|
||||
@@ -345,10 +350,11 @@ int test_casting(cl_device_id deviceID, cl_context context, cl_command_queue que
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTIONS);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_conditional_casting(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(conditional_casting)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION = common::CONFORMANCE_VERIFY_FENCE +
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -376,10 +382,11 @@ int test_conditional_casting(cl_device_id deviceID, cl_context context, cl_comma
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_chain_casting(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(chain_casting)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION = common::CONFORMANCE_VERIFY_FENCE +
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -407,10 +414,11 @@ int test_chain_casting(cl_device_id deviceID, cl_context context, cl_command_que
|
||||
NL;
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_ternary_operator_casting(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(ternary_operator_casting)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION = common::CONFORMANCE_VERIFY_FENCE +
|
||||
NL
|
||||
NL "__global int gint = 1;"
|
||||
@@ -435,10 +443,11 @@ int test_ternary_operator_casting(cl_device_id deviceID, cl_context context, cl_
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_language_struct(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(language_struct)
|
||||
{
|
||||
std::vector<std::string> KERNEL_FUNCTIONS;
|
||||
|
||||
// implicit private struct
|
||||
@@ -588,10 +597,11 @@ int test_language_struct(cl_device_id deviceID, cl_context context, cl_command_q
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTIONS);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_language_union(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(language_union)
|
||||
{
|
||||
std::vector<std::string> KERNEL_FUNCTIONS;
|
||||
|
||||
KERNEL_FUNCTIONS.push_back(common::CONFORMANCE_VERIFY_FENCE +
|
||||
@@ -726,10 +736,11 @@ int test_language_union(cl_device_id deviceID, cl_context context, cl_command_qu
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTIONS);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_multiple_calls_same_function(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(multiple_calls_same_function)
|
||||
{
|
||||
const std::string KERNEL_FUNCTION =
|
||||
NL
|
||||
NL "int shift2(const int *ptr, int arg) {"
|
||||
@@ -759,10 +770,11 @@ int test_multiple_calls_same_function(cl_device_id deviceID, cl_context context,
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTION);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_compare_pointers(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements) {
|
||||
REGISTER_TEST(compare_pointers)
|
||||
{
|
||||
std::vector<std::string> KERNEL_FUNCTIONS;
|
||||
|
||||
KERNEL_FUNCTIONS.push_back(
|
||||
@@ -884,5 +896,5 @@ int test_compare_pointers(cl_device_id deviceID, cl_context context, cl_command_
|
||||
|
||||
CBasicTest test(KERNEL_FUNCTIONS);
|
||||
|
||||
return test.Execute(deviceID, context, queue, num_elements);
|
||||
return test.Execute(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user