Class: OpenCL::Short2
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- OpenCL::Short2
- Defined in:
- lib/opencl_ruby_ffi/Arithmetic_gen.rb
Overview
Maps the cl_short2 type of OpenCL
Instance Method Summary collapse
-
#initialize(s0 = 0, s1 = 0) ⇒ Short2
constructor
Creates a new Short2 with members set to 0 or to the user specified values.
-
#s0 ⇒ Object
Reads the s0 member.
-
#s0=(value) ⇒ Object
Sets the s0 member to value.
-
#s1 ⇒ Object
Reads the s1 member.
-
#s1=(value) ⇒ Object
Sets the s1 member to value.
- #to_s ⇒ Object
Constructor Details
#initialize(s0 = 0, s1 = 0) ⇒ Short2
Creates a new Short2 with members set to 0 or to the user specified values
298 299 300 301 302 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 298 def initialize( s0 = 0, s1 = 0 ) super() self[:s0] = s0 self[:s1] = s1 end |
Instance Method Details
#s0 ⇒ Object
Reads the s0 member
304 305 306 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 304 def s0 return self[:s0] end |
#s0=(value) ⇒ Object
Sets the s0 member to value
312 313 314 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 312 def s0=(value) self[:s0] = value end |
#s1 ⇒ Object
Reads the s1 member
308 309 310 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 308 def s1 return self[:s1] end |
#s1=(value) ⇒ Object
Sets the s1 member to value
316 317 318 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 316 def s1=(value) self[:s1] = value end |
#to_s ⇒ Object
319 320 321 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 319 def to_s return "Short2{ #{self[:s0]}, #{self[:s1]} }" end |