Class: OpenCL::Short

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

Overview

Maps the cl_short type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0) ⇒ Short

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



49
50
51
52
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 49

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

Instance Method Details

#s0Object

Reads the s0 member



54
55
56
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 54

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



58
59
60
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 58

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

#to_sObject



61
62
63
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 61

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