Class: OpenCL::Mem::SVMFlags

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

Overview

Bitfield that maps the :cl_svm_mem_flags type

Constant Summary collapse

READ_WRITE =
(1 << 0)
WRITE_ONLY =
(1 << 1)
READ_ONLY =
(1 << 2)
SVM_FINE_GRAIN_BUFFER =
(1 << 10)
SVM_ATOMICS =
(1 << 11)

Instance Method Summary collapse

Methods inherited from Bitfield

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

Constructor Details

This class inherits a constructor from OpenCL::Bitfield

Instance Method Details

#namesObject

Returns an Array of String representing the different flags set



1356
1357
1358
1359
1360
1361
1362
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 1356

def names
  fs = []
  %w( READ_WRITE WRITE_ONLY READ_ONLY SVM_FINE_GRAIN_BUFFER SVM_ATOMICS ).each { |f|
    fs.push(f) if self.include?( self.class.const_get(f) )
  }
  return fs
end