NUMA++ 0.12.0
Loading...
Searching...
No Matches
numa.hpp
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup numapp_numa
4 * @copyright
5 * SPDX-FileCopyrightText: 2023-2023 European Southern Observatory (ESO)
6 *
7 * SPDX-License-Identifier: LGPL-3.0-only
8 */
9#ifndef NUMAPP_NUMA_HPP
10#define NUMAPP_NUMA_HPP
11#include <numa.h>
12
13namespace numapp {
14
15/**
16 * Query whether system has NUMA support.
17 *
18 * Example use:
19 *
20 * @include schedulerExample1.cpp
21 *
22 * @returns true if system has NUMA support available.
23 * @returns false otherwise which makes result of any other NUMA++ function unspecified.
24 *
25 * @manpages
26 * @manpage{numa,3,@c numa_available}
27 * @ingroup numapp_numa
28 * @par Header file
29 * @c <numapp/numa.hpp>
30 */
31[[nodiscard]] inline bool NumaAvailable() noexcept;
32
33} // namespace numapp
34
35[[nodiscard]] inline bool numapp::NumaAvailable() noexcept {
36 return numa_available() != -1;
37}
38
39#endif // NUMAPP_NUMA_HPP
bool NumaAvailable() noexcept
Query whether system has NUMA support.
Definition numa.hpp:35