3 #ifndef __cuda_manager_hpp
4 #define __cuda_manager_hpp
9 #include <cuda_runtime_api.h>
10 #include <dcf/ipcmsg_man.hpp>
11 #include <dcf/manager.hpp>
25 virtual ~CUDAManager();
31 virtual size_t getUnitsCount()
const;
48 virtual dcf::error_t isAllocatedUnit(
int unit_id,
bool &is_allocated)
const;
53 dcf::error_t isAllocatedUnit(
int unit_id,
bool &is_allocated, IPCMsgMan::Message &udata)
const;
61 virtual dcf::error_t unitPower(
int unit_id,
double &power)
const;
64 dcf::error_t unitProp(
int dev_id, cudaDeviceProp &dev_prop)
const;
67 dcf::error_t currentUnitProp(cudaDeviceProp &dev_prop)
const;
70 bool isInitialized()
const {
return m_is_initialized;}
78 cudaError_t cuda_dev_alloc(
int dev_id)
const;
81 cudaError_t cuda_dev_free()
const;
84 int m_curr_allocated_unit;
87 bool m_is_initialized;
error_t
Definition: types.hpp:11
Definition: manager.hpp:19
Definition: ipcmsg_man.hpp:18