Navigation
API > API/Developer > API/Developer/Horde > API/Developer/Horde/Compute
References
| Module | Horde |
| Header | /Engine/Source/Developer/Horde/Public/Compute/ComputeBuffer.h |
| Include | #include "Compute/ComputeBuffer.h" |
Syntax
class FComputeBuffer
Remarks
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.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FComputeBuffer
(
const FComputeBuffer& Other |
|||
FComputeBuffer
(
FComputeBuffer&& Other |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Close () |
Close the current buffer and release all allocated resources. | |
| bool | Creates a new buffer. | ||
| FComputeBufferReader | CreateReader () |
Creates a new reader for this buffer. | |
| FComputeBufferWriter | CreateWriter () |
Creates a new writer for this buffer. | |
| bool | IsValid () |
Test if the buffer is currently open. | |
| bool | OpenExisting
(
const char* Name |
Opens an existing shared memory buffer (typically from handles created in another process) |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FComputeBuffer & | operator=
(
const FComputeBuffer& Other |
||
| FComputeBuffer & | operator=
(
FComputeBuffer&& Other |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FParams | Parameters for constructing a compute buffer. |
Constants
| Name | Description |
|---|---|
| MaxChunks | Maximum allowed number of chunks. |
| MaxNameLength | Maximum length of a compute buffer name. |
| MaxReaders | Maximum allowed number of readers. |