find a way to create Thread binded to LogicalCore properly

This commit is contained in:
Youmu Liu
2026-04-14 18:08:22 +08:00
parent b07013a003
commit fdf11c729f
15 changed files with 228 additions and 254 deletions
+4 -20
View File
@@ -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