mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Moved all instances of gDeviceType to imageHelper.cpp (#575)
* Moved all instances of gDeviceType to imageHelper.cpp * Missed one instance of gDeviceType * Removed all instances of extern cl_device_type gDeviceType, except in imageHelpers.h
This commit is contained in:
@@ -27,6 +27,8 @@ RoundingMode gFloatToHalfRoundingMode = kDefaultRoundingMode;
|
|||||||
static cl_ushort float2half_rte( float f );
|
static cl_ushort float2half_rte( float f );
|
||||||
static cl_ushort float2half_rtz( float f );
|
static cl_ushort float2half_rtz( float f );
|
||||||
|
|
||||||
|
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
||||||
|
|
||||||
double
|
double
|
||||||
sRGBmap(float fc)
|
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 )
|
if( sampler->filter_mode != CL_FILTER_NEAREST )
|
||||||
{
|
{
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
// The maximum
|
// The maximum
|
||||||
if( gDeviceType == CL_DEVICE_TYPE_GPU )
|
if( gDeviceType == CL_DEVICE_TYPE_GPU )
|
||||||
maxError += MAKE_HEX_FLOAT(0x1.0p-4f, 0x1L, -4); // Some GPUs ain't so accurate
|
maxError += MAKE_HEX_FLOAT(0x1.0p-4f, 0x1L, -4); // Some GPUs ain't so accurate
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
// FIXME: To use certain functions in harness/imageHelpers.h
|
// FIXME: To use certain functions in harness/imageHelpers.h
|
||||||
// (for example, generate_random_image_data()), the tests are required to declare
|
// (for example, generate_random_image_data()), the tests are required to declare
|
||||||
// the following variables (<rdar://problem/11111245>):
|
// the following variables (<rdar://problem/11111245>):
|
||||||
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
bool gTestRounding = false;
|
bool gTestRounding = false;
|
||||||
|
|
||||||
test_definition test_list[] = {
|
test_definition test_list[] = {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
// FIXME: To use certain functions in harness/imageHelpers.h
|
// FIXME: To use certain functions in harness/imageHelpers.h
|
||||||
// (for example, generate_random_image_data()), the tests are required to declare
|
// (for example, generate_random_image_data()), the tests are required to declare
|
||||||
// the following variables (<rdar://problem/11111245>):
|
// the following variables (<rdar://problem/11111245>):
|
||||||
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
bool gTestRounding = false;
|
bool gTestRounding = false;
|
||||||
|
|
||||||
test_definition test_list[] = {
|
test_definition test_list[] = {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
// FIXME: To use certain functions in test_common/harness/imageHelpers.h
|
// FIXME: To use certain functions in test_common/harness/imageHelpers.h
|
||||||
// (for example, generate_random_image_data()), the tests are required to declare
|
// (for example, generate_random_image_data()), the tests are required to declare
|
||||||
// the following variable (hangover from code specific to Apple's implementation):
|
// 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[])
|
int main(int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ bool gTestMipmaps;
|
|||||||
int gTypesToTest;
|
int gTypesToTest;
|
||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
||||||
cl_channel_order gChannelOrderToUse = (cl_channel_order)-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 );
|
extern int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, MethodsToTest testMethod );
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ bool gEnablePitch;
|
|||||||
int gTypesToTest;
|
int gTypesToTest;
|
||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
||||||
cl_channel_order gChannelOrderToUse = (cl_channel_order)-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 );
|
extern int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, MethodsToTest testMethod );
|
||||||
static void printUsage( const char *execName );
|
static void printUsage( const char *execName );
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ bool gTestMaxImages;
|
|||||||
bool gTestRounding;
|
bool gTestRounding;
|
||||||
int gTypesToTest;
|
int gTypesToTest;
|
||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
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 );
|
extern int test_image_set( cl_device_id device, cl_context context, cl_mem_object_type image_type );
|
||||||
static void printUsage( const char *execName );
|
static void printUsage( const char *execName );
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ bool gTestMipmaps;
|
|||||||
int gTypesToTest;
|
int gTypesToTest;
|
||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
||||||
bool gEnablePitch = false;
|
bool gEnablePitch = false;
|
||||||
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
|
|
||||||
#define MAX_ALLOWED_STD_DEVIATION_IN_MB 8.0
|
#define MAX_ALLOWED_STD_DEVIATION_IN_MB 8.0
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ int gTypesToTest;
|
|||||||
bool gDeviceLt20 = false;
|
bool gDeviceLt20 = false;
|
||||||
|
|
||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
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 );
|
extern int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, cl_mem_object_type imageType );
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ int gNormalizedModeToUse = 7;
|
|||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
||||||
cl_channel_order gChannelOrderToUse = (cl_channel_order)-1;
|
cl_channel_order gChannelOrderToUse = (cl_channel_order)-1;
|
||||||
bool gEnablePitch = false;
|
bool gEnablePitch = false;
|
||||||
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
|
|
||||||
int gtestTypesToRun = 0;
|
int gtestTypesToRun = 0;
|
||||||
static int testTypesToRun;
|
static int testTypesToRun;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestImage2DFromBuffer, gTestMipmaps;
|
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestImage2DFromBuffer, gTestMipmaps;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gUseKernelSamplers;
|
extern bool gUseKernelSamplers;
|
||||||
extern cl_filter_mode gFilterModeToUse;
|
extern cl_filter_mode gFilterModeToUse;
|
||||||
extern cl_addressing_mode gAddressModeToUse;
|
extern cl_addressing_mode gAddressModeToUse;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gUseKernelSamplers;
|
extern bool gUseKernelSamplers;
|
||||||
extern cl_filter_mode gFilterModeToUse;
|
extern cl_filter_mode gFilterModeToUse;
|
||||||
extern cl_addressing_mode gAddressModeToUse;
|
extern cl_addressing_mode gAddressModeToUse;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gUseKernelSamplers;
|
extern bool gUseKernelSamplers;
|
||||||
extern cl_filter_mode gFilterModeToUse;
|
extern cl_filter_mode gFilterModeToUse;
|
||||||
extern cl_addressing_mode gAddressModeToUse;
|
extern cl_addressing_mode gAddressModeToUse;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gUseKernelSamplers;
|
extern bool gUseKernelSamplers;
|
||||||
extern cl_filter_mode gFilterModeToUse;
|
extern cl_filter_mode gFilterModeToUse;
|
||||||
extern cl_addressing_mode gAddressModeToUse;
|
extern cl_addressing_mode gAddressModeToUse;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
extern bool gDebugTrace, gExtraValidateInfo, gDisableOffsets, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gTestMipmaps;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gUseKernelSamplers;
|
extern bool gUseKernelSamplers;
|
||||||
extern cl_filter_mode gFilterModeToUse;
|
extern cl_filter_mode gFilterModeToUse;
|
||||||
extern cl_addressing_mode gAddressModeToUse;
|
extern cl_addressing_mode gAddressModeToUse;
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ int gTypesToTest;
|
|||||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
||||||
cl_channel_order gChannelOrderToUse = (cl_channel_order)-1;
|
cl_channel_order gChannelOrderToUse = (cl_channel_order)-1;
|
||||||
bool gEnablePitch = false;
|
bool gEnablePitch = false;
|
||||||
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
bool gDeviceLt20 = false;
|
bool gDeviceLt20 = false;
|
||||||
|
|
||||||
#define MAX_ALLOWED_STD_DEVIATION_IN_MB 8.0
|
#define MAX_ALLOWED_STD_DEVIATION_IN_MB 8.0
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gTestReadWrite;
|
extern bool gTestReadWrite;
|
||||||
|
|
||||||
#define MAX_TRIES 1
|
#define MAX_TRIES 1
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gTestReadWrite;
|
extern bool gTestReadWrite;
|
||||||
|
|
||||||
#define MAX_TRIES 1
|
#define MAX_TRIES 1
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gTestReadWrite;
|
extern bool gTestReadWrite;
|
||||||
|
|
||||||
#define MAX_TRIES 1
|
#define MAX_TRIES 1
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gTestSmallImages, gTestMaxImages, gTestRounding, gDeviceLt20;
|
extern bool gDebugTrace, gTestSmallImages, gTestMaxImages, gTestRounding, gDeviceLt20;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
|
|
||||||
#define MAX_TRIES 1
|
#define MAX_TRIES 1
|
||||||
#define MAX_CLAMPED 1
|
#define MAX_CLAMPED 1
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gTestReadWrite;
|
extern bool gTestReadWrite;
|
||||||
|
|
||||||
const char *read2DArrayKernelSourcePattern =
|
const char *read2DArrayKernelSourcePattern =
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#define MAX_HALF_LINEAR_ERR 0.3f
|
#define MAX_HALF_LINEAR_ERR 0.3f
|
||||||
|
|
||||||
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
extern bool gDebugTrace, gTestSmallImages, gEnablePitch, gTestMaxImages, gTestRounding, gDeviceLt20;
|
||||||
extern cl_device_type gDeviceType;
|
|
||||||
extern bool gTestReadWrite;
|
extern bool gTestReadWrite;
|
||||||
|
|
||||||
const char *read3DKernelSourcePattern =
|
const char *read3DKernelSourcePattern =
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
// FIXME: To use certain functions in harness/imageHelpers.h
|
// FIXME: To use certain functions in harness/imageHelpers.h
|
||||||
// (for example, generate_random_image_data()), the tests are required to declare
|
// (for example, generate_random_image_data()), the tests are required to declare
|
||||||
// the following variables (<rdar://problem/11111245>):
|
// the following variables (<rdar://problem/11111245>):
|
||||||
cl_device_type gDeviceType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
bool gTestRounding = false;
|
bool gTestRounding = false;
|
||||||
|
|
||||||
test_definition test_list[] = {
|
test_definition test_list[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user