ext/cumo/narray/gen/tmpl/store_from.c in cumo-0.1.0 vs ext/cumo/narray/gen/tmpl/store_from.c in cumo-0.1.1

- old
+ new

@@ -4,50 +4,50 @@ void <%="cumo_#{c_iter}_index_stride_kernel_launch"%>(char *p1, char *p2, size_t *idx1, ssize_t s2, uint64_t n); void <%="cumo_#{c_iter}_stride_stride_kernel_launch"%>(char *p1, char *p2, ssize_t s1, ssize_t s2, uint64_t n); //<% end %> static void -<%=c_iter%>(na_loop_t *const lp) +<%=c_iter%>(cumo_na_loop_t *const lp) { size_t i, s1, s2; char *p1, *p2; size_t *idx1, *idx2; - INIT_COUNTER(lp, i); - INIT_PTR_IDX(lp, 0, p1, s1, idx1); - INIT_PTR_IDX(lp, 1, p2, s2, idx2); + CUMO_INIT_COUNTER(lp, i); + CUMO_INIT_PTR_IDX(lp, 0, p1, s1, idx1); + CUMO_INIT_PTR_IDX(lp, 1, p2, s2, idx2); //<% if c_iter.include? 'robject' %> - SHOW_SYNCHRONIZE_FIXME_WARNING_ONCE("<%=name%>", "<%=type_name%>"); + CUMO_SHOW_SYNCHRONIZE_FIXME_WARNING_ONCE("<%=name%>", "<%=type_name%>"); { <%=dtype%> x; dtype y; if (idx2) { if (idx1) { for (; i--;) { - GET_DATA_INDEX(p2,idx2,<%=dtype%>,x); + CUMO_GET_DATA_INDEX(p2,idx2,<%=dtype%>,x); y = <%=macro%>(x); - SET_DATA_INDEX(p1,idx1,dtype,y); + CUMO_SET_DATA_INDEX(p1,idx1,dtype,y); } } else { for (; i--;) { - GET_DATA_INDEX(p2,idx2,<%=dtype%>,x); + CUMO_GET_DATA_INDEX(p2,idx2,<%=dtype%>,x); y = <%=macro%>(x); - SET_DATA_STRIDE(p1,s1,dtype,y); + CUMO_SET_DATA_STRIDE(p1,s1,dtype,y); } } } else { if (idx1) { for (; i--;) { - GET_DATA_STRIDE(p2,s2,<%=dtype%>,x); + CUMO_GET_DATA_STRIDE(p2,s2,<%=dtype%>,x); y = <%=macro%>(x); - SET_DATA_INDEX(p1,idx1,dtype,y); + CUMO_SET_DATA_INDEX(p1,idx1,dtype,y); } } else { for (; i--;) { - GET_DATA_STRIDE(p2,s2,<%=dtype%>,x); + CUMO_GET_DATA_STRIDE(p2,s2,<%=dtype%>,x); y = <%=macro%>(x); - SET_DATA_STRIDE(p1,s1,dtype,y); + CUMO_SET_DATA_STRIDE(p1,s1,dtype,y); } } } } //<% else %> @@ -71,11 +71,11 @@ static VALUE <%=c_func(:nodef)%>(VALUE self, VALUE obj) { - ndfunc_arg_in_t ain[2] = {{OVERWRITE,0},{Qnil,0}}; - ndfunc_t ndf = { <%=c_iter%>, FULL_LOOP, 2, 0, ain, 0 }; + cumo_ndfunc_arg_in_t ain[2] = {{CUMO_OVERWRITE,0},{Qnil,0}}; + cumo_ndfunc_t ndf = { <%=c_iter%>, CUMO_FULL_LOOP, 2, 0, ain, 0 }; - na_ndloop(&ndf, 2, self, obj); + cumo_na_ndloop(&ndf, 2, self, obj); return self; }