Class: OpenCL::Device::Type

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

Overview

Bitfield that maps the :cl_device_type type

Constant Summary collapse

DEFAULT =
(1 << 0)
CPU =
(1 << 1)
GPU =
(1 << 2)
ACCELERATOR =
(1 << 3)
CUSTOM =
(1 << 4)
ALL =
0xFFFFFFFF

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



1020
1021
1022
1023
1024
1025
1026
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 1020

def names
  fs = []
  %w( DEFAULT CPU GPU ACCELERATOR CUSTOM ALL ).each { |f|
    fs.push(f) if self.include?( self.class.const_get(f) )
  }
  return fs
end