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:
jiabaxie
2020-02-06 02:27:14 -05:00
committed by GitHub
parent 2ad175fb57
commit 68d08e07bf
23 changed files with 2 additions and 23 deletions

View File

@@ -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