geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
GPUTopo.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef GPUTOPO_HPP_INCLUDE
7 #define GPUTOPO_HPP_INCLUDE
8 
9 #include <cstdint>
10 #include <vector>
11 #include <set>
12 
13 namespace geopm
14 {
15  class GPUTopo
16  {
17  public:
18  GPUTopo() = default;
19  virtual ~GPUTopo() = default;
22  virtual int num_gpu(void) const = 0;
23  virtual int num_gpu(int domain) const = 0;
28  virtual std::set<int> cpu_affinity_ideal(int domain_idx) const = 0;
29  virtual std::set<int> cpu_affinity_ideal(int domain, int domain_idx) const = 0;
30  };
31 
32  const GPUTopo &gpu_topo(void);
33 }
34 #endif
Definition: GPUTopo.hpp:16
virtual int num_gpu(int domain) const =0
virtual std::set< int > cpu_affinity_ideal(int domain, int domain_idx) const =0
virtual ~GPUTopo()=default
GPUTopo()=default
virtual int num_gpu(void) const =0
Number of GPUs on the platform.
virtual std::set< int > cpu_affinity_ideal(int domain_idx) const =0
CPU Affinitization set for a particular GPU.
Definition: Agg.cpp:20
const GPUTopo & gpu_topo(void)
Definition: GPUTopo.cpp:89