Class: OpenCL::NameVersion

Inherits:
Struct
  • Object
show all
Defined in:
lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb

Overview

Maps the :cl_name_version type of OpenCL

Instance Method Summary collapse

Instance Method Details

#nameObject



316
317
318
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb', line 316

def name
  self[:name].to_s
end

#to_sObject



320
321
322
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb', line 320

def to_s
  "{ name: #{name}, version: #{version} }"
end

#versionObject



312
313
314
# File 'lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb', line 312

def version
  Version.from_int(self[:version])
end

Constant Summary collapse

MAX_NAME_SIZE =
64