Class: OpenCL::Float2
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- OpenCL::Float2
- Defined in:
- lib/opencl_ruby_ffi/Arithmetic_gen.rb
Overview
Maps the cl_float2 type of OpenCL
Instance Method Summary collapse
-
#initialize(s0 = 0.0, s1 = 0.0) ⇒ Float2
constructor
Creates a new Float2 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.0, s1 = 0.0) ⇒ Float2
Creates a new Float2 with members set to 0 or to the user specified values
478 479 480 481 482 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 478 def initialize( s0 = 0.0, s1 = 0.0 ) super() self[:s0] = s0 self[:s1] = s1 end |
Instance Method Details
#s0 ⇒ Object
Reads the s0 member
484 485 486 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 484 def s0 return self[:s0] end |
#s0=(value) ⇒ Object
Sets the s0 member to value
492 493 494 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 492 def s0=(value) self[:s0] = value end |
#s1 ⇒ Object
Reads the s1 member
488 489 490 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 488 def s1 return self[:s1] end |
#s1=(value) ⇒ Object
Sets the s1 member to value
496 497 498 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 496 def s1=(value) self[:s1] = value end |
#to_s ⇒ Object
499 500 501 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 499 def to_s return "Float2{ #{self[:s0]}, #{self[:s1]} }" end |