Sha256: c3704d9f770afdd9865cc8ed88dfc12372305bc171c07c3cfb5de532891eaf70

Contents?: true

Size: 759 Bytes

Versions: 17

Compression:

Stored size: 759 Bytes

Contents

static void
<%=c_iter%>(na_loop_t *const lp)
{
    size_t  i;
    char   *p1, *p2, *p3;
    ssize_t s1, s2, s3;
    dtype   x, y, z;
    INIT_COUNTER(lp, i);
    INIT_PTR(lp, 0, p1, s1);
    INIT_PTR(lp, 1, p2, s2);
    INIT_PTR(lp, 2, p3, s3);
    for (; i--;) {
        GET_DATA_STRIDE(p1,s1,dtype,x);
        m_<%=name%>(x,y,z);
        SET_DATA_STRIDE(p2,s2,dtype,y);
        SET_DATA_STRIDE(p3,s3,dtype,z);
    }
}

/*
  <%=name%> of self.
  @overload <%=name%>
  @return [Numo::<%=real_class_name%>] <%=name%> of self.
*/
static VALUE
<%=c_func(0)%>(VALUE self)
{
    ndfunc_arg_in_t ain[1] = {{cT,0}};
    ndfunc_arg_out_t aout[2] = {{cT,0},{cT,0}};
    ndfunc_t ndf = {<%=c_iter%>, STRIDE_LOOP, 1,2, ain,aout};

    return na_ndloop(&ndf, 1, self);
}

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
numo-narray-0.9.2.1 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.2.0 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.9 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.8 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.7 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.6 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.5 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.4 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.3 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.2 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.1 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.1.0 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.0.9 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.0.8 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.0.7 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.0.6 ext/numo/narray/gen/tmpl/unary_ret2.c
numo-narray-0.9.0.5 ext/numo/narray/gen/tmpl/unary_ret2.c