2#include <numapp/numa.hpp>
9 std::cout <<
"NUMA not available";
13 auto policy = MemPolicy(MemPolicy::Mode::Bind, Nodemask::MakeFromNodestring(
"0-1"));
16 std::cout <<
"Failed to apply policy: " << ec.message() << std::endl;
21 std::cout <<
"Failed to apply policy: " << ec.message() << std::endl;
Class representing a memory policy that can be modified and used to apply to the current thread or a ...
std::error_code Apply(CpuAffinity const &affinity) noexcept
Apply policy to calling thread.
std::error_code ApplyStack(MemPolicy const &policy, MemPolicyFlag flags=MemPolicyFlag::Move|MemPolicyFlag::Strict) noexcept
Convenience function that applies a memory policy to current thread stack memory.
bool NumaAvailable() noexcept
Query whether system has NUMA support.
Contains declarations for numapp::MemPolicy.
Type-safe NUMA node mask.