ext/cumo/narray/gen/tmpl_bit/each.c in cumo-0.1.0 vs ext/cumo/narray/gen/tmpl_bit/each.c in cumo-0.1.1

- old
+ new

@@ -1,30 +1,30 @@ static void -<%=c_iter%>(na_loop_t *const lp) +<%=c_iter%>(cumo_na_loop_t *const lp) { size_t i; - BIT_DIGIT *a1, x=0; + CUMO_BIT_DIGIT *a1, x=0; size_t p1; ssize_t s1; size_t *idx1; VALUE y; - INIT_COUNTER(lp, i); - INIT_PTR_BIT_IDX(lp, 0, a1, p1, s1, idx1); + CUMO_INIT_COUNTER(lp, i); + CUMO_INIT_PTR_BIT_IDX(lp, 0, a1, p1, s1, idx1); - SHOW_SYNCHRONIZE_WARNING_ONCE("<%=name%>", "<%=type_name%>"); + CUMO_SHOW_SYNCHRONIZE_WARNING_ONCE("<%=name%>", "<%=type_name%>"); cumo_cuda_runtime_check_status(cudaDeviceSynchronize()); if (idx1) { for (; i--;) { - LOAD_BIT(a1, p1+*idx1, x); idx1++; + CUMO_LOAD_BIT(a1, p1+*idx1, x); idx1++; y = m_data_to_num(x); rb_yield(y); } } else { for (; i--;) { - LOAD_BIT(a1, p1, x); p1+=s1; + CUMO_LOAD_BIT(a1, p1, x); p1+=s1; y = m_data_to_num(x); rb_yield(y); } } } @@ -38,11 +38,11 @@ @yield [x] x is element of NArray. */ static VALUE <%=c_func(0)%>(VALUE self) { - ndfunc_arg_in_t ain[1] = {{Qnil,0}}; - ndfunc_t ndf = {<%=c_iter%>, FULL_LOOP_NIP, 1,0, ain,0}; + cumo_ndfunc_arg_in_t ain[1] = {{Qnil,0}}; + cumo_ndfunc_t ndf = {<%=c_iter%>, CUMO_FULL_LOOP_NIP, 1,0, ain,0}; - na_ndloop(&ndf, 1, self); + cumo_na_ndloop(&ndf, 1, self); return self; }