mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user