Sha256: 3969d2b1e9f7455301d3004e6df993a1add05214b0f9b879680cfe7cc53ca7c3

Contents?: true

Size: 1.36 KB

Versions: 19

Compression:

Stored size: 1.36 KB

Contents

<% unless is_object %>
__global__ void <%="cumo_#{c_iter}_index_kernel"%>(char *p1, size_t* idx1, seq_data_t beg, seq_data_t step, seq_data_t base, seq_count_t c, uint64_t n)
{
    for (uint64_t i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) {
        dtype x = f_seq(beg,step,c+i);
        *(dtype*)(p1+idx1[i]) = m_pow(base,x);
    }
}

__global__ void <%="cumo_#{c_iter}_stride_kernel"%>(char *p1, size_t s1, seq_data_t beg, seq_data_t step, seq_data_t base, seq_count_t c, uint64_t n)
{
    for (uint64_t i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) {
        dtype x = f_seq(beg,step,c+i);
        *(dtype*)(p1+(i*s1)) = m_pow(base,x);
    }
}

void <%="cumo_#{c_iter}_index_kernel_launch"%>(char *p1, size_t* idx1, seq_data_t beg, seq_data_t step, seq_data_t base, seq_count_t c, uint64_t n)
{
    size_t grid_dim = cumo_get_grid_dim(n);
    size_t block_dim = cumo_get_block_dim(n);
    <%="cumo_#{c_iter}_index_kernel"%><<<grid_dim, block_dim>>>(p1,idx1,beg,step,base,c,n);
}

void <%="cumo_#{c_iter}_stride_kernel_launch"%>(char *p1, ssize_t s1, seq_data_t beg, seq_data_t step, seq_data_t base, seq_count_t c, uint64_t n)
{
    size_t grid_dim = cumo_get_grid_dim(n);
    size_t block_dim = cumo_get_block_dim(n);
    <%="cumo_#{c_iter}_stride_kernel"%><<<grid_dim, block_dim>>>(p1,s1,beg,step,base,c,n);
}
<% end %>

Version data entries

19 entries across 19 versions & 1 rubygems

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