Package com.jogamp.opencl
Enum CLMemory.Mem
- java.lang.Object
-
- java.lang.Enum<CLMemory.Mem>
-
- com.jogamp.opencl.CLMemory.Mem
-
- All Implemented Interfaces:
Serializable
,Comparable<CLMemory.Mem>
public static enum CLMemory.Mem extends Enum<CLMemory.Mem>
Memory settings for configuring CLMemory.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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
Fields Modifier and Type Field Description int
CONFIG
Value of wrapped OpenCL flag.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
flagsToInt(CLMemory.Mem[] flags)
static CLMemory.Mem
valueOf(int bufferFlag)
Returns the enum constant of this type with the specified name.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)
-
-
-
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
andUSE_BUFFER
are mutually exclusive.
-
COPY_BUFFER
public static final CLMemory.Mem COPY_BUFFER
Enum representing CL_MEM_COPY_HOST_PTR. IfCOPY_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
andUSE_BUFFER
are mutually exclusive.
-
-
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 nameNullPointerException
- if the argument is null
-
valueOf
public static CLMemory.Mem valueOf(int bufferFlag)
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:
bufferFlag
- 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 nameNullPointerException
- if the argument is null
-
valuesOf
public static EnumSet<CLMemory.Mem> valuesOf(int bitfield)
-
flagsToInt
public static int flagsToInt(CLMemory.Mem[] flags)
-
-