diff --git a/test_common/harness/imageHelpers.cpp b/test_common/harness/imageHelpers.cpp index 7ad99226..ef92e8b6 100644 --- a/test_common/harness/imageHelpers.cpp +++ b/test_common/harness/imageHelpers.cpp @@ -27,6 +27,8 @@ RoundingMode gFloatToHalfRoundingMode = kDefaultRoundingMode; static cl_ushort float2half_rte( float f ); static cl_ushort float2half_rtz( float f ); +cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; + double sRGBmap(float fc) { @@ -773,7 +775,6 @@ float get_max_relative_error( cl_image_format *format, image_sampler_data *sampl { if( sampler->filter_mode != CL_FILTER_NEAREST ) { - extern cl_device_type gDeviceType; // The maximum if( gDeviceType == CL_DEVICE_TYPE_GPU ) maxError += MAKE_HEX_FLOAT(0x1.0p-4f, 0x1L, -4); // Some GPUs ain't so accurate diff --git a/test_conformance/api/main.c b/test_conformance/api/main.c index 1c8cce1f..81bc64ae 100644 --- a/test_conformance/api/main.c +++ b/test_conformance/api/main.c @@ -28,7 +28,6 @@ // FIXME: To use certain functions in harness/imageHelpers.h // (for example, generate_random_image_data()), the tests are required to declare // the following variables (): -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; bool gTestRounding = false; test_definition test_list[] = { diff --git a/test_conformance/basic/main.c b/test_conformance/basic/main.c index b02bf3c4..3202dd38 100644 --- a/test_conformance/basic/main.c +++ b/test_conformance/basic/main.c @@ -28,7 +28,6 @@ // FIXME: To use certain functions in harness/imageHelpers.h // (for example, generate_random_image_data()), the tests are required to declare // the following variables (): -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; bool gTestRounding = false; test_definition test_list[] = { diff --git a/test_conformance/clcpp/images/main.cpp b/test_conformance/clcpp/images/main.cpp index 70b6c591..8c41bb6a 100644 --- a/test_conformance/clcpp/images/main.cpp +++ b/test_conformance/clcpp/images/main.cpp @@ -22,7 +22,6 @@ // FIXME: To use certain functions in test_common/harness/imageHelpers.h // (for example, generate_random_image_data()), the tests are required to declare // the following variable (hangover from code specific to Apple's implementation): -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; int main(int argc, const char *argv[]) { diff --git a/test_conformance/images/clCopyImage/main.cpp b/test_conformance/images/clCopyImage/main.cpp index 2cecf5ed..c4f95e84 100644 --- a/test_conformance/images/clCopyImage/main.cpp +++ b/test_conformance/images/clCopyImage/main.cpp @@ -36,7 +36,6 @@ bool gTestMipmaps; int gTypesToTest; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; cl_channel_order gChannelOrderToUse = (cl_channel_order)-1; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; extern int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, MethodsToTest testMethod ); diff --git a/test_conformance/images/clFillImage/main.cpp b/test_conformance/images/clFillImage/main.cpp index c3948660..352207fa 100644 --- a/test_conformance/images/clFillImage/main.cpp +++ b/test_conformance/images/clFillImage/main.cpp @@ -34,7 +34,6 @@ bool gEnablePitch; int gTypesToTest; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; cl_channel_order gChannelOrderToUse = (cl_channel_order)-1; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; extern int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, MethodsToTest testMethod ); static void printUsage( const char *execName ); diff --git a/test_conformance/images/clGetInfo/main.cpp b/test_conformance/images/clGetInfo/main.cpp index f634e324..5a98386a 100644 --- a/test_conformance/images/clGetInfo/main.cpp +++ b/test_conformance/images/clGetInfo/main.cpp @@ -31,7 +31,6 @@ bool gTestMaxImages; bool gTestRounding; int gTypesToTest; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; extern int test_image_set( cl_device_id device, cl_context context, cl_mem_object_type image_type ); static void printUsage( const char *execName ); diff --git a/test_conformance/images/clReadWriteImage/main.cpp b/test_conformance/images/clReadWriteImage/main.cpp index d10c18bc..8bf974fb 100644 --- a/test_conformance/images/clReadWriteImage/main.cpp +++ b/test_conformance/images/clReadWriteImage/main.cpp @@ -34,7 +34,6 @@ bool gTestMipmaps; int gTypesToTest; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; bool gEnablePitch = false; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; #define MAX_ALLOWED_STD_DEVIATION_IN_MB 8.0 diff --git a/test_conformance/images/kernel_image_methods/main.cpp b/test_conformance/images/kernel_image_methods/main.cpp index 88625a68..076d92f6 100644 --- a/test_conformance/images/kernel_image_methods/main.cpp +++ b/test_conformance/images/kernel_image_methods/main.cpp @@ -34,7 +34,6 @@ int gTypesToTest; bool gDeviceLt20 = false; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; extern int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, cl_mem_object_type imageType ); diff --git a/test_conformance/images/kernel_read_write/main.cpp b/test_conformance/images/kernel_read_write/main.cpp index 78363c24..01689731 100644 --- a/test_conformance/images/kernel_read_write/main.cpp +++ b/test_conformance/images/kernel_read_write/main.cpp @@ -55,7 +55,6 @@ int gNormalizedModeToUse = 7; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; cl_channel_order gChannelOrderToUse = (cl_channel_order)-1; bool gEnablePitch = false; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; int gtestTypesToRun = 0; static int testTypesToRun; diff --git a/test_conformance/images/kernel_read_write/test_iterations.cpp b/test_conformance/images/kernel_read_write/test_iterations.cpp index 1f54c70d..9011b206 100644 --- a/test_conformance/images/kernel_read_write/test_iterations.cpp +++ b/test_conformance/images/kernel_read_write/test_iterations.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestImage2DFromBuffer, gTestMipmaps; -extern cl_device_type gDeviceType; extern bool gUseKernelSamplers; extern cl_filter_mode gFilterModeToUse; extern cl_addressing_mode gAddressModeToUse; diff --git a/test_conformance/images/kernel_read_write/test_read_1D.cpp b/test_conformance/images/kernel_read_write/test_read_1D.cpp index f7eaa4e7..7577cf27 100644 --- a/test_conformance/images/kernel_read_write/test_read_1D.cpp +++ b/test_conformance/images/kernel_read_write/test_read_1D.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps; -extern cl_device_type gDeviceType; extern bool gUseKernelSamplers; extern cl_filter_mode gFilterModeToUse; extern cl_addressing_mode gAddressModeToUse; diff --git a/test_conformance/images/kernel_read_write/test_read_1D_array.cpp b/test_conformance/images/kernel_read_write/test_read_1D_array.cpp index 7cb7c56e..5a95ae55 100644 --- a/test_conformance/images/kernel_read_write/test_read_1D_array.cpp +++ b/test_conformance/images/kernel_read_write/test_read_1D_array.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps; -extern cl_device_type gDeviceType; extern bool gUseKernelSamplers; extern cl_filter_mode gFilterModeToUse; extern cl_addressing_mode gAddressModeToUse; diff --git a/test_conformance/images/kernel_read_write/test_read_2D_array.cpp b/test_conformance/images/kernel_read_write/test_read_2D_array.cpp index e288bc06..540e6d4b 100644 --- a/test_conformance/images/kernel_read_write/test_read_2D_array.cpp +++ b/test_conformance/images/kernel_read_write/test_read_2D_array.cpp @@ -20,7 +20,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps; -extern cl_device_type gDeviceType; extern bool gUseKernelSamplers; extern cl_filter_mode gFilterModeToUse; extern cl_addressing_mode gAddressModeToUse; diff --git a/test_conformance/images/kernel_read_write/test_read_3D.cpp b/test_conformance/images/kernel_read_write/test_read_3D.cpp index 993490f5..d03f5d18 100644 --- a/test_conformance/images/kernel_read_write/test_read_3D.cpp +++ b/test_conformance/images/kernel_read_write/test_read_3D.cpp @@ -20,7 +20,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps; -extern cl_device_type gDeviceType; extern bool gUseKernelSamplers; extern cl_filter_mode gFilterModeToUse; extern cl_addressing_mode gAddressModeToUse; diff --git a/test_conformance/images/samplerlessReads/main.cpp b/test_conformance/images/samplerlessReads/main.cpp index fb8df7de..99b85bd5 100644 --- a/test_conformance/images/samplerlessReads/main.cpp +++ b/test_conformance/images/samplerlessReads/main.cpp @@ -43,7 +43,6 @@ int gTypesToTest; cl_channel_type gChannelTypeToUse = (cl_channel_type)-1; cl_channel_order gChannelOrderToUse = (cl_channel_order)-1; bool gEnablePitch = false; -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; bool gDeviceLt20 = false; #define MAX_ALLOWED_STD_DEVIATION_IN_MB 8.0 diff --git a/test_conformance/images/samplerlessReads/test_iterations.cpp b/test_conformance/images/samplerlessReads/test_iterations.cpp index 1c745061..22849bc7 100644 --- a/test_conformance/images/samplerlessReads/test_iterations.cpp +++ b/test_conformance/images/samplerlessReads/test_iterations.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20; -extern cl_device_type gDeviceType; extern bool gTestReadWrite; #define MAX_TRIES 1 diff --git a/test_conformance/images/samplerlessReads/test_read_1D.cpp b/test_conformance/images/samplerlessReads/test_read_1D.cpp index 6d58625f..0e277109 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20; -extern cl_device_type gDeviceType; extern bool gTestReadWrite; #define MAX_TRIES 1 diff --git a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp index 5670b5dd..9ba85d29 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20; -extern cl_device_type gDeviceType; extern bool gTestReadWrite; #define MAX_TRIES 1 diff --git a/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp b/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp index fe8e10b6..92442967 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp @@ -26,7 +26,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gTestSmallImages, gTestMaxImages, gTestRounding, gDeviceLt20; -extern cl_device_type gDeviceType; #define MAX_TRIES 1 #define MAX_CLAMPED 1 diff --git a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp index 5741ff01..9b9d5aa0 100644 --- a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp +++ b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp @@ -20,7 +20,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20; -extern cl_device_type gDeviceType; extern bool gTestReadWrite; const char *read2DArrayKernelSourcePattern = diff --git a/test_conformance/images/samplerlessReads/test_read_3D.cpp b/test_conformance/images/samplerlessReads/test_read_3D.cpp index e80dec9c..0ebada9b 100644 --- a/test_conformance/images/samplerlessReads/test_read_3D.cpp +++ b/test_conformance/images/samplerlessReads/test_read_3D.cpp @@ -20,7 +20,6 @@ #define MAX_HALF_LINEAR_ERR 0.3f extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20; -extern cl_device_type gDeviceType; extern bool gTestReadWrite; const char *read3DKernelSourcePattern = diff --git a/test_conformance/profiling/main.c b/test_conformance/profiling/main.c index 145e102e..e4fed884 100644 --- a/test_conformance/profiling/main.c +++ b/test_conformance/profiling/main.c @@ -23,7 +23,6 @@ // FIXME: To use certain functions in harness/imageHelpers.h // (for example, generate_random_image_data()), the tests are required to declare // the following variables (): -cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT; bool gTestRounding = false; test_definition test_list[] = {