Added RxNUMAStorage stub.
This commit is contained in:
parent
7508411faf
commit
207dae418d
7 changed files with 275 additions and 8 deletions
|
@ -200,6 +200,20 @@ xmrig::HwlocCpuInfo::~HwlocCpuInfo()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::HwlocCpuInfo::membind(hwloc_const_bitmap_t nodeset)
|
||||
{
|
||||
if (!hwloc_topology_get_support(m_topology)->membind->set_thisthread_membind) {
|
||||
return false;
|
||||
}
|
||||
|
||||
# if HWLOC_API_VERSION >= 0x20000
|
||||
return hwloc_set_membind(m_topology, nodeset, HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET) >= 0;
|
||||
# else
|
||||
return hwloc_set_membind_nodeset(m_topology, nodeset, HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_THREAD) >= 0;
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
xmrig::CpuThreads xmrig::HwlocCpuInfo::threads(const Algorithm &algorithm, uint32_t limit) const
|
||||
{
|
||||
if (L2() == 0 && L3() == 0) {
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
#include "base/tools/Object.h"
|
||||
|
||||
|
||||
using hwloc_obj_t = struct hwloc_obj *;
|
||||
using hwloc_topology_t = struct hwloc_topology *;
|
||||
using hwloc_const_bitmap_t = const struct hwloc_bitmap_s *;
|
||||
using hwloc_obj_t = struct hwloc_obj *;
|
||||
using hwloc_topology_t = struct hwloc_topology *;
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
@ -56,6 +57,8 @@ public:
|
|||
inline const std::vector<uint32_t> &nodeset() const { return m_nodeset; }
|
||||
inline hwloc_topology_t topology() const { return m_topology; }
|
||||
|
||||
bool membind(hwloc_const_bitmap_t nodeset);
|
||||
|
||||
protected:
|
||||
CpuThreads threads(const Algorithm &algorithm, uint32_t limit) const override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue