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