Sha256: c7602ed18818d8eeb0e97f9f3cfa69200f4c226d76edd6b2cd174f97b5704d17
Contents?: true
Size: 1.18 KB
Versions: 19
Compression:
Stored size: 1.18 KB
Contents
static void <%=c_iter%>(cumo_na_loop_t *const lp) { size_t i; CUMO_BIT_DIGIT *a1; size_t p1; ssize_t s1; size_t *idx1; CUMO_BIT_DIGIT x=0; VALUE a, y; CUMO_SHOW_SYNCHRONIZE_WARNING_ONCE("<%=name%>", "<%=type_name%>"); cumo_cuda_runtime_check_status(cudaDeviceSynchronize()); CUMO_INIT_COUNTER(lp, i); CUMO_INIT_PTR_BIT_IDX(lp, 0, a1, p1, s1, idx1); a = rb_ary_new2(i); rb_ary_push(lp->args[1].value, a); if (idx1) { for (; i--;) { CUMO_LOAD_BIT(a1,p1+*idx1,x); idx1++; y = m_data_to_num(x); rb_ary_push(a,y); } } else { for (; i--;) { CUMO_LOAD_BIT(a1,p1,x); p1+=s1; y = m_data_to_num(x); rb_ary_push(a,y); } } } /* Convert self to Array. @overload <%=name%> @return [Array] */ static VALUE <%=c_func(0)%>(VALUE self) { cumo_ndfunc_arg_in_t ain[3] = {{Qnil,0},{cumo_sym_loop_opt},{cumo_sym_option}}; cumo_ndfunc_arg_out_t aout[1] = {{rb_cArray,0}}; // dummy? cumo_ndfunc_t ndf = {<%=c_iter%>, CUMO_FULL_LOOP_NIP, 3,1, ain,aout}; return cumo_na_ndloop_cast_narray_to_rarray(&ndf, self, Qnil); }
Version data entries
19 entries across 19 versions & 1 rubygems