File tree 3 files changed +13
-9
lines changed
3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,12 @@ function(target_architecture output_arch output_arch_ver)
12
12
# #error preprocessor directives... but by exploiting the preprocessor in this
13
13
# way, we can detect the correct target architecture even when cross-compiling,
14
14
# since the program itself never needs to be run (only the compiler/preprocessor)
15
- try_run (
16
- run_result_unused
15
+ try_compile (
17
16
compile_result_unused
18
17
"${CMAKE_BINARY_DIR} "
19
18
"${FastSIMD_SOURCE_DIR} /cmake/ArchDetect.cpp"
20
- COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT
21
- CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
19
+ OUTPUT_VARIABLE COMPILE_OUTPUT
22
20
)
23
-
24
21
#message(STATUS ${COMPILE_OUTPUT})
25
22
26
23
# Parse the architecture name from the compiler output
Original file line number Diff line number Diff line change 3
3
#define TO_LITERAL_ ( string ) #string
4
4
#define TO_LITERAL ( string ) TO_LITERAL_( string )
5
5
6
- #if !defined( TEST_FEATURE_SET_ACTIVE ) || FASTSIMD_FEATURE_VALUE( TEST_FEATURE_SET_ACTIVE ) > 0
6
+ #if !defined( TEST_FEATURE_SET_ACTIVE )
7
+ #define FASTSIMD_DETECT_SUCCESS
8
+ #else
9
+ #if FASTSIMD_FEATURE_VALUE( TEST_FEATURE_SET_ACTIVE ) > 0
10
+ #define FASTSIMD_DETECT_SUCCESS
11
+ #endif
12
+ #endif
7
13
14
+ #ifdef FASTSIMD_DETECT_SUCCESS
8
15
static_assert ( 0 , " FASTSIMD_ARCH<" TO_LITERAL( FASTSIMD_ARCH_NAME() ) ">" );
9
16
10
17
// Needed for MacOS clang, it doesn't evaluate macros in static assert errors
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ struct TestRunner
67
67
};
68
68
69
69
template <FastSIMD::FeatureSet HEAD, FastSIMD::FeatureSet... TAIL>
70
- struct TestOrganiser <FastSIMD::FeatureSetList<HEAD, TAIL...>>
70
+ struct TestOrganiser <FastSIMD::FeatureSetList<0 , HEAD, TAIL...>>
71
71
{
72
72
static TestCollection GetCollections ()
73
73
{
74
- TestCollection collections = TestOrganiser<FastSIMD::FeatureSetList<TAIL...>>::GetCollections ();
74
+ TestCollection collections = TestOrganiser<FastSIMD::FeatureSetList<0 , TAIL...>>::GetCollections ();
75
75
76
76
if ( HEAD <= FastSIMD::DetectCpuMaxFeatureSet () )
77
77
{
@@ -280,7 +280,7 @@ struct TestRunner
280
280
{
281
281
std::cout << " Starting Tests - Register Size: " << RegisterBytes * 8 << " (" << RegisterBytes << " b)" << std::endl;
282
282
283
- TestSet testSet = TestOrganiser<FastSIMD::test_simd ::CompiledFeatureSets>::GetSet ();
283
+ TestSet testSet = TestOrganiser<FastSIMD::simd_test ::CompiledFeatureSets>::GetSet ();
284
284
285
285
for ( auto & test : testSet )
286
286
{
You can’t perform that action at this time.
0 commit comments