Class: OpenCL::Int

Inherits:
FFI::Struct show all
Defined in:
lib/opencl_ruby_ffi/Arithmetic_gen.rb

Overview

Maps the cl_int type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0) ⇒ Int

Creates a new Int with members set to 0 or to the user specified values



91
92
93
94
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 91

def initialize( s0 = 0 )
  super()
  self[:s0] = s0
end

Instance Method Details

#s0Object

Reads the s0 member



96
97
98
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 96

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



100
101
102
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 100

def s0=(value)
 self[:s0] = value
end

#to_sObject



103
104
105
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 103

def to_s
  return "Int{ #{self[:s0]} }"
end