mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Migrate the select suite to the new test registration framework (#2198)
Contirbutes to #2181 Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
@@ -478,113 +478,95 @@ static int doTest(cl_command_queue queue, cl_context context, Type stype, Type c
|
||||
return err;
|
||||
}
|
||||
|
||||
int test_select_uchar_uchar(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_uchar_uchar)
|
||||
{
|
||||
return doTest(queue, context, kuchar, kuchar, deviceID);
|
||||
return doTest(queue, context, kuchar, kuchar, device);
|
||||
}
|
||||
int test_select_uchar_char(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_uchar_char)
|
||||
{
|
||||
return doTest(queue, context, kuchar, kchar, deviceID);
|
||||
return doTest(queue, context, kuchar, kchar, device);
|
||||
}
|
||||
int test_select_char_uchar(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_char_uchar)
|
||||
{
|
||||
return doTest(queue, context, kchar, kuchar, deviceID);
|
||||
return doTest(queue, context, kchar, kuchar, device);
|
||||
}
|
||||
int test_select_char_char(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_char_char)
|
||||
{
|
||||
return doTest(queue, context, kchar, kchar, deviceID);
|
||||
return doTest(queue, context, kchar, kchar, device);
|
||||
}
|
||||
int test_select_ushort_ushort(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_ushort_ushort)
|
||||
{
|
||||
return doTest(queue, context, kushort, kushort, deviceID);
|
||||
return doTest(queue, context, kushort, kushort, device);
|
||||
}
|
||||
int test_select_ushort_short(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_ushort_short)
|
||||
{
|
||||
return doTest(queue, context, kushort, kshort, deviceID);
|
||||
return doTest(queue, context, kushort, kshort, device);
|
||||
}
|
||||
int test_select_short_ushort(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_short_ushort)
|
||||
{
|
||||
return doTest(queue, context, kshort, kushort, deviceID);
|
||||
return doTest(queue, context, kshort, kushort, device);
|
||||
}
|
||||
int test_select_short_short(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_short_short)
|
||||
{
|
||||
return doTest(queue, context, kshort, kshort, deviceID);
|
||||
return doTest(queue, context, kshort, kshort, device);
|
||||
}
|
||||
int test_select_half_ushort(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_half_ushort)
|
||||
{
|
||||
return doTest(queue, context, khalf, kushort, deviceID);
|
||||
return doTest(queue, context, khalf, kushort, device);
|
||||
}
|
||||
int test_select_half_short(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_half_short)
|
||||
{
|
||||
return doTest(queue, context, khalf, kshort, deviceID);
|
||||
return doTest(queue, context, khalf, kshort, device);
|
||||
}
|
||||
int test_select_uint_uint(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_uint_uint)
|
||||
{
|
||||
return doTest(queue, context, kuint, kuint, deviceID);
|
||||
return doTest(queue, context, kuint, kuint, device);
|
||||
}
|
||||
int test_select_uint_int(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_uint_int)
|
||||
{
|
||||
return doTest(queue, context, kuint, kint, deviceID);
|
||||
return doTest(queue, context, kuint, kint, device);
|
||||
}
|
||||
int test_select_int_uint(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_int_uint)
|
||||
{
|
||||
return doTest(queue, context, kint, kuint, deviceID);
|
||||
return doTest(queue, context, kint, kuint, device);
|
||||
}
|
||||
int test_select_int_int(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_int_int)
|
||||
{
|
||||
return doTest(queue, context, kint, kint, deviceID);
|
||||
return doTest(queue, context, kint, kint, device);
|
||||
}
|
||||
int test_select_float_uint(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_float_uint)
|
||||
{
|
||||
return doTest(queue, context, kfloat, kuint, deviceID);
|
||||
return doTest(queue, context, kfloat, kuint, device);
|
||||
}
|
||||
int test_select_float_int(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_float_int)
|
||||
{
|
||||
return doTest(queue, context, kfloat, kint, deviceID);
|
||||
return doTest(queue, context, kfloat, kint, device);
|
||||
}
|
||||
int test_select_ulong_ulong(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_ulong_ulong)
|
||||
{
|
||||
return doTest(queue, context, kulong, kulong, deviceID);
|
||||
return doTest(queue, context, kulong, kulong, device);
|
||||
}
|
||||
int test_select_ulong_long(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_ulong_long)
|
||||
{
|
||||
return doTest(queue, context, kulong, klong, deviceID);
|
||||
return doTest(queue, context, kulong, klong, device);
|
||||
}
|
||||
int test_select_long_ulong(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_long_ulong)
|
||||
{
|
||||
return doTest(queue, context, klong, kulong, deviceID);
|
||||
return doTest(queue, context, klong, kulong, device);
|
||||
}
|
||||
int test_select_long_long(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_long_long)
|
||||
{
|
||||
return doTest(queue, context, klong, klong, deviceID);
|
||||
return doTest(queue, context, klong, klong, device);
|
||||
}
|
||||
int test_select_double_ulong(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_double_ulong)
|
||||
{
|
||||
return doTest(queue, context, kdouble, kulong, deviceID);
|
||||
return doTest(queue, context, kdouble, kulong, device);
|
||||
}
|
||||
int test_select_double_long(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(select_double_long)
|
||||
{
|
||||
return doTest(queue, context, kdouble, klong, deviceID);
|
||||
return doTest(queue, context, kdouble, klong, device);
|
||||
}
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST(select_uchar_uchar), ADD_TEST(select_uchar_char),
|
||||
ADD_TEST(select_char_uchar), ADD_TEST(select_char_char),
|
||||
ADD_TEST(select_ushort_ushort), ADD_TEST(select_ushort_short),
|
||||
ADD_TEST(select_short_ushort), ADD_TEST(select_short_short),
|
||||
ADD_TEST(select_half_ushort), ADD_TEST(select_half_short),
|
||||
ADD_TEST(select_uint_uint), ADD_TEST(select_uint_int),
|
||||
ADD_TEST(select_int_uint), ADD_TEST(select_int_int),
|
||||
ADD_TEST(select_float_uint), ADD_TEST(select_float_int),
|
||||
ADD_TEST(select_ulong_ulong), ADD_TEST(select_ulong_long),
|
||||
ADD_TEST(select_long_ulong), ADD_TEST(select_long_long),
|
||||
ADD_TEST(select_double_ulong), ADD_TEST(select_double_long),
|
||||
};
|
||||
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
test_start();
|
||||
@@ -652,7 +634,9 @@ int main(int argc, const char* argv[])
|
||||
log_info("*** Wimpy Reduction Factor: %-27u ***\n\n", s_wimpy_reduction_factor);
|
||||
}
|
||||
|
||||
int err = runTestHarness(argCount, argList, test_num, test_list, false, 0);
|
||||
int err = runTestHarness(
|
||||
argCount, argList, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), false, 0);
|
||||
|
||||
free( argList );
|
||||
|
||||
@@ -667,8 +651,8 @@ static void printUsage( void )
|
||||
log_info("\t-[2^n] Set wimpy reduction factor, recommended range of n is 1-12, default factor(%u)\n", s_wimpy_reduction_factor);
|
||||
log_info("\n");
|
||||
log_info("Test names:\n");
|
||||
for( int i = 0; i < test_num; i++ )
|
||||
for (size_t i = 0; i < test_registry::getInstance().num_tests(); i++)
|
||||
{
|
||||
log_info( "\t%s\n", test_list[i].name );
|
||||
log_info("\t%s\n", test_registry::getInstance().definitions()[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user