static void iter_<%=c_func%>(na_loop_t *const lp) { size_t i; char *p1, *p2; ssize_t s1, s2; double x, y; <%=struct%> *w = (<%=struct%>*)(lp->opt_ptr); <% c_args = get(:postpose) ? "x,y,w" : "w,x,y" %> INIT_COUNTER(lp, i); INIT_PTR(lp, 0, p1, s1); INIT_PTR(lp, 1, p2, s2); for (; i--;) { GET_DATA_STRIDE(p1,s1,double,x); GET_DATA_STRIDE(p2,s2,double,y); <%=func_name%>(<%=c_args%>); } } /* @overload <%=name%>(<%=args[1..2].map{|a| a[1]}.join(",")%>) @param [DFloat] <%=args[1][1]%> @param [DFloat] <%=args[2][1]%> @return [<%=class_name%>] self <%= description %> */ static VALUE <%=c_func(2)%>(VALUE self, VALUE v1, VALUE v2) { <%=struct%> *w; ndfunc_arg_in_t ain[2] = {{cDF,0},{cDF,0}}; ndfunc_t ndf = {iter_<%=c_func%>, STRIDE_LOOP, 2,0, ain,0}; TypedData_Get_Struct(self, <%=struct%>, &<%=data_type_var%>, w); na_ndloop3(&ndf, w, 2, v1, v2); return self; }