This commit is contained in:
mann1x 2024-04-27 15:41:00 +02:00
parent b01716a653
commit 49c1657821
2 changed files with 5 additions and 5 deletions

View file

@ -138,8 +138,8 @@ uint64_t generate_Mask(int32_t direction, int32_t req_threads, int32_t lltravers
int32_t llcache = -1;
#if defined(_WIN32)
DWORD_PTR processAffinityMask;
DWORD_PTR systemAffinityMask;
ULONG_PTR processAffinityMask;
ULONG_PTR systemAffinityMask;
HANDLE hToken = nullptr;
bool gotsystemMask = true;
@ -607,8 +607,8 @@ typedef enum _PROCESSINFOCLASS {
} PROCESSINFOCLASS;
int32_t setCpuAffinity(std::bitset<64> cpuMask) {
DWORD_PTR processAffinityMask;
DWORD_PTR systemAffinityMask;
ULONG_PTR processAffinityMask;
ULONG_PTR systemAffinityMask;
int32_t coreSelected = get_count_procMask(cpuMask.to_ullong());
HANDLE hToken = nullptr;

2
ggml.c
View file

@ -95,7 +95,7 @@ static int pthread_create(pthread_t * out, int32_t thread, thread_ret_t(*func)(v
if (posCore+1 == thread) {
//fprintf(stderr, "Thread %d is assigned to core %d\n", thread, i);
} else {
newprocessAffinityMask = newprocessAffinityMask | (0ULL << i-1);
newprocessAffinityMask = newprocessAffinityMask | ((0ULL) << (i-1));
//fprintf(stderr, "Thread %d is NOT assigned to core %d\n", thread, i);
break;
}