mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29:03 +00:00
Remove duplicate code setting _cpu_capabilities (#676)
All tests that have this code are using the harness which does this already. Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -693,40 +693,6 @@ test_status InitCL( cl_device_id device )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( __APPLE__ )
|
|
||||||
|
|
||||||
#if defined( __i386__ ) || defined( __x86_64__ )
|
|
||||||
#define kHasSSE3 0x00000008
|
|
||||||
#define kHasSupplementalSSE3 0x00000100
|
|
||||||
#define kHasSSE4_1 0x00000400
|
|
||||||
#define kHasSSE4_2 0x00000800
|
|
||||||
/* check our environment for a hint to disable SSE variants */
|
|
||||||
{
|
|
||||||
const char *env = getenv( "CL_MAX_SSE" );
|
|
||||||
if( env )
|
|
||||||
{
|
|
||||||
extern int _cpu_capabilities;
|
|
||||||
int mask = 0;
|
|
||||||
if( 0 == strcasecmp( env, "SSE4.1" ) )
|
|
||||||
mask = kHasSSE4_2;
|
|
||||||
else if( 0 == strcasecmp( env, "SSSE3" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1;
|
|
||||||
else if( 0 == strcasecmp( env, "SSE3" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1 | kHasSupplementalSSE3;
|
|
||||||
else if( 0 == strcasecmp( env, "SSE2" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1 | kHasSupplementalSSE3 | kHasSSE3;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
vlog_error( "Error: Unknown CL_MAX_SSE setting: %s\n", env );
|
|
||||||
return TEST_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
vlog( "*** Environment: CL_MAX_SSE = %s ***\n", env );
|
|
||||||
_cpu_capabilities &= ~mask;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gMTdata = init_genrand( gRandomSeed );
|
gMTdata = init_genrand( gRandomSeed );
|
||||||
|
|
||||||
|
|||||||
@@ -392,35 +392,6 @@ int main(int argc, const char *argv[])
|
|||||||
if( gTypesToTest == 0 )
|
if( gTypesToTest == 0 )
|
||||||
gTypesToTest = kTestAllTypes;
|
gTypesToTest = kTestAllTypes;
|
||||||
|
|
||||||
#if defined( __APPLE__ )
|
|
||||||
#if defined( __i386__ ) || defined( __x86_64__ )
|
|
||||||
#define kHasSSE3 0x00000008
|
|
||||||
#define kHasSupplementalSSE3 0x00000100
|
|
||||||
#define kHasSSE4_1 0x00000400
|
|
||||||
#define kHasSSE4_2 0x00000800
|
|
||||||
/* check our environment for a hint to disable SSE variants */
|
|
||||||
{
|
|
||||||
const char *env = getenv( "CL_MAX_SSE" );
|
|
||||||
if( env )
|
|
||||||
{
|
|
||||||
extern int _cpu_capabilities;
|
|
||||||
int mask = 0;
|
|
||||||
if( 0 == strcmp( env, "SSE4.1" ) )
|
|
||||||
mask = kHasSSE4_2;
|
|
||||||
else if( 0 == strcmp( env, "SSSE3" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1;
|
|
||||||
else if( 0 == strcmp( env, "SSE3" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1 | kHasSupplementalSSE3;
|
|
||||||
else if( 0 == strcmp( env, "SSE2" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1 | kHasSupplementalSSE3 | kHasSSE3;
|
|
||||||
|
|
||||||
log_info( "*** Environment: CL_MAX_SSE = %s ***\n", env );
|
|
||||||
_cpu_capabilities &= ~mask;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( gTestSmallImages )
|
if( gTestSmallImages )
|
||||||
log_info( "Note: Using small test images\n" );
|
log_info( "Note: Using small test images\n" );
|
||||||
|
|
||||||
|
|||||||
@@ -1082,40 +1082,6 @@ static int ParseArgs( int argc, const char **argv )
|
|||||||
gWimpyMode = 1;
|
gWimpyMode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( __APPLE__ )
|
|
||||||
#if defined( __i386__ ) || defined( __x86_64__ )
|
|
||||||
#define kHasSSE3 0x00000008
|
|
||||||
#define kHasSupplementalSSE3 0x00000100
|
|
||||||
#define kHasSSE4_1 0x00000400
|
|
||||||
#define kHasSSE4_2 0x00000800
|
|
||||||
/* check our environment for a hint to disable SSE variants */
|
|
||||||
{
|
|
||||||
const char *env = getenv( "CL_MAX_SSE" );
|
|
||||||
if( env )
|
|
||||||
{
|
|
||||||
extern int _cpu_capabilities;
|
|
||||||
int mask = 0;
|
|
||||||
if( 0 == strcasecmp( env, "SSE4.1" ) )
|
|
||||||
mask = kHasSSE4_2;
|
|
||||||
else if( 0 == strcasecmp( env, "SSSE3" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1;
|
|
||||||
else if( 0 == strcasecmp( env, "SSE3" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1 | kHasSupplementalSSE3;
|
|
||||||
else if( 0 == strcasecmp( env, "SSE2" ) )
|
|
||||||
mask = kHasSSE4_2 | kHasSSE4_1 | kHasSupplementalSSE3 | kHasSSE3;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
vlog_error( "Error: Unknown CL_MAX_SSE setting: %s\n", env );
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
vlog( "*** Environment: CL_MAX_SSE = %s ***\n", env );
|
|
||||||
_cpu_capabilities &= ~mask;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* __APPLE__ */
|
|
||||||
|
|
||||||
vlog( "\nTest binary built %s %s\n", __DATE__, __TIME__ );
|
vlog( "\nTest binary built %s %s\n", __DATE__, __TIME__ );
|
||||||
|
|
||||||
PrintArch();
|
PrintArch();
|
||||||
|
|||||||
Reference in New Issue
Block a user