Preparation for #1.4.0 (#30)
- Fixed CPU affinity on Windows for NUMA and CPUs with lot of cores - Implemented per thread configurable Multihash mode (double, triple, quadruple, quintuple) - Rebased from XMRig 2.4.4
This commit is contained in:
parent
990bf8d963
commit
cf868666d4
41 changed files with 2575 additions and 1104 deletions
|
@ -36,7 +36,7 @@
|
|||
#include <string.h>
|
||||
|
||||
|
||||
#include "Cpu.h"
|
||||
#include "CpuImpl.h"
|
||||
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
|
@ -44,7 +44,7 @@ typedef cpuset_t cpu_set_t;
|
|||
#endif
|
||||
|
||||
|
||||
void Cpu::init()
|
||||
void CpuImpl::init()
|
||||
{
|
||||
# ifdef XMRIG_NO_LIBCPUID
|
||||
m_totalThreads = sysconf(_SC_NPROCESSORS_CONF);
|
||||
|
@ -54,12 +54,12 @@ void Cpu::init()
|
|||
}
|
||||
|
||||
|
||||
void Cpu::setAffinity(int id, uint64_t mask)
|
||||
void CpuImpl::setAffinity(int id, uint64_t mask)
|
||||
{
|
||||
cpu_set_t set;
|
||||
CPU_ZERO(&set);
|
||||
|
||||
for (int i = 0; i < m_totalThreads; i++) {
|
||||
for (int i = 0; i < threads(); i++) {
|
||||
if (mask & (1UL << i)) {
|
||||
CPU_SET(i, &set);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue