Class: OpenCL::UChar

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

Overview

Maps the cl_uchar type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0) ⇒ UChar

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



28
29
30
31
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 28

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

Instance Method Details

#s0Object

Reads the s0 member



33
34
35
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 33

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



37
38
39
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 37

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

#to_sObject



40
41
42
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 40

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