Device Class Reference
HiCR
|
HiCR::backend::opencl::Device Class Referencefinal
#include <device.hpp>
Inheritance diagram for HiCR::backend::opencl::Device:

Public Types | |
typedef uint64_t | deviceIdentifier_t |
![]() | |
using | computeResourceList_t = std::vector< std::shared_ptr< ComputeResource > > |
using | memorySpaceList_t = std::vector< std::shared_ptr< MemorySpace > > |
Public Member Functions | |
Device (const deviceIdentifier_t id, const std::string &type, const std::shared_ptr< cl::Device > &device, const computeResourceList_t &computeResources, const memorySpaceList_t &memorySpaces) | |
Device () | |
Device (const nlohmann::json &input) | |
~Device () | |
__INLINE__ deviceIdentifier_t | getId () const |
__INLINE__ std::string | getType () const override |
__INLINE__ const cl::Device & | getOpenCLDevice () const |
![]() | |
__INLINE__ const computeResourceList_t & | getComputeResourceList () |
__INLINE__ const memorySpaceList_t & | getMemorySpaceList () |
__INLINE__ void | addComputeResource (const std::shared_ptr< HiCR::ComputeResource > &computeResource) |
__INLINE__ void | addMemorySpace (const std::shared_ptr< HiCR::MemorySpace > &memorySpace) |
Device (computeResourceList_t computeResources, memorySpaceList_t memorySpaces) | |
__INLINE__ nlohmann::json | serialize () const |
__INLINE__ void | deserialize (const nlohmann::json &input) |
Additional Inherited Members | |
![]() | |
Device ()=default | |
Detailed Description
This class represents a device, as visible by the OpenCL backend.
Member Typedef Documentation
◆ deviceIdentifier_t
typedef uint64_t HiCR::backend::opencl::Device::deviceIdentifier_t |
Type definition for the OpenCL Device identifier
Constructor & Destructor Documentation
◆ Device() [1/3]
|
inline |
Constructor for an OpenCL device
- Parameters
-
id Internal unique identifier for the device type Device type device OpenCL device class computeResources The compute resources associated to this device (typically just one, the main OpenCL processor) memorySpaces The memory spaces associated to this device (DRAM + other use-specific or high-bandwidth memories)
◆ Device() [2/3]
|
inline |
Default constructor for resource requesting
◆ Device() [3/3]
|
inline |
Deserializing constructor
The instance created will contain all information, if successful in deserializing it, corresponding to the passed OpenCL device This instance should NOT be used for anything else than reporting/printing the contained resources
- Parameters
-
[in] input A JSON-encoded serialized OpenCL device information
◆ ~Device()
|
inlinevirtual |
Device destructor
Reimplemented from HiCR::Device.
Member Function Documentation
◆ getId()
|
inline |
Get device id
- Returns
- device id
◆ getOpenCLDevice()
|
inline |
◆ getType()
|
inlineoverridevirtual |
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/opencl/device.hpp
Generated by