diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-10-30 17:21:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 17:21:25 +0000 |
commit | b68e0fa5ff4048e78753d43164ed445d62582741 (patch) | |
tree | cb50316434272114e9f8f308ba9d6044a8d2a84d /xmrstak/backend/cpu/hwlocMemory.hpp | |
parent | a7fb89bec2b88cc694bf88aed729451bb9bdd8a0 (diff) | |
parent | 34a3c701cf9b439c0fe1cc2710b6bc8b0c2eb5a1 (diff) | |
download | xmr-stak-b68e0fa5ff4048e78753d43164ed445d62582741.zip xmr-stak-b68e0fa5ff4048e78753d43164ed445d62582741.tar.gz |
Merge pull request #77 from psychocrypt/topic-appveyorCudaSupport
appveyor CUDA support
Diffstat (limited to 'xmrstak/backend/cpu/hwlocMemory.hpp')
-rw-r--r-- | xmrstak/backend/cpu/hwlocMemory.hpp | 56 |
1 files changed, 2 insertions, 54 deletions
diff --git a/xmrstak/backend/cpu/hwlocMemory.hpp b/xmrstak/backend/cpu/hwlocMemory.hpp index 69742be..2130c2c 100644 --- a/xmrstak/backend/cpu/hwlocMemory.hpp +++ b/xmrstak/backend/cpu/hwlocMemory.hpp @@ -1,10 +1,6 @@ #pragma once -#include "xmrstak/misc/console.hpp" - -#ifndef CONF_NO_HWLOC - -#include <hwloc.h> +#include <cstddef> /** pin memory to NUMA node * @@ -13,52 +9,4 @@ * * @param puId core id */ -void bindMemoryToNUMANode( size_t puId ) -{ - int depth; - hwloc_topology_t topology; - - hwloc_topology_init(&topology); - hwloc_topology_load(topology); - - if(!hwloc_topology_get_support(topology)->membind->set_thisthread_membind) - { - printer::inst()->print_msg(L0, "hwloc: set_thisthread_membind not supported"); - hwloc_topology_destroy(topology); - return; - } - - depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU); - - for( size_t i = 0; - i < hwloc_get_nbobjs_by_depth(topology, depth); - i++ ) - { - hwloc_obj_t pu = hwloc_get_obj_by_depth(topology, depth, i); - if( pu->os_index == puId ) - { - if( 0 > hwloc_set_membind_nodeset( - topology, - pu->nodeset, - HWLOC_MEMBIND_BIND, - HWLOC_MEMBIND_THREAD)) - { - printer::inst()->print_msg(L0, "hwloc: can't bind memory"); - } - else - { - printer::inst()->print_msg(L0, "hwloc: memory pinned"); - break; - } - } - } - - hwloc_topology_destroy(topology); -} -#else - -void bindMemoryToNUMANode( size_t ) -{ -} - -#endif +void bindMemoryToNUMANode( size_t puId ); |