Sha256: 0f43d1781461762ad8117a2c18bff3833d18dd6c7b050cff3be5847bc007f493

Contents?: true

Size: 798 Bytes

Versions: 7

Compression:

Stored size: 798 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 <%=method%> other
  @param [Numeric] other
  @return [Numo::<%=class_name%>] self.
*/
static VALUE
<%=c_func%>(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

7 entries across 7 versions & 1 rubygems

Version Path
numo-narray-0.9.0.4 ext/numo/narray/gen/tmpl/fill.c
numo-narray-0.9.0.3-x86-mingw32 ext/numo/narray/gen/tmpl/fill.c
numo-narray-0.9.0.3-x64-mingw32 ext/numo/narray/gen/tmpl/fill.c
numo-narray-0.9.0.3 ext/numo/narray/gen/tmpl/fill.c
numo-narray-0.9.0.1-x64-mingw32 ext/numo/narray/gen/tmpl/fill.c
numo-narray-0.9.0.1 ext/numo/narray/gen/tmpl/fill.c
numo-narray-0.9.0.1-x86-mingw32 ext/numo/narray/gen/tmpl/fill.c