Class: OpenCL::UShort

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

Overview

Maps the cl_ushort type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0) ⇒ UShort

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



70
71
72
73
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 70

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

Instance Method Details

#s0Object

Reads the s0 member



75
76
77
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 75

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



79
80
81
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 79

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

#to_sObject



82
83
84
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 82

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