Enum CLMemory.Mem

    • 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)
        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 name
        NullPointerException - if the argument is null
      • flagsToInt

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