C++ Run-time Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
fletcher::DeviceBuffer Struct Reference

A buffer on the device. More...

#include <context.h>

Collaboration diagram for fletcher::DeviceBuffer:
Collaboration graph
[legend]

Public Member Functions

 DeviceBuffer ()=default
 Construct a default DeviceBuffer.
 
 DeviceBuffer (const uint8_t *host_address, int64_t size, MemType type, Mode access_mode)
 Construct a new DeviceBuffer.
 

Public Attributes

const uint8_t * host_address = nullptr
 The host-side mirror address of this buffer.
 
da_t device_address = D_NULLPTR
 The device-side address of this buffer.
 
int64_t size = 0
 The size of this buffer in bytes.
 
MemType memory = MemType::CACHE
 The memory type of this buffer.
 
Mode mode = Mode::READ
 The access mode as seen by the accelerator kernel.
 
bool available_to_device = false
 Whether this buffer has been made available to the device.
 
bool was_alloced = false
 Whether this buffer was allocated on the device using Platform malloc.
 

Detailed Description

A buffer on the device.

Definition at line 56 of file context.h.

Constructor & Destructor Documentation

◆ DeviceBuffer() [1/2]

fletcher::DeviceBuffer::DeviceBuffer ( )
default

Construct a default DeviceBuffer.

◆ DeviceBuffer() [2/2]

fletcher::DeviceBuffer::DeviceBuffer ( const uint8_t *  host_address,
int64_t  size,
MemType  type,
Mode  access_mode 
)
inline

Construct a new DeviceBuffer.

Definition at line 78 of file context.h.

Member Data Documentation

◆ available_to_device

bool fletcher::DeviceBuffer::available_to_device = false

Whether this buffer has been made available to the device.

Definition at line 70 of file context.h.

◆ device_address

da_t fletcher::DeviceBuffer::device_address = D_NULLPTR

The device-side address of this buffer.

Definition at line 60 of file context.h.

◆ host_address

const uint8_t* fletcher::DeviceBuffer::host_address = nullptr

The host-side mirror address of this buffer.

Definition at line 58 of file context.h.

◆ memory

MemType fletcher::DeviceBuffer::memory = MemType::CACHE

The memory type of this buffer.

Definition at line 65 of file context.h.

◆ mode

Mode fletcher::DeviceBuffer::mode = Mode::READ

The access mode as seen by the accelerator kernel.

Definition at line 67 of file context.h.

◆ size

int64_t fletcher::DeviceBuffer::size = 0

The size of this buffer in bytes.

Definition at line 62 of file context.h.

◆ was_alloced

bool fletcher::DeviceBuffer::was_alloced = false

Whether this buffer was allocated on the device using Platform malloc.

Definition at line 72 of file context.h.


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