LocalMemorySlot Class Reference

HiCR: HiCR::backend::opencl::LocalMemorySlot Class Reference
HiCR
HiCR::backend::opencl::LocalMemorySlot Class Referencefinal

#include <localMemorySlot.hpp>

Inheritance diagram for HiCR::backend::opencl::LocalMemorySlot:
HiCR::LocalMemorySlot

Public Member Functions

 LocalMemorySlot (void *const pointer, size_t size, const std::shared_ptr< cl::Buffer > buffer, std::shared_ptr< HiCR::MemorySpace > memorySpace)
 
 ~LocalMemorySlot ()=default
 
__INLINE__ std::shared_ptr< cl::Buffer > getBuffer ()
 
- Public Member Functions inherited from HiCR::LocalMemorySlot
 LocalMemorySlot (void *const pointer, const size_t size, std::shared_ptr< HiCR::MemorySpace > memorySpace=nullptr)
 
__INLINE__ void *& getPointer () noexcept
 
__INLINE__ size_t getSize () const noexcept
 
__INLINE__ std::shared_ptr< HiCR::MemorySpacegetMemorySpace () const noexcept
 
__INLINE__ size_t getMessagesRecv () const noexcept
 
__INLINE__ size_t getMessagesSent () const noexcept
 

Detailed Description

This class represents an abstract definition for a Local Memory Slot resource for the OpenCL backend

Constructor & Destructor Documentation

◆ LocalMemorySlot()

HiCR::backend::opencl::LocalMemorySlot::LocalMemorySlot ( void *const  pointer,
size_t  size,
const std::shared_ptr< cl::Buffer >  buffer,
std::shared_ptr< HiCR::MemorySpace memorySpace 
)
inline

Constructor for a MemorySlot class for the OpenCL backend

Parameters
pointerif this is a local slot (same rank as this the running process), this pointer indicates the address of the local memory segment
sizethe size of the memory slot, assumed to be contiguous
bufferthe OpenCL buffer created for the memory slot
memorySpacethe OpenCL memory from which this memory slot was obtained

◆ ~LocalMemorySlot()

HiCR::backend::opencl::LocalMemorySlot::~LocalMemorySlot ( )
virtualdefault

Default destructor

Reimplemented from HiCR::LocalMemorySlot.

Member Function Documentation

◆ getBuffer()

__INLINE__ std::shared_ptr< cl::Buffer > HiCR::backend::opencl::LocalMemorySlot::getBuffer ( )
inline

Get the OpenCL buffer

Returns
OpenCL buffer

The documentation for this class was generated from the following file: