diff options
author | TomasKulhanek <tomas.kulhanek@stfc.ac.uk> | 2018-12-07 00:33:52 +0000 |
---|---|---|
committer | TomasKulhanek <tomas.kulhanek@stfc.ac.uk> | 2018-12-07 00:33:52 +0000 |
commit | a4143c74b9c8765959855b20e381a015e2d08e32 (patch) | |
tree | 81e67bdac851467b686b1ca5fb586640bc9ae76c /Wrappers/Python/src | |
parent | 7e205f44f2942ec165afe8e60b10a4ff69f72e19 (diff) | |
download | regularization-a4143c74b9c8765959855b20e381a015e2d08e32.tar.gz regularization-a4143c74b9c8765959855b20e381a015e2d08e32.tar.bz2 regularization-a4143c74b9c8765959855b20e381a015e2d08e32.tar.xz regularization-a4143c74b9c8765959855b20e381a015e2d08e32.zip |
exit 0
Diffstat (limited to 'Wrappers/Python/src')
-rw-r--r-- | Wrappers/Python/src/gpu_regularisers.pyx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Wrappers/Python/src/gpu_regularisers.pyx b/Wrappers/Python/src/gpu_regularisers.pyx index 3457796..302727e 100644 --- a/Wrappers/Python/src/gpu_regularisers.pyx +++ b/Wrappers/Python/src/gpu_regularisers.pyx @@ -25,7 +25,7 @@ cdef extern void TGV_GPU_main(float *Input, float *Output, float lambdaPar, floa cdef extern void LLT_ROF_GPU_main(float *Input, float *Output, float lambdaROF, float lambdaLLT, int iterationsNumb, float tau, int N, int M, int Z); cdef extern void NonlDiff_GPU_main(float *Input, float *Output, float lambdaPar, float sigmaPar, int iterationsNumb, float tau, int penaltytype, int N, int M, int Z); cdef extern void dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iterationsNumb, float epsil, float eta, int methodTV, int nonneg, int printM, int N, int M, int Z); -cdef extern int Diffus4th_GPU_main(float *Input, float *Output, float lambdaPar, float sigmaPar, int iterationsNumb, float tau, int N, int M, int Z); +cdef extern void Diffus4th_GPU_main(float *Input, float *Output, float lambdaPar, float sigmaPar, int iterationsNumb, float tau, int N, int M, int Z); cdef extern void PatchSelect_GPU_main(float *Input, unsigned short *H_i, unsigned short *H_j, float *Weights, int N, int M, int SearchWindow, int SimilarWin, int NumNeighb, float h); # Total-variation Rudin-Osher-Fatemi (ROF) @@ -522,8 +522,7 @@ def Diff4th_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, # Run Anisotropic Fourth-Order diffusion for 2D data # Running CUDA code here - if (Diffus4th_GPU_main(&inputData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, dims[1], dims[0], 1)>0): - raise RuntimeError('Runtime error!') + Diffus4th_GPU_main(&inputData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, dims[1], dims[0], 1) return outputData def Diff4th_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, @@ -541,8 +540,7 @@ def Diff4th_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, # Run Anisotropic Fourth-Order diffusion for 3D data # Running CUDA code here - if (Diffus4th_GPU_main(&inputData[0,0,0], &outputData[0,0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, dims[2], dims[1], dims[0])>0): - RuntimeError('Runtime error!') + Diffus4th_GPU_main(&inputData[0,0,0], &outputData[0,0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, dims[2], dims[1], dims[0]) return outputData #****************************************************************# |