Migrate half suite to the new test registration framework (#2329)

Contributes to #2181.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham
2025-03-11 22:00:23 +00:00
committed by GitHub
parent ba95285a0e
commit 641ffeaa67
4 changed files with 32 additions and 67 deletions

View File

@@ -247,89 +247,79 @@ static cl_half double2half_rtn(double f)
return cl_half_from_double(f, CL_HALF_RTN);
}
int test_vstore_half(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstore_half)
{
switch (get_default_rounding_mode(deviceID))
switch (get_default_rounding_mode(device))
{
case CL_FP_ROUND_TO_ZERO:
return Test_vStoreHalf_private(deviceID, float2half_rtz,
return Test_vStoreHalf_private(device, float2half_rtz,
double2half_rte, "");
case 0: return -1;
default:
return Test_vStoreHalf_private(deviceID, float2half_rte,
return Test_vStoreHalf_private(device, float2half_rte,
double2half_rte, "");
}
}
int test_vstore_half_rte(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstore_half_rte)
{
return Test_vStoreHalf_private(deviceID, float2half_rte, double2half_rte,
return Test_vStoreHalf_private(device, float2half_rte, double2half_rte,
"_rte");
}
int test_vstore_half_rtz(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstore_half_rtz)
{
return Test_vStoreHalf_private(deviceID, float2half_rtz, double2half_rtz,
return Test_vStoreHalf_private(device, float2half_rtz, double2half_rtz,
"_rtz");
}
int test_vstore_half_rtp(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstore_half_rtp)
{
return Test_vStoreHalf_private(deviceID, float2half_rtp, double2half_rtp,
return Test_vStoreHalf_private(device, float2half_rtp, double2half_rtp,
"_rtp");
}
int test_vstore_half_rtn(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstore_half_rtn)
{
return Test_vStoreHalf_private(deviceID, float2half_rtn, double2half_rtn,
return Test_vStoreHalf_private(device, float2half_rtn, double2half_rtn,
"_rtn");
}
int test_vstorea_half(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstorea_half)
{
switch (get_default_rounding_mode(deviceID))
switch (get_default_rounding_mode(device))
{
case CL_FP_ROUND_TO_ZERO:
return Test_vStoreaHalf_private(deviceID, float2half_rtz,
return Test_vStoreaHalf_private(device, float2half_rtz,
double2half_rte, "");
case 0: return -1;
default:
return Test_vStoreaHalf_private(deviceID, float2half_rte,
return Test_vStoreaHalf_private(device, float2half_rte,
double2half_rte, "");
}
}
int test_vstorea_half_rte(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstorea_half_rte)
{
return Test_vStoreaHalf_private(deviceID, float2half_rte, double2half_rte,
return Test_vStoreaHalf_private(device, float2half_rte, double2half_rte,
"_rte");
}
int test_vstorea_half_rtz(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstorea_half_rtz)
{
return Test_vStoreaHalf_private(deviceID, float2half_rtz, double2half_rtz,
return Test_vStoreaHalf_private(device, float2half_rtz, double2half_rtz,
"_rtz");
}
int test_vstorea_half_rtp(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstorea_half_rtp)
{
return Test_vStoreaHalf_private(deviceID, float2half_rtp, double2half_rtp,
return Test_vStoreaHalf_private(device, float2half_rtp, double2half_rtp,
"_rtp");
}
int test_vstorea_half_rtn(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
REGISTER_TEST(vstorea_half_rtn)
{
return Test_vStoreaHalf_private(deviceID, float2half_rtn, double2half_rtn,
return Test_vStoreaHalf_private(device, float2half_rtn, double2half_rtn,
"_rtn");
}