multiarch
This commit is contained in:
parent
bb9792cf06
commit
4effb3f1bd
@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#if defined(__x86_64__)
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
#include <cstdio>
|
||||
#include <sys/types.h>
|
||||
@ -35,7 +33,7 @@ cmask_get_next_cpu(uint64_t *mask)
|
||||
static inline int
|
||||
cmask_get_num_cpus(const uint64_t mask)
|
||||
{
|
||||
return _mm_popcnt_u64(mask);
|
||||
return __builtin_popcount(mask);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user