Sha256: 50b2bb8453fbfd7be1eee85313c2d82d9a2b344a49f07ef9537b83d25e52e596

Contents?: true

Size: 911 Bytes

Versions: 19

Compression:

Stored size: 911 Bytes

Contents

/*
  <%= file_name %>
  Ruby/Cumo::GSL - GSL wrapper for Ruby/Cumo::NArray

  created on: 2017-03-11
  Copyright (C) 2017 Masahiro Tanaka
  Copyright (C) 2018 Naotoshi Seo
*/

#include <ruby.h>
#include <assert.h>
#include "cumo.h"
#include "cumo/narray.h"
#include "cumo/template.h"
#include "SFMT.h"
#include "cumo/cuda/memory_pool.h"
#include "cumo/cuda/runtime.h"
<% unless type_name == 'robject' %>
#include "cumo/indexer.h"
<% end %>

#define m_map(x) m_num_to_data(rb_yield(m_data_to_num(x)))

<% cumo_id_decl.each do |x| %>
<%= x %>
<% end %>

#include <<%="cumo/types/#{type_name}.h"%>>

VALUE cT;
extern VALUE cRT;

<% children.each do |c|%>
<%= c.result+"\n\n" %>
<% end %>

void
Init_<%=lib_name%>(void)
{
    VALUE hCast, <%=ns_var%>;

    <%=ns_var%> = rb_define_module("Cumo");

    <% cumo_id_assign.each do |x| %>
    <%= x %><% end %>

<% children.each do |c| %>
<%= c.init_def %>
<% end %>
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cumo-0.4.3 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.4.2 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.4.1 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.4.0 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.5 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.4 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.3 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.2 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.1 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.0 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.3.0.pre1 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.2.5 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.2.4 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.2.3 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.2.2 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.2.1 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.2.0 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.1.2 ext/cumo/narray/gen/tmpl/lib.c
cumo-0.1.1 ext/cumo/narray/gen/tmpl/lib.c