Sha256: a3380b5d9e2a37d804b92f609fc49c1ace478849a5567ee68871014f61110ef1

Contents?: true

Size: 784 Bytes

Versions: 19

Compression:

Stored size: 784 Bytes

Contents

<% unless type_name == 'robject' %>
<% (is_float ? ["","_nan"] : [""]).each do |nan| %>

__global__ void <%="cumo_#{type_name}_#{name}#{nan}_kernel"%>(char* p1, char* p2, char* p3, ssize_t s1, ssize_t s2, ssize_t s3, uint64_t n)
{
    for (size_t i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) {
        *((dtype*)(p3+(i*s3))) = f_<%=name%><%=nan%>(*((dtype*)(p1+(i*s1))), *((dtype*)(p2+(i*s2))));
    }
}

void cumo_<%=type_name%>_<%=name%><%=nan%>_kernel_launch(char *p1, char *p2, char* p3, ssize_t s1, ssize_t s2, ssize_t s3, size_t n)
{
    size_t grid_dim = cumo_get_grid_dim(n);
    size_t block_dim = cumo_get_block_dim(n);
    <%="cumo_#{type_name}_#{name}#{nan}_kernel"%><<<grid_dim, block_dim>>>(p1,p2,p3,s1,s2,s3,n);
}

<% end %>
<% end %>

Version data entries

19 entries across 19 versions & 1 rubygems

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