Navigation
API > API/Developer > API/Developer/Horde
Implements a ring buffer using shared memory, with one writer and multiple readers.
Contention between the writer and readers is resolved by splitting the buffer into a number of fixed-size chunks, which can be appended to and read immediately, but only reset once consumed by all readers.
If the read position is never advanced and only one chunk is used, the buffer functions as an append-only buffer.
| Name | FComputeBuffer |
| Type | class |
| Header File | /Engine/Source/Developer/Horde/Public/Compute/ComputeBuffer.h |
| Include Path | #include "Compute/ComputeBuffer.h" |
Syntax
class FComputeBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Compute/ComputeBuffer.h | |||
FComputeBuffer
(
const FComputeBuffer& Other |
Compute/ComputeBuffer.h | ||
FComputeBuffer
(
FComputeBuffer&& Other |
Compute/ComputeBuffer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FComputeBuffer() |
Compute/ComputeBuffer.h |
Structs
| Name | Remarks |
|---|---|
| FParams | Parameters for constructing a compute buffer. |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxChunks | const int | Maximum allowed number of chunks. | Compute/ComputeBuffer.h |
| MaxNameLength | const size_t | Maximum length of a compute buffer name. | Compute/ComputeBuffer.h |
| MaxReaders | const int | Maximum allowed number of readers. | Compute/ComputeBuffer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Detail | FComputeBufferDetail * | Compute/ComputeBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Close() |
Close the current buffer and release all allocated resources. | Compute/ComputeBuffer.h | |
bool CreateNew
(
const FParams& Params |
Creates a new buffer. | Compute/ComputeBuffer.h | |
FComputeBufferReader CreateReader() |
Creates a new reader for this buffer. | Compute/ComputeBuffer.h | |
FComputeBufferWriter CreateWriter() |
Creates a new writer for this buffer. | Compute/ComputeBuffer.h | |
bool IsValid() |
Test if the buffer is currently open. | Compute/ComputeBuffer.h | |
bool OpenExisting
(
const char* Name |
Opens an existing shared memory buffer (typically from handles created in another process) | Compute/ComputeBuffer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FComputeBuffer & operator=
(
const FComputeBuffer& Other |
Compute/ComputeBuffer.h | ||
FComputeBuffer & operator=
(
FComputeBuffer&& Other |
Compute/ComputeBuffer.h |