/home/runner/work/HiCR/HiCR/include/hicr/backends/opencl/device.hpp Source File
HiCR
|
device.hpp
Go to the documentation of this file.
126 if (input.contains(idKey) == false) HICR_THROW_LOGIC("The serialized object contains no '%s' key", idKey.c_str());
127 if (input[idKey].is_number() == false) HICR_THROW_LOGIC("The '%s' entry is not a number", idKey.c_str());
129 if (input.contains(typeKey) == false) HICR_THROW_LOGIC("The serialized object contains no '%s' key", typeKey.c_str());
130 if (input[typeKey].is_number() == false) HICR_THROW_LOGIC("The '%s' entry is not a number", typeKey.c_str());
141 if (type != getType() + " Processing Unit") HICR_THROW_LOGIC("The passed device type '%s' is not compatible with this topology manager", type.c_str());
157 if (type != getType() + " RAM") HICR_THROW_LOGIC("The passed device type '%s' is not compatible with this topology manager", type.c_str());
This file implements the compute resource class for the OpenCL backend.
This file implements the memory space class for the OpenCL backend.
Definition device.hpp:53
__INLINE__ void deserialize(const nlohmann::json &input)
Definition device.hpp:152
std::vector< std::shared_ptr< ComputeResource > > computeResourceList_t
Definition device.hpp:59
std::vector< std::shared_ptr< MemorySpace > > memorySpaceList_t
Definition device.hpp:64
__INLINE__ void addMemorySpace(const std::shared_ptr< HiCR::MemorySpace > &memorySpace)
Definition device.hpp:99
__INLINE__ void addComputeResource(const std::shared_ptr< HiCR::ComputeResource > &computeResource)
Definition device.hpp:92
Definition device.hpp:37
__INLINE__ std::string getType() const override
Definition device.hpp:104
__INLINE__ const cl::Device & getOpenCLDevice() const
Definition device.hpp:111
__INLINE__ deviceIdentifier_t getId() const
Definition device.hpp:97
uint64_t deviceIdentifier_t
Definition device.hpp:43
Device(const deviceIdentifier_t id, const std::string &type, const std::shared_ptr< cl::Device > &device, const computeResourceList_t &computeResources, const memorySpaceList_t &memorySpaces)
Definition device.hpp:54
Provides a base definition for a HiCR Device class.
constexpr std::string_view _HICR_DEVICE_MEMORY_SPACES_KEY_
Definition device.hpp:40
constexpr std::string_view _HICR_DEVICE_COMPUTE_RESOURCES_KEY_
Definition device.hpp:35
Generated by