ff33c46016b8928c1609cf905308577aecffa4a8,scikits/cuda/misc.py,,,#,477

Before Change



    return y_gpu

if __name__ == "__main__":
    import doctest
    doctest.testmod()

After Change



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

//define USE_DOUBLE ${use_double}
//define USE_COMPLEX ${use_complex}

//if USE_DOUBLE == 1
//define REAL_TYPE double
//if USE_COMPLEX == 1
//define TYPE pycuda::complex<double>
//else
//define TYPE double
//endif
//else
//define REAL_TYPE float
//if USE_COMPLEX == 1
//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*${max_threads_per_block}*${max_blocks_per_grid}+
                       blockIdx.x*${max_threads_per_block}+threadIdx.x;

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

def diff(x_gpu):
    
    Calculate the discrete difference.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 7

Instances


Project Name: lebedov/scikit-cuda
Commit Name: ff33c46016b8928c1609cf905308577aecffa4a8
Time: 2011-02-18
Author: lev@columbia.edu
File Name: scikits/cuda/misc.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: 15512c847beab93a3f046fea9414dd8fa9db4142
Time: 2011-02-11
Author: lev@columbia.edu
File Name: scikits/cuda/linalg.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: 0e19d0ac00a40890f3bf8c261b7bf970c1fc03db
Time: 2011-02-07
Author: lev@columbia.edu
File Name: scikits/cuda/misc.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: c59c4a9b506e7aa86d3c47780e12599d5b41e2b1
Time: 2011-01-31
Author: lev@columbia.edu
File Name: scikits/cuda/misc.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: 51867a4f823a1067af92ea93519c1ae920bd76a6
Time: 2011-02-17
Author: lev@columbia.edu
File Name: scikits/cuda/linalg.py
Class Name:
Method Name:


Project Name: lebedov/scikit-cuda
Commit Name: 6ff6f8257fa4b0a1438edddcd85b05aaa7a5942f
Time: 2010-11-16
Author: lev@columbia.edu
File Name: scikits/cuda/linalg.py
Class Name:
Method Name: