Class: OpenCL::Bitfield
- Inherits:
-
Object
- Object
- OpenCL::Bitfield
- Defined in:
- lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb
Overview
A parent class to represent OpenCL bitfields that use :cl_bitfield
Direct Known Subclasses
CommandQueue::Properties, Device::AffinityDomain, Device::ExecCapabilities, Device::FPConfig, Device::SVMCapabilities, Device::Type, Kernel::Arg::TypeQualifier, MapFlags, Mem::Flags, Mem::MigrationFlags, Mem::SVMFlags
Instance Method Summary collapse
-
#&(f) ⇒ Object
Returns the bitwise & operation between f and the internal Bitfield representation.
-
#^(f) ⇒ Object
Returns the bitwise ^ operation between f and the internal Bitfield representation.
-
#flags ⇒ Object
Returns the internal representation of the Bitfield.
-
#flags=(val) ⇒ Object
Setss the internal representation of the Bitfield to val.
-
#include?(flag) ⇒ Boolean
Returns true if flag is bitwise included in the Bitfield.
-
#initialize(val = 0) ⇒ Bitfield
constructor
Initializes a new Bitfield to val.
-
#to_i ⇒ Object
Returns the integer representing the Bitfield value.
-
#to_int ⇒ Object
Returns the integer representing the Bitfield value.
-
#to_s ⇒ Object
Returns a String corresponfing to the Bitfield value.
-
#|(f) ⇒ Object
Returns the bitwise | operation between f and the internal Bitfield representation.
Constructor Details
#initialize(val = 0) ⇒ Bitfield
Initializes a new Bitfield to val
2385 2386 2387 2388 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2385 def initialize( val = 0 ) super() @val = val end |
Instance Method Details
#&(f) ⇒ Object
Returns the bitwise & operation between f and the internal Bitfield representation
2412 2413 2414 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2412 def &(f) return self.class::new( @val & f ) end |
#^(f) ⇒ Object
Returns the bitwise ^ operation between f and the internal Bitfield representation
2417 2418 2419 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2417 def ^(f) return self.class::new( @val ^ f ) end |
#flags ⇒ Object
Returns the internal representation of the Bitfield
2427 2428 2429 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2427 def flags return @val end |
#flags=(val) ⇒ Object
Setss the internal representation of the Bitfield to val
2432 2433 2434 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2432 def flags=(val) @val = val end |
#include?(flag) ⇒ Boolean
Returns true if flag is bitwise included in the Bitfield
2391 2392 2393 2394 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2391 def include?(flag) return true if ( @val & flag ) == flag return false end |
#to_i ⇒ Object
Returns the integer representing the Bitfield value
2402 2403 2404 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2402 def to_i return @val end |
#to_int ⇒ Object
Returns the integer representing the Bitfield value
2407 2408 2409 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2407 def to_int return @val end |
#to_s ⇒ Object
Returns a String corresponfing to the Bitfield value
2397 2398 2399 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2397 def to_s return "#{self.names}" end |
#|(f) ⇒ Object
Returns the bitwise | operation between f and the internal Bitfield representation
2422 2423 2424 |
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 2422 def |(f) return self.class::new( @val | f ) end |