Module: StoreFrom
- Defined in:
- ext/numo/narray/gen/narray_def.rb
Overview
Instance Method Summary collapse
- #definitions ⇒ Object
- #store_array ⇒ Object
- #store_from(cname, dtype = nil, macro = nil) ⇒ Object
- #store_numeric ⇒ Object
Instance Method Details
#definitions ⇒ Object
206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'ext/numo/narray/gen/narray_def.rb', line 206 def definitions a = [] @children.each do |x| if x.condition("") if x.get(:type_name) == parent.class_name a.unshift(x) else a.push(x) end end end a end |
#store_array ⇒ Object
202 203 204 |
# File 'ext/numo/narray/gen/narray_def.rb', line 202 def store_array StoreArray.new(self, "store_array", name:"array") end |
#store_from(cname, dtype = nil, macro = nil) ⇒ Object
188 189 190 191 192 193 194 195 196 |
# File 'ext/numo/narray/gen/narray_def.rb', line 188 def store_from(cname, dtype=nil, macro=nil) tmpl = (cname=="Bit") ? "store_bit" : "store_from" h = { name:cname.downcase, type_name:cname, type_var:"numo_c"+cname, dtype:dtype, macro:macro } Store.new(self, tmpl, **h) end |