NumaInfo.hpp 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ///
  2. /// \file System/NumaInfo.hpp
  3. ///
  4. /// Support for querying information about NUMA.
  5. ///
  6. /// \copyright
  7. /// Copyright (c) 2013-2014 Josh Blum
  8. /// SPDX-License-Identifier: BSL-1.0
  9. ///
  10. #pragma once
  11. #include <Pothos/Config.hpp>
  12. #include <vector>
  13. #include <cstddef>
  14. namespace Pothos {
  15. namespace System {
  16. /*!
  17. * NumaInfo contains information about a NUMA node on the system.
  18. */
  19. class POTHOS_API NumaInfo
  20. {
  21. public:
  22. //! Create a blank NumaNodeInfo with empty values
  23. NumaInfo(void);
  24. /*!
  25. * Query a list of per-node NumaInfo structs.
  26. */
  27. static std::vector<NumaInfo> get(void);
  28. //! The numeric identifier for this NUMA node
  29. size_t nodeNumber;
  30. //! The total memory on this NUMA node in bytes
  31. size_t totalMemory;
  32. //! The available memory on this NUMA node in bytes
  33. size_t freeMemory;
  34. //! A list of CPUs located on this NUMA node
  35. std::vector<size_t> cpus;
  36. };
  37. } //namespace System
  38. } //namespace Pothos