find a way to create Thread binded to LogicalCore properly
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#include "sn_target.h"
|
||||
#include "sn_intrinsic.h"
|
||||
#include "StgSharpNative.h"
|
||||
|
||||
static SIMDID global_simdid = { 0 };
|
||||
/* clang-format off */
|
||||
|
||||
#if SN_IS_ARCH(SN_ARCH_X86_64)
|
||||
#include "sn_intrinsic.h"
|
||||
#include "StgSharpNative.h"
|
||||
static SIMDID global_simdid = { 0 };
|
||||
|
||||
#include "sn_intrinsic.context.x86.h"
|
||||
|
||||
@@ -350,23 +351,6 @@ SN_API SIMDID SN_DECL sn_get_simd_level_global()
|
||||
return global_simdid;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
SN_API SIMDID SN_DECL sn_get_simd_level_local()
|
||||
{
|
||||
SIMDID simdid;
|
||||
simdid.mask = 0;
|
||||
return simdid;
|
||||
}
|
||||
|
||||
SN_API SIMDID SN_DECL sn_get_simd_level_global()
|
||||
{
|
||||
if (global_simdid.mask) {
|
||||
return global_simdid;
|
||||
}
|
||||
|
||||
global_simdid = sn_get_simd_level_local();
|
||||
return global_simdid;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user