Class: OpenCL::UInt2
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- OpenCL::UInt2
- Defined in:
- lib/opencl_ruby_ffi/Arithmetic_gen.rb
Overview
Maps the cl_uint2 type of OpenCL
Instance Method Summary collapse
-
#initialize(s0 = 0, s1 = 0) ⇒ UInt2
constructor
Creates a new UInt2 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) ⇒ UInt2
Creates a new UInt2 with members set to 0 or to the user specified values
388 389 390 391 392 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 388 def initialize( s0 = 0, s1 = 0 ) super() self[:s0] = s0 self[:s1] = s1 end |
Instance Method Details
#s0 ⇒ Object
Reads the s0 member
394 395 396 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 394 def s0 return self[:s0] end |
#s0=(value) ⇒ Object
Sets the s0 member to value
402 403 404 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 402 def s0=(value) self[:s0] = value end |
#s1 ⇒ Object
Reads the s1 member
398 399 400 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 398 def s1 return self[:s1] end |
#s1=(value) ⇒ Object
Sets the s1 member to value
406 407 408 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 406 def s1=(value) self[:s1] = value end |
#to_s ⇒ Object
409 410 411 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 409 def to_s return "UInt2{ #{self[:s0]}, #{self[:s1]} }" end |