com.jogamp.opencl
Enum CLMemory.Mem

java.lang.Object
  extended by java.lang.Enum<CLMemory.Mem>
      extended by com.jogamp.opencl.CLMemory.Mem
All Implemented Interfaces:
Serializable, Comparable<CLMemory.Mem>
Enclosing class:
CLMemory<B extends Buffer>

public static enum CLMemory.Mem
extends Enum<CLMemory.Mem>

Memory settings for configuring CLMemory.


Enum Constant Summary
ALLOCATE_BUFFER
          Enum representing CL_MEM_ALLOC_HOST_PTR.
COPY_BUFFER
          Enum representing CL_MEM_COPY_HOST_PTR.
READ_ONLY
          Enum representing CL_MEM_READ_ONLY.
READ_WRITE
          Enum representing CL_MEM_READ_WRITE.
USE_BUFFER
          Enum representing CL_MEM_USE_HOST_PTR.
WRITE_ONLY
          Enum representing CL_MEM_WRITE_ONLY.
 
Field Summary
 int CONFIG
          Value of wrapped OpenCL flag.
 
Method Summary
static int flagsToInt(CLMemory.Mem[] flags)
           
static CLMemory.Mem valueOf(int bufferFlag)
           
static CLMemory.Mem valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CLMemory.Mem[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
static EnumSet<CLMemory.Mem> valuesOf(int bitfield)
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

READ_WRITE

public static final CLMemory.Mem READ_WRITE
Enum representing CL_MEM_READ_WRITE. This flag specifies that the memory object will be read and written by a kernel.


WRITE_ONLY

public static final CLMemory.Mem WRITE_ONLY
Enum representing CL_MEM_WRITE_ONLY. This flags specifies that the memory object will be written but not read by a kernel. Reading from a buffer or image object created with WRITE_ONLY inside a kernel is undefined.


READ_ONLY

public static final CLMemory.Mem READ_ONLY
Enum representing CL_MEM_READ_ONLY. This flag specifies that the memory object is a read-only memory object when used inside a kernel. Writing to a buffer or image object created withREAD_ONLY inside a kernel is undefined.


USE_BUFFER

public static final CLMemory.Mem USE_BUFFER
Enum representing CL_MEM_USE_HOST_PTR. If specified, it indicates that the application wants the OpenCL implementation to use memory referenced by host_ptr as the storage bits for the memory object. OpenCL implementations are allowed to cache the buffer contents pointed to by host_ptr in device memory. This cached copy can be used when kernels are executed on a device.


ALLOCATE_BUFFER

public static final CLMemory.Mem ALLOCATE_BUFFER
Enum representing CL_MEM_ALLOC_HOST_PTR. This flag specifies that the application wants the OpenCL implementation to allocate memory from host accessible memory. ALLOCATE_BUFFER and USE_BUFFER are mutually exclusive.


COPY_BUFFER

public static final CLMemory.Mem COPY_BUFFER
Enum representing CL_MEM_COPY_HOST_PTR. If COPY_BUFFER specified, it indicates that the application wants the OpenCL implementation to allocate memory for the memory object and copy the data from memory referenced by host_ptr.
COPY_BUFFER and USE_BUFFER are mutually exclusive.

Field Detail

CONFIG

public final int CONFIG
Value of wrapped OpenCL flag.

Method Detail

values

public static CLMemory.Mem[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CLMemory.Mem c : CLMemory.Mem.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CLMemory.Mem valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

valueOf

public static CLMemory.Mem valueOf(int bufferFlag)

valuesOf

public static EnumSet<CLMemory.Mem> valuesOf(int bitfield)

flagsToInt

public static int flagsToInt(CLMemory.Mem[] flags)