Public Member Functions | Static Public Member Functions | Properties

Cloo.ComputeBuffer< T > Class Template Reference

Represents an OpenCL buffer. More...

Inheritance diagram for Cloo.ComputeBuffer< T >:
Cloo.ComputeMemory Cloo.ComputeResource Cloo.ComputeObject

List of all members.

Public Member Functions

 ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, long count)
 Creates a new ComputeBuffer.
 ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, long count, IntPtr dataPtr)
 Creates a new ComputeBuffer.
 ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, T[] data)
 Creates a new ComputeBuffer.
override string ToString ()
 Gets the string representation of the ComputeBuffer.

Static Public Member Functions

static ComputeBuffer< T > CreateFromGLBuffer< T > (ComputeContext context, ComputeMemoryFlags flags, int bufferId)
 Creates a new ComputeBuffer from an existing OpenGL buffer object.

Properties

long Count [get]
 Gets the number of elements in the ComputeBuffer.

Detailed Description

template<T>
class Cloo::ComputeBuffer-g< T >

Represents an OpenCL buffer.

Template Parameters:
T The type of the elements of the ComputeBuffer.

A memory object that stores a linear collection of bytes. Buffer objects are accessible using a pointer in a kernel executing on a device.

See also:
ComputeDevice, ComputeKernel, ComputeMemory
Type Constraints
T :struct 

Member Function Documentation

template<T >
Cloo.ComputeBuffer< T >.ComputeBuffer ( ComputeContext  context,
ComputeMemoryFlags  flags,
long  count 
)

Creates a new ComputeBuffer.

Parameters:
context A ComputeContext used to create the ComputeBuffer.
flags A bit-field that is used to specify allocation and usage information about the ComputeBuffer.
count The number of elements of the ComputeBuffer.
template<T >
Cloo.ComputeBuffer< T >.ComputeBuffer ( ComputeContext  context,
ComputeMemoryFlags  flags,
long  count,
IntPtr  dataPtr 
)

Creates a new ComputeBuffer.

Parameters:
context A ComputeContext used to create the ComputeBuffer.
flags A bit-field that is used to specify allocation and usage information about the ComputeBuffer.
count The number of elements of the ComputeBuffer.
dataPtr A pointer to the data for the ComputeBuffer.
template<T >
Cloo.ComputeBuffer< T >.ComputeBuffer ( ComputeContext  context,
ComputeMemoryFlags  flags,
T[]  data 
)

Creates a new ComputeBuffer.

Parameters:
context A ComputeContext used to create the ComputeBuffer.
flags A bit-field that is used to specify allocation and usage information about the ComputeBuffer.
data The data for the ComputeBuffer.
template<T >
static ComputeBuffer<T> Cloo.ComputeBuffer< T >.CreateFromGLBuffer< T > ( ComputeContext  context,
ComputeMemoryFlags  flags,
int  bufferId 
) [static]

Creates a new ComputeBuffer from an existing OpenGL buffer object.

Template Parameters:
T The type of the elements of the ComputeBuffer. It is recommended, though not required, that T matches the type of the elements in the OpenGL buffer.
Parameters:
context A ComputeContext with enabled CL/GL sharing.
flags A bit-field that is used to specify usage information about the ComputeBuffer. Only ComputeMemoryFlags.ReadOnly, ComputeMemoryFlags.WriteOnly and ComputeMemoryFlags.ReadWrite are allowed.
bufferId The OpenGL buffer object id to use for the creation of the ComputeBuffer.
Returns:
The created ComputeBuffer.
Type Constraints
T :struct 
template<T >
override string Cloo.ComputeBuffer< T >.ToString (  ) 

Gets the string representation of the ComputeBuffer.

Returns:
The string representation of the ComputeBuffer.

Reimplemented from Cloo.ComputeObject.


Property Documentation

template<T >
long Cloo.ComputeBuffer< T >.Count [get]

Gets the number of elements in the ComputeBuffer.


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