MemorySpace Class Reference
HiCR
|
HiCR::backend::ascend::MemorySpace Class Referencefinal
#include <memorySpace.hpp>
Inheritance diagram for HiCR::backend::ascend::MemorySpace:

Public Member Functions | |
MemorySpace (const std::weak_ptr< ascend::Device > device, const size_t size) | |
~MemorySpace ()=default | |
MemorySpace (const nlohmann::json &input) | |
__INLINE__ std::string | getType () const override |
__INLINE__ const std::weak_ptr< const ascend::Device > | getDevice () const |
![]() | |
virtual __INLINE__ const size_t | getSize () const |
virtual __INLINE__ size_t | getUsage () const |
__INLINE__ void | increaseUsage (const size_t delta) |
__INLINE__ void | decreaseUsage (const size_t delta) |
__INLINE__ nlohmann::json | serialize () const |
__INLINE__ void | deserialize (const nlohmann::json &input) |
Additional Inherited Members | |
![]() | |
MemorySpace (const size_t size) | |
MemorySpace ()=default | |
Detailed Description
This class represents a memory space, as visible by the Ascend backend. That is, the entire RAM that the running CPU has access to.
Constructor & Destructor Documentation
◆ MemorySpace() [1/2]
|
inline |
Constructor for the compute resource class of the Ascend backend
- Parameters
-
device The Ascend device in which this memory space was detected size The size of this memory space
◆ ~MemorySpace()
|
virtualdefault |
Default destructor
Reimplemented from HiCR::MemorySpace.
◆ MemorySpace() [2/2]
|
inline |
Deserializing constructor
- Parameters
-
[in] input Serialized resource information
- Note
- Backwards reference to device is null when deserializing. Do not try to use this class for any operations.
Member Function Documentation
◆ getDevice()
|
inline |
Function to get the Ascend device associated to this memory space
- Returns
- The Ascend device corresponding to this memory space
◆ getType()
|
inlineoverridevirtual |
Indicates what type of memory space is contained in this instance
- Returns
- A string containing a human-readable description of the memory space type
Implements HiCR::MemorySpace.
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/ascend/memorySpace.hpp
Generated by