Class: OpenCL::Mem::Flags

Inherits:
Bitfield show all
Defined in:
lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb

Overview

Bitfield that maps the :cl_mem_flags type

Constant Summary collapse

READ_WRITE =

:stopdoc:

(1 << 0)
WRITE_ONLY =
(1 << 1)
READ_ONLY =
(1 << 2)
USE_HOST_PTR =
(1 << 3)
ALLOC_HOST_PTR =
(1 << 4)
COPY_HOST_PTR =
(1 << 5)
HOST_WRITE_ONLY =
(1 << 7)
HOST_READ_ONLY =
(1 << 8)
HOST_NO_ACCESS =
(1 << 9)

Instance Method Summary collapse

Methods inherited from Bitfield

#&, #^, #flags, #flags=, #include?, #initialize, #to_i, #to_int, #to_s, #|

Constructor Details

This class inherits a constructor from OpenCL::Bitfield

Instance Method Details

#namesObject

:startdoc: Returns an Array of String representing the different flags set



1267
1268
1269
1270
1271
1272
1273
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 1267

def names
  fs = []
  %w( READ_WRITE WRITE_ONLY READ_ONLY USE_HOST_PTR ALLOC_HOST_PTR COPY_HOST_PTR HOST_WRITE_ONLY HOST_READ_ONLY HOST_NO_ACCESS ).each { |f|
    fs.push(f) if self.include?( self.class.const_get(f) )
  }
  return fs
end