Sha256: 3b567d30ec307c1dbc1ee9c50bf496c88f4e5800d231ad87853c931f64328231

Contents?: true

Size: 413 Bytes

Versions: 11

Compression:

Stored size: 413 Bytes

Contents

static VALUE
numo_<%=tp%>_new_dim0(dtype x)
{
    VALUE v;
    dtype *ptr;

    v = rb_narray_new(cT, 0, NULL);
    ptr = (dtype*)(char*)na_get_pointer_for_write(v);
    *ptr = x;
    na_release_lock(v);
    return v;
}

static VALUE
<%=c_func%>(VALUE self, VALUE obj)
{
    dtype x;
    x = m_num_to_data(obj);
    obj = numo_<%=tp%>_new_dim0(x);
    <%=find_tmpl("store").c_func%>(self,obj);
    return self;
}

Version data entries

11 entries across 7 versions & 1 rubygems

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