|
Cloo 0.9.1
|
Represents an OpenCL buffer. More...
Public Member Functions | |
| ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, long count) | |
| Creates a new ComputeBuffer{T}. | |
| ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, long count, IntPtr dataPtr) | |
| Creates a new ComputeBuffer{T}. | |
| ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, T[] data) | |
| Creates a new ComputeBuffer{T}. | |
Static Public Member Functions | |
| static ComputeBuffer< DataType > | CreateFromGLBuffer< DataType > (ComputeContext context, ComputeMemoryFlags flags, int bufferId) |
| Creates a new ComputeBuffer{T} from an existing OpenGL buffer object. | |
Represents an OpenCL buffer.
| T | The type of the elements of the ComputeBuffer{T}. T is restricted to value types and structs containing such types. |
A memory object that stores a linear collection of bytes. Buffer objects are accessible using a pointer in a kernel executing on a device.
| T | : | struct |
| Cloo.ComputeBuffer< T >.ComputeBuffer | ( | ComputeContext | context, |
| ComputeMemoryFlags | flags, | ||
| long | count | ||
| ) |
Creates a new ComputeBuffer{T}.
| context | A ComputeContext used to create the ComputeBuffer{T}. |
| flags | A bit-field that is used to specify allocation and usage information about the ComputeBuffer{T}. |
| count | The number of elements of the ComputeBuffer{T}. |
| Cloo.ComputeBuffer< T >.ComputeBuffer | ( | ComputeContext | context, |
| ComputeMemoryFlags | flags, | ||
| long | count, | ||
| IntPtr | dataPtr | ||
| ) |
Creates a new ComputeBuffer{T}.
| context | A ComputeContext used to create the ComputeBuffer{T}. |
| flags | A bit-field that is used to specify allocation and usage information about the ComputeBuffer{T}. |
| count | The number of elements of the ComputeBuffer{T}. |
| dataPtr | A pointer to the data for the ComputeBuffer{T}. |
| Cloo.ComputeBuffer< T >.ComputeBuffer | ( | ComputeContext | context, |
| ComputeMemoryFlags | flags, | ||
| T[] | data | ||
| ) |
Creates a new ComputeBuffer{T}.
| context | A ComputeContext used to create the ComputeBuffer{T}. |
| flags | A bit-field that is used to specify allocation and usage information about the ComputeBuffer{T}. |
| data | The data for the ComputeBuffer{T}. |
Note, that data cannot be an "immediate" parameter, i.e.: new T[100], because it could be quickly collected by the GC causing Cloo to send and invalid reference to OpenCL.
| static ComputeBuffer<DataType> Cloo.ComputeBuffer< T >.CreateFromGLBuffer< DataType > | ( | ComputeContext | context, |
| ComputeMemoryFlags | flags, | ||
| int | bufferId | ||
| ) | [static] |
Creates a new ComputeBuffer{T} from an existing OpenGL buffer object.
| DataType | The type of the elements of the ComputeBuffer{T}. T should match the type of the elements in the OpenGL buffer. |
| context | A ComputeContext with enabled CL/GL sharing. |
| flags | A bit-field that is used to specify usage information about the ComputeBuffer{T}. Only ComputeMemoryFlags.ReadOnly, ComputeMemoryFlags.WriteOnly and ComputeMemoryFlags.ReadWrite are allowed. |
| bufferId | The OpenGL buffer object id to use for the creation of the ComputeBuffer{T}. |
| DataType | : | struct |
1.7.4