Class: OpenCL::Double

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

Overview

Maps the cl_double type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0.0) ⇒ Double

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



196
197
198
199
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 196

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

Instance Method Details

#s0Object

Reads the s0 member



201
202
203
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 201

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



205
206
207
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 205

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

#to_sObject



208
209
210
# File 'lib/opencl_ruby_ffi/Arithmetic_gen.rb', line 208

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