Module: StoreFrom
- Defined in:
- ext/cumo/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
246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'ext/cumo/narray/gen/narray_def.rb', line 246 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
242 243 244 |
# File 'ext/cumo/narray/gen/narray_def.rb', line 242 def store_array StoreArray.new(self, "store_array", name:"array") end |
#store_from(cname, dtype = nil, macro = nil) ⇒ Object
228 229 230 231 232 233 234 235 236 |
# File 'ext/cumo/narray/gen/narray_def.rb', line 228 def store_from(cname, dtype=nil, macro=nil) tmpl = (cname == "Bit") ? "store_bit" : "store_from" h = { name:cname.downcase, type_name:cname, type_var:"cumo_c" + cname, dtype:dtype, macro:macro } Store.new(self, tmpl, **h) end |