File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,11 @@ int32_t cpu_get_num_cores_win(bool print_physical_core_num) {
97
97
num_cores_win += info->Processor .GroupCount ;
98
98
} else {
99
99
for (WORD i = 0 ; i < info->Processor .GroupCount ; ++i) {
100
+ #ifdef _MSC_VER
100
101
num_cores_win += __popcnt64 (info->Processor .GroupMask [i].Mask );
102
+ #else
103
+ num_cores_win += _popcnt64 (info->Processor .GroupMask [i].Mask );
104
+ #endif
101
105
}
102
106
}
103
107
}
Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ struct llama_control_vector_load_info;
44
44
//
45
45
// CPU utils
46
46
//
47
-
47
+ #ifdef _WIN32
48
+ int32_t cpu_get_num_cores_win (bool print_physical_core_num);
49
+ #endif
48
50
int32_t cpu_get_num_physical_cores ();
49
51
int32_t cpu_get_num_math ();
50
52
You can’t perform that action at this time.
0 commit comments