cl22: Use single array for function list (#148)

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
Radek Szymanski
2019-04-10 12:30:38 +01:00
committed by Kévin Petit
parent 394dece0d7
commit 07196c351a
139 changed files with 2380 additions and 4142 deletions

View File

@@ -701,215 +701,110 @@ int test_not( cl_device_id deviceID, cl_context context, cl_command_queue queue,
return doTest( "not" );
}
basefn basefn_list[] = {
test_acos,
test_acosh,
test_acospi,
test_asin,
test_asinh,
test_asinpi,
test_atan,
test_atanh,
test_atanpi,
test_atan2,
test_atan2pi,
test_cbrt,
test_ceil,
test_copysign,
test_cos,
test_cosh,
test_cospi,
test_exp,
test_exp2,
test_exp10,
test_expm1,
test_fabs,
test_fdim,
test_floor,
test_fma,
test_fmax,
test_fmin,
test_fmod,
test_fract,
test_frexp,
test_hypot,
test_ilogb,
test_isequal,
test_isfinite,
test_isgreater,
test_isgreaterequal,
test_isinf,
test_isless,
test_islessequal,
test_islessgreater,
test_isnan,
test_isnormal,
test_isnotequal,
test_isordered,
test_isunordered,
test_ldexp,
test_lgamma,
test_lgamma_r,
test_log,
test_log2,
test_log10,
test_log1p,
test_logb,
test_mad,
test_maxmag,
test_minmag,
test_modf,
test_nan,
test_nextafter,
test_pow,
test_pown,
test_powr,
test_remainder,
test_remquo,
test_rint,
test_rootn,
test_round,
test_rsqrt,
test_signbit,
test_sin,
test_sincos,
test_sinh,
test_sinpi,
test_sqrt,
test_sqrt_cr,
test_tan,
test_tanh,
test_tanpi,
test_trunc,
test_half_cos,
test_half_divide,
test_half_exp,
test_half_exp2,
test_half_exp10,
test_half_log,
test_half_log2,
test_half_log10,
test_half_powr,
test_half_recip,
test_half_rsqrt,
test_half_sin,
test_half_sqrt,
test_half_tan,
test_add,
test_subtract,
test_divide,
test_divide_cr,
test_multiply,
test_assignment,
test_not,
test_definition test_list[] = {
ADD_TEST( acos ),
ADD_TEST( acosh ),
ADD_TEST( acospi ),
ADD_TEST( asin ),
ADD_TEST( asinh ),
ADD_TEST( asinpi ),
ADD_TEST( atan ),
ADD_TEST( atanh ),
ADD_TEST( atanpi ),
ADD_TEST( atan2 ),
ADD_TEST( atan2pi ),
ADD_TEST( cbrt ),
ADD_TEST( ceil ),
ADD_TEST( copysign ),
ADD_TEST( cos ),
ADD_TEST( cosh ),
ADD_TEST( cospi ),
ADD_TEST( exp ),
ADD_TEST( exp2 ),
ADD_TEST( exp10 ),
ADD_TEST( expm1 ),
ADD_TEST( fabs ),
ADD_TEST( fdim ),
ADD_TEST( floor ),
ADD_TEST( fma ),
ADD_TEST( fmax ),
ADD_TEST( fmin ),
ADD_TEST( fmod ),
ADD_TEST( fract ),
ADD_TEST( frexp ),
ADD_TEST( hypot ),
ADD_TEST( ilogb ),
ADD_TEST( isequal ),
ADD_TEST( isfinite ),
ADD_TEST( isgreater ),
ADD_TEST( isgreaterequal ),
ADD_TEST( isinf ),
ADD_TEST( isless ),
ADD_TEST( islessequal ),
ADD_TEST( islessgreater ),
ADD_TEST( isnan ),
ADD_TEST( isnormal ),
ADD_TEST( isnotequal ),
ADD_TEST( isordered ),
ADD_TEST( isunordered ),
ADD_TEST( ldexp ),
ADD_TEST( lgamma ),
ADD_TEST( lgamma_r ),
ADD_TEST( log ),
ADD_TEST( log2 ),
ADD_TEST( log10 ),
ADD_TEST( log1p ),
ADD_TEST( logb ),
ADD_TEST( mad ),
ADD_TEST( maxmag ),
ADD_TEST( minmag ),
ADD_TEST( modf ),
ADD_TEST( nan ),
ADD_TEST( nextafter ),
ADD_TEST( pow ),
ADD_TEST( pown ),
ADD_TEST( powr ),
ADD_TEST( remainder ),
ADD_TEST( remquo ),
ADD_TEST( rint ),
ADD_TEST( rootn ),
ADD_TEST( round ),
ADD_TEST( rsqrt ),
ADD_TEST( signbit ),
ADD_TEST( sin ),
ADD_TEST( sincos ),
ADD_TEST( sinh ),
ADD_TEST( sinpi ),
ADD_TEST( sqrt ),
ADD_TEST( sqrt_cr ),
ADD_TEST( tan ),
ADD_TEST( tanh ),
ADD_TEST( tanpi ),
ADD_TEST( trunc ),
ADD_TEST( half_cos ),
ADD_TEST( half_divide ),
ADD_TEST( half_exp ),
ADD_TEST( half_exp2 ),
ADD_TEST( half_exp10 ),
ADD_TEST( half_log ),
ADD_TEST( half_log2 ),
ADD_TEST( half_log10 ),
ADD_TEST( half_powr ),
ADD_TEST( half_recip ),
ADD_TEST( half_rsqrt ),
ADD_TEST( half_sin ),
ADD_TEST( half_sqrt ),
ADD_TEST( half_tan ),
ADD_TEST( add ),
ADD_TEST( subtract ),
ADD_TEST( divide ),
ADD_TEST( divide_cr ),
ADD_TEST( multiply ),
ADD_TEST( assignment ),
ADD_TEST( not ),
};
const char *basefn_names[] = {
"acos",
"acosh",
"acospi",
"asin",
"asinh",
"asinpi",
"atan",
"atanh",
"atanpi",
"atan2",
"atan2pi",
"cbrt",
"ceil",
"copysign",
"cos",
"cosh",
"cospi",
"exp",
"exp2",
"exp10",
"expm1",
"fabs",
"fdim",
"floor",
"fma",
"fmax",
"fmin",
"fmod",
"fract",
"frexp",
"hypot",
"ilogb",
"isequal",
"isfinite",
"isgreater",
"isgreaterequal",
"isinf",
"isless",
"islessequal",
"islessgreater",
"isnan",
"isnormal",
"isnotequal",
"isordered",
"isunordered",
"ldexp",
"lgamma",
"lgamma_r",
"log",
"log2",
"log10",
"log1p",
"logb",
"mad",
"maxmag",
"minmag",
"modf",
"nan",
"nextafter",
"pow",
"pown",
"powr",
"remainder",
"remquo",
"rint",
"rootn",
"round",
"rsqrt",
"signbit",
"sin",
"sincos",
"sinh",
"sinpi",
"sqrt",
"sqrt_cr",
"tan",
"tanh",
"tanpi",
"trunc",
"half_cos",
"half_divide",
"half_exp",
"half_exp2",
"half_exp10",
"half_log",
"half_log2",
"half_log10",
"half_powr",
"half_recip",
"half_rsqrt",
"half_sin",
"half_sqrt",
"half_tan",
"add",
"subtract",
"divide",
"divide_cr",
"multiply",
"assignment",
"not",
};
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
const int num_fns = sizeof(basefn_names) / sizeof(char *);
const int test_num = ARRAY_SIZE( test_list );
#pragma mark -
@@ -982,7 +877,7 @@ int main (int argc, const char * argv[])
FPU_mode_type oldMode;
DisableFTZ( &oldMode );
int ret = parseAndCallCommandLineTests( gTestNameCount, gTestNames, NULL, num_fns, basefn_list, basefn_names, true, 0, 0 );
int ret = parseAndCallCommandLineTests( gTestNameCount, gTestNames, NULL, test_num, test_list, true, 0, 0 );
RestoreFPState( &oldMode );