6b05ce9b975fdcdb982e4f3b14099df0f9e341af,scikits/cuda/misc.py,,,#,627

Before Change



    return c_gpu

diff_mod_template = Template(
//include <pycuda-complex.hpp>

//if ${use_double}
//define REAL_TYPE double
//if ${use_complex}
//define TYPE pycuda::complex<double>
//else
//define TYPE double
//endif
//else
//define REAL_TYPE float
//if ${use_complex}
//define TYPE pycuda::complex<float>
//else
//define TYPE float
//endif
//endif

__global__ void diff(TYPE *x, TYPE *y, unsigned int N) {
    unsigned int idx = blockIdx.y*blockDim.x*gridDim.x+
                       blockIdx.x*blockDim.x+threadIdx.x;

    if (idx < N-1) {
        y[idx] = x[idx+1]-x[idx];
    }
}
)

def diff(x_gpu):
    
    Calculate the discrete difference.

After Change


             np.typecodes["AllInteger"]+np.typecodes["AllFloat"]]

// Numbers of bytes occupied by each numerical type:
num_nbytes = dict((np.dtype(t),t(1).nbytes) for t in num_types)

def set_realloc(x_gpu, data):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: lebedov/scikit-cuda
Commit Name: 6b05ce9b975fdcdb982e4f3b14099df0f9e341af
Time: 2013-07-28
Author: lev@columbia.edu
File Name: scikits/cuda/misc.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: a453f9011dcb7bb3efa7e40b132f6db9eb55f5f9
Time: 2015-04-27
Author: thomas.unterthiner@gmx.net
File Name: scikits/cuda/integrate.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: feb40c2b5e5df3797272cf061712da7348120cba
Time: 2013-07-28
Author: lev@columbia.edu
File Name: scikits/cuda/linalg.py
Class Name:
Method Name: