NUMA++ 0.11.0
Loading...
Searching...
No Matches
numa.hpp
1/**
2 * @ingroup numapp_numa
3 * @copyright
4 * (c) Copyright ESO 2024
5 * All Rights Reserved
6 * ESO (eso.org) is an Intergovernmental Organisation, and therefore special legal conditions apply.
7 */
8#ifndef NUMAPP_NUMA_HPP
9#define NUMAPP_NUMA_HPP
10#include <numa.h>
11
12namespace numapp {
13
14/**
15 * Query whether system has NUMA support.
16 *
17 * Example use:
18 *
19 * @include schedulerExample1.cpp
20 *
21 * @returns true if system has NUMA support available.
22 * @returns false otherwise which makes result of any other NUMA++ function unspecified.
23 *
24 * @manpages
25 * @manpage{numa,3,@c numa_available}
26 * @ingroup numapp_numa
27 * @par Header file
28 * @c <numapp/numa.hpp>
29 */
30[[nodiscard]] inline bool NumaAvailable() noexcept;
31
32} // namespace numapp
33
34[[nodiscard]] inline bool numapp::NumaAvailable() noexcept {
35 return numa_available() != -1;
36}
37
38#endif // NUMAPP_NUMA_HPP
bool NumaAvailable() noexcept
Query whether system has NUMA support.
Definition numa.hpp:34