Class: OpenCL::Double2
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- OpenCL::Double2
- Defined in:
- lib/opencl_ruby_ffi/Arithmetic_gen.rb
Overview
Maps the cl_double2 type of OpenCL
Instance Method Summary collapse
-
#initialize(s0 = 0.0, s1 = 0.0) ⇒ Double2
constructor
Creates a new Double2 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) ⇒ Double2
Creates a new Double2 with members set to 0 or to the user specified values
508 509 510 511 512 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 508 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
514 515 516 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 514 def s0 return self[:s0] end |
#s0=(value) ⇒ Object
Sets the s0 member to value
522 523 524 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 522 def s0=(value) self[:s0] = value end |
#s1 ⇒ Object
Reads the s1 member
518 519 520 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 518 def s1 return self[:s1] end |
#s1=(value) ⇒ Object
Sets the s1 member to value
526 527 528 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 526 def s1=(value) self[:s1] = value end |
#to_s ⇒ Object
529 530 531 |
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 529 def to_s return "Double2{ #{self[:s0]}, #{self[:s1]} }" end |