Class: OpenCL::UShort16

Inherits:
Struct
  • Object
show all
Defined in:
lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb

Overview

Maps the cl_ushort16 type of OpenCL

Instance Method Summary collapse

Constructor Details

#initialize(s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0) ⇒ UShort16

Creates a new UShort16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UShort16 maps the memory pointed.



3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3018

def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
  if s0.is_a?(FFI::Pointer) then
    super(s0)
  else
    super()
    self[:s0] = s0
    self[:s1] = s1
    self[:s2] = s2
    self[:s3] = s3
    self[:s4] = s4
    self[:s5] = s5
    self[:s6] = s6
    self[:s7] = s7
    self[:s8] = s8
    self[:s9] = s9
    self[:sa] = sa
    self[:sb] = sb
    self[:sc] = sc
    self[:sd] = sd
    self[:se] = se
    self[:sf] = sf
  end
end

Instance Method Details

#inspectObject



3170
3171
3172
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3170

def inspect
  return "#<#{self.class.name}: #{self[:s0]}, #{self[:s1]}, #{self[:s2]}, #{self[:s3]}, #{self[:s4]}, #{self[:s5]}, #{self[:s6]}, #{self[:s7]}, #{self[:s8]}, #{self[:s9]}, #{self[:sa]}, #{self[:sb]}, #{self[:sc]}, #{self[:sd]}, #{self[:se]}, #{self[:sf]}>"
end

#s0Object

Reads the s0 member



3042
3043
3044
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3042

def s0
 return self[:s0]
end

#s0=(value) ⇒ Object

Sets the s0 member to value



3106
3107
3108
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3106

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

#s1Object

Reads the s1 member



3046
3047
3048
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3046

def s1
 return self[:s1]
end

#s1=(value) ⇒ Object

Sets the s1 member to value



3110
3111
3112
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3110

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

#s2Object

Reads the s2 member



3050
3051
3052
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3050

def s2
 return self[:s2]
end

#s2=(value) ⇒ Object

Sets the s2 member to value



3114
3115
3116
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3114

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

#s3Object

Reads the s3 member



3054
3055
3056
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3054

def s3
 return self[:s3]
end

#s3=(value) ⇒ Object

Sets the s3 member to value



3118
3119
3120
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3118

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

#s4Object

Reads the s4 member



3058
3059
3060
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3058

def s4
 return self[:s4]
end

#s4=(value) ⇒ Object

Sets the s4 member to value



3122
3123
3124
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3122

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

#s5Object

Reads the s5 member



3062
3063
3064
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3062

def s5
 return self[:s5]
end

#s5=(value) ⇒ Object

Sets the s5 member to value



3126
3127
3128
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3126

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

#s6Object

Reads the s6 member



3066
3067
3068
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3066

def s6
 return self[:s6]
end

#s6=(value) ⇒ Object

Sets the s6 member to value



3130
3131
3132
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3130

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

#s7Object

Reads the s7 member



3070
3071
3072
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3070

def s7
 return self[:s7]
end

#s7=(value) ⇒ Object

Sets the s7 member to value



3134
3135
3136
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3134

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

#s8Object

Reads the s8 member



3074
3075
3076
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3074

def s8
 return self[:s8]
end

#s8=(value) ⇒ Object

Sets the s8 member to value



3138
3139
3140
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3138

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

#s9Object

Reads the s9 member



3078
3079
3080
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3078

def s9
 return self[:s9]
end

#s9=(value) ⇒ Object

Sets the s9 member to value



3142
3143
3144
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3142

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

#saObject

Reads the sa member



3082
3083
3084
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3082

def sa
 return self[:sa]
end

#sa=(value) ⇒ Object

Sets the sa member to value



3146
3147
3148
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3146

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

#sbObject

Reads the sb member



3086
3087
3088
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3086

def sb
 return self[:sb]
end

#sb=(value) ⇒ Object

Sets the sb member to value



3150
3151
3152
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3150

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

#scObject

Reads the sc member



3090
3091
3092
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3090

def sc
 return self[:sc]
end

#sc=(value) ⇒ Object

Sets the sc member to value



3154
3155
3156
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3154

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

#sdObject

Reads the sd member



3094
3095
3096
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3094

def sd
 return self[:sd]
end

#sd=(value) ⇒ Object

Sets the sd member to value



3158
3159
3160
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3158

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

#seObject

Reads the se member



3098
3099
3100
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3098

def se
 return self[:se]
end

#se=(value) ⇒ Object

Sets the se member to value



3162
3163
3164
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3162

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

#sfObject

Reads the sf member



3102
3103
3104
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3102

def sf
 return self[:sf]
end

#sf=(value) ⇒ Object

Sets the sf member to value



3166
3167
3168
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3166

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

#to_sObject



3174
3175
3176
# File 'lib/opencl_ruby_ffi/opencl_arithmetic_gen.rb', line 3174

def to_s
  return "UShort16{ #{self[:s0]}, #{self[:s1]}, #{self[:s2]}, #{self[:s3]}, #{self[:s4]}, #{self[:s5]}, #{self[:s6]}, #{self[:s7]}, #{self[:s8]}, #{self[:s9]}, #{self[:sa]}, #{self[:sb]}, #{self[:sc]}, #{self[:sd]}, #{self[:se]}, #{self[:sf]} }"
end