fix build bug on msys2-clang64 and ucrt64
This commit is contained in:
parent
079ac82124
commit
1d1e6e8ee4
2 changed files with 7 additions and 1 deletions
|
@ -97,7 +97,11 @@ int32_t cpu_get_num_cores_win(bool print_physical_core_num) {
|
|||
num_cores_win += info->Processor.GroupCount;
|
||||
} else {
|
||||
for (WORD i = 0; i < info->Processor.GroupCount; ++i) {
|
||||
#ifdef _MSC_VER
|
||||
num_cores_win += __popcnt64(info->Processor.GroupMask[i].Mask);
|
||||
#else
|
||||
num_cores_win += _popcnt64(info->Processor.GroupMask[i].Mask);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,9 @@ struct llama_control_vector_load_info;
|
|||
//
|
||||
// CPU utils
|
||||
//
|
||||
|
||||
#ifdef _WIN32
|
||||
int32_t cpu_get_num_cores_win(bool print_physical_core_num);
|
||||
#endif
|
||||
int32_t cpu_get_num_physical_cores();
|
||||
int32_t cpu_get_num_math();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue