vrt::StreamingBuffer

template<typename T>
class StreamingBuffer

Class representing a streaming buffer.

This class provides an interface for managing a streaming buffer in a device. It supports streaming QDMA connections.

Template Parameters:

T – The type of the elements in the buffer.

Public Functions

StreamingBuffer(Device device, Kernel kernel, const std::string &portName, size_t size)

Constructs a StreamingBuffer object.

Parameters:
  • device – The device associated with the buffer.

  • kernel – The kernel associated with the buffer.

  • portName – The name of the port associated with the buffer.

  • size – The size of the buffer.

~StreamingBuffer()

Destructs the StreamingBuffer object.

T *get() const

Gets a pointer to the buffer.

Returns:

A pointer to the buffer.

T &operator[](size_t index)

Accesses an element in the buffer.

Parameters:

index – The index of the element to access.

Throws:

std::out_of_range – If the index is out of range.

Returns:

A reference to the element at the specified index.

const T &operator[](size_t index) const

Accesses an element in the buffer (const version).

Parameters:

index – The index of the element to access.

Throws:

std::out_of_range – If the index is out of range.

Returns:

A const reference to the element at the specified index.

std::string getName() const

Gets the name of the buffer.

Returns:

The name of the buffer.

void sync()

Synchronizes the buffer with the device.