Sha256: 55ac6f514a0b2ec3b1ac4c0256c2f41684200bca0f2ee37e74e33ef9e80d3141

Contents?: true

Size: 799 Bytes

Versions: 17

Compression:

Stored size: 799 Bytes

Contents

static void
<%=c_iter%>(na_loop_t *const lp)
{
    size_t   i;
    char    *p1;
    ssize_t  s1;
    size_t  *idx1;
    VALUE    x = lp->option;
    dtype    y;
    INIT_COUNTER(lp, i);
    INIT_PTR_IDX(lp, 0, p1, s1, idx1);
    y = m_num_to_data(x);
    if (idx1) {
        for (; i--;) {
            SET_DATA_INDEX(p1,idx1,dtype,y);
        }
    } else {
        for (; i--;) {
            SET_DATA_STRIDE(p1,s1,dtype,y);
        }
    }
}

/*
  Fill elements with other.
  @overload <%=name%> other
  @param [Numeric] other
  @return [Numo::<%=class_name%>] self.
*/
static VALUE
<%=c_func(1)%>(VALUE self, VALUE val)
{
    ndfunc_arg_in_t ain[2] = {{OVERWRITE,0},{sym_option}};
    ndfunc_t ndf = { <%=c_iter%>, FULL_LOOP, 2, 0, ain, 0 };

    na_ndloop(&ndf, 2, self, val);
    return self;
}

Version data entries

17 entries across 17 versions & 1 rubygems

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