This commit is contained in:
Youmu Liu
2026-03-26 18:02:13 +08:00
parent d960d02972
commit 06e3aa119b
20 changed files with 198 additions and 169 deletions
+1 -1
View File
@@ -172,7 +172,7 @@
<!-- source files -->
<!-- ════════════════════════════════════════════════════════ -->
<ItemGroup>
<ClCompile Include="sn-src\m.basic.x86.c" />
<ClCompile Include="sn-src\m.transpose.x86.c" />
<ClCompile Include="sn-src\dllmain.c" />
<ClCompile Include="sn-src\m.bufop.x86.c" />
<ClCompile Include="sn-src\m.solve.x86.c" />
@@ -39,7 +39,7 @@
<ClCompile Include="sn-src\load_glfw.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="sn-src\m.basic.x86.c">
<ClCompile Include="sn-src\m.transpose.x86.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="sn-src\sk.fma.x86.c">
+1 -20
View File
@@ -141,7 +141,7 @@ SN_API SIMDID SN_DECL sn_get_simd_level_local()
const int is_amd = (strcmp(vendor, "AuthenticAMD") == 0);
const int is_hygon = (strcmp(vendor, "HygonGenuine") == 0);
const int is_centaur = (strcmp(vendor, "CentaurHauls") == 0);
const int is_zhaoxin = (memcmp(vendor, " Shanghai ", 12) == 0);
const int is_zhaoxin = (strcmp(vendor, " Shanghai ") == 0);
const int is_via = is_centaur || is_zhaoxin;
get_cpuid(1, 0, &eax, &ebx, &ecx, &edx);
@@ -350,23 +350,4 @@ 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