Class: OpenCL::Device::AffinityDomain

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

Overview

Bitfield that maps the :cl_device_affinity_domain type

Constant Summary collapse

NUMA =
(1 << 0)
L4_CACHE =
(1 << 1)
L3_CACHE =
(1 << 2)
L2_CACHE =
(1 << 3)
L1_CACHE =
(1 << 4)
NEXT_PARTITIONABLE =
(1 << 5)

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



1092
1093
1094
1095
1096
1097
1098
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb', line 1092

def names
  fs = []
  %w( NUMA L4_CACHE L3_CACHE L2_CACHE L1_CACHE NEXT_PARTITIONABLE ).each { |f|
    fs.push(f) if self.include?( self.class.const_get(f) )
  }
  return fs
end