static void <%=c_iter%>(na_loop_t *const lp) { size_t i, n; size_t i1, n1; VALUE v1, *ptr; char *p1; size_t s1, *idx1; VALUE x; double y; dtype z; size_t len, c; double beg, step; INIT_COUNTER(lp, n); INIT_PTR_IDX(lp, 0, p1, s1, idx1); v1 = lp->args[1].value; i = 0; if (lp->args[1].ptr) { if (v1 == Qtrue) { iter_<%=tp%>_store_<%=tp%>(lp); i = lp->args[1].shape[0]; if (idx1) { idx1 += i; } else { p1 += s1 * i; } } goto loop_end; } ptr = &v1; switch(TYPE(v1)) { case T_ARRAY: n1 = RARRAY_LEN(v1); ptr = RARRAY_PTR(v1); break; case T_NIL: n1 = 0; break; default: n1 = 1; } if (idx1) { for (i=i1=0; i1(VALUE self, VALUE rary) { ndfunc_arg_in_t ain[2] = {{OVERWRITE,0},{rb_cArray,0}}; ndfunc_t ndf = {<%=c_iter%>, FULL_LOOP, 2, 0, ain, 0}; na_ndloop_store_rarray(&ndf, self, rary); return self; }