mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Migrate contractions suite to the new test registration framework (#2321)
Contributes to #2181. Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
@@ -218,106 +218,37 @@ float ppc_mul(float a, float b)
|
||||
}
|
||||
#endif
|
||||
|
||||
int test_contractions_float_0(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(0);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_0) { return RunTest(0); }
|
||||
|
||||
int test_contractions_float_1(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(1);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_1) { return RunTest(1); }
|
||||
|
||||
int test_contractions_float_2(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(2);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_2) { return RunTest(2); }
|
||||
|
||||
int test_contractions_float_3(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(3);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_3) { return RunTest(3); }
|
||||
|
||||
int test_contractions_float_4(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(4);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_4) { return RunTest(4); }
|
||||
|
||||
int test_contractions_float_5(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(5);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_5) { return RunTest(5); }
|
||||
|
||||
int test_contractions_float_6(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(6);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_6) { return RunTest(6); }
|
||||
|
||||
int test_contractions_float_7(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest(7);
|
||||
}
|
||||
REGISTER_TEST(contractions_float_7) { return RunTest(7); }
|
||||
|
||||
int test_contractions_double_0(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(0);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_0) { return RunTest_Double(0); }
|
||||
|
||||
int test_contractions_double_1(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(1);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_1) { return RunTest_Double(1); }
|
||||
|
||||
int test_contractions_double_2(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(2);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_2) { return RunTest_Double(2); }
|
||||
|
||||
int test_contractions_double_3(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(3);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_3) { return RunTest_Double(3); }
|
||||
|
||||
int test_contractions_double_4(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(4);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_4) { return RunTest_Double(4); }
|
||||
|
||||
int test_contractions_double_5(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(5);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_5) { return RunTest_Double(5); }
|
||||
|
||||
int test_contractions_double_6(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(6);
|
||||
}
|
||||
REGISTER_TEST(contractions_double_6) { return RunTest_Double(6); }
|
||||
|
||||
int test_contractions_double_7(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return RunTest_Double(7);
|
||||
}
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST( contractions_float_0 ),
|
||||
ADD_TEST( contractions_float_1 ),
|
||||
ADD_TEST( contractions_float_2 ),
|
||||
ADD_TEST( contractions_float_3 ),
|
||||
ADD_TEST( contractions_float_4 ),
|
||||
ADD_TEST( contractions_float_5 ),
|
||||
ADD_TEST( contractions_float_6 ),
|
||||
ADD_TEST( contractions_float_7 ),
|
||||
ADD_TEST( contractions_double_0 ),
|
||||
ADD_TEST( contractions_double_1 ),
|
||||
ADD_TEST( contractions_double_2 ),
|
||||
ADD_TEST( contractions_double_3 ),
|
||||
ADD_TEST( contractions_double_4 ),
|
||||
ADD_TEST( contractions_double_5 ),
|
||||
ADD_TEST( contractions_double_6 ),
|
||||
ADD_TEST( contractions_double_7 ),
|
||||
};
|
||||
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
REGISTER_TEST(contractions_double_7) { return RunTest_Double(7); }
|
||||
|
||||
int main( int argc, const char **argv )
|
||||
{
|
||||
@@ -331,7 +262,9 @@ int main( int argc, const char **argv )
|
||||
|
||||
if( !error )
|
||||
{
|
||||
error = runTestHarnessWithCheck( gArgCount, gArgList, test_num, test_list, true, 0, InitCL );
|
||||
error = runTestHarnessWithCheck(
|
||||
gArgCount, gArgList, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), true, 0, InitCL);
|
||||
}
|
||||
|
||||
if( gQueue )
|
||||
@@ -450,9 +383,9 @@ static void PrintUsage( void )
|
||||
vlog( "\t\t-sNUMBER set random seed.\n");
|
||||
vlog( "\n" );
|
||||
vlog( "\tTest names:\n" );
|
||||
for( int i = 0; i < test_num; i++ )
|
||||
for (size_t i = 0; i < test_registry::getInstance().num_tests(); i++)
|
||||
{
|
||||
vlog( "\t\t%s\n", test_list[i].name );
|
||||
vlog("\t\t%s\n", test_registry::getInstance().definitions()[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user