mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
[NFC] Only assign gIsEmbedded in the test harness (#1672)
Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -678,19 +678,6 @@ test_status InitCL(cl_device_id device)
|
||||
}
|
||||
gTestDouble &= gHasDouble;
|
||||
|
||||
// detect whether profile of the device is embedded
|
||||
char profile[1024] = "";
|
||||
if ((error = clGetDeviceInfo(device, CL_DEVICE_PROFILE, sizeof(profile),
|
||||
profile, NULL)))
|
||||
{
|
||||
}
|
||||
else if (strstr(profile, "EMBEDDED_PROFILE"))
|
||||
{
|
||||
gIsEmbedded = 1;
|
||||
if (!is_extension_available(device, "cles_khr_int64")) gHasLong = 0;
|
||||
}
|
||||
|
||||
|
||||
gContext = clCreateContext(NULL, 1, &device, notify_callback, NULL, &error);
|
||||
if (NULL == gContext || error)
|
||||
{
|
||||
|
||||
@@ -99,17 +99,6 @@ test_status InitCL( cl_device_id device )
|
||||
int hasDouble = is_extension_available(device, "cl_khr_fp64");
|
||||
gTestDouble ^= hasDouble;
|
||||
|
||||
//detect whether profile of the device is embedded
|
||||
char profile[64] = "";
|
||||
if( (error = clGetDeviceInfo( device, CL_DEVICE_PROFILE, sizeof(profile), profile, NULL ) ) )
|
||||
{
|
||||
vlog_error( "Unable to get device CL DEVICE PROFILE string. (%d) \n", error );
|
||||
}
|
||||
else if( strstr(profile, "EMBEDDED_PROFILE" ) )
|
||||
{
|
||||
gIsEmbedded = 1;
|
||||
}
|
||||
|
||||
vlog( "%d compute devices at %f GHz\n", gComputeDevices, (double) gDeviceFrequency / 1000. );
|
||||
vlog( "Max thread group size is %lld.\n", (uint64_t) gMaxThreadGroupSize );
|
||||
|
||||
|
||||
@@ -55,17 +55,6 @@ int test_step_internal(cl_device_id deviceID, cl_context context,
|
||||
return -1;
|
||||
}
|
||||
|
||||
// detect whether profile of the device is embedded
|
||||
char profile[1024] = "";
|
||||
err = clGetDeviceInfo(deviceID, CL_DEVICE_PROFILE, sizeof(profile), profile,
|
||||
NULL);
|
||||
if (err)
|
||||
{
|
||||
print_error(err, "clGetDeviceInfo for CL_DEVICE_PROFILE failed\n");
|
||||
return -1;
|
||||
}
|
||||
gIsEmbedded = NULL != strstr(profile, "EMBEDDED_PROFILE");
|
||||
|
||||
for (typeIdx = 0; types[typeIdx] != kNumExplicitTypes; ++typeIdx)
|
||||
{
|
||||
if (types[typeIdx] == kDouble)
|
||||
|
||||
Reference in New Issue
Block a user