From 5483927af925b3892f2f48ef4eb12c07e3ce862a Mon Sep 17 00:00:00 2001 From: algol Date: Fri, 10 Aug 2018 16:24:48 +0100 Subject: MWsize CPU fix --- .../Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c | 5 +++-- Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c | 5 +++-- Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c | 7 ++++--- Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c | 5 +++-- Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c | 6 ++++-- .../Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c | 10 ++++++---- .../regularisers_CPU/NonlocalMarching_Inpaint.c | 8 +++++--- Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c | 14 +++----------- Wrappers/Matlab/mex_compile/regularisers_CPU/SB_TV.c | 6 ++++-- Wrappers/Matlab/mex_compile/regularisers_CPU/TGV.c | 6 ++++-- Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c | 5 +++-- Wrappers/Matlab/mex_compile/regularisers_CPU/TV_energy.c | 6 ++++-- 12 files changed, 46 insertions(+), 37 deletions(-) (limited to 'Wrappers') diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c index 81c0600..66ea9be 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c @@ -42,8 +42,9 @@ void mexFunction( int nrhs, const mxArray *prhs[]) { - int number_of_dims, iter_numb, dimX, dimY, dimZ; - const int *dim_array; + int number_of_dims, iter_numb; + mwSize dimX, dimY, dimZ; + const mwSize *dim_array; float *Input, *Output=NULL, lambda, tau, sigma; dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c index aae1cb7..642362f 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c @@ -44,8 +44,9 @@ void mexFunction( int nrhs, const mxArray *prhs[]) { - int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch, nonneg; - const int *dim_array; + int number_of_dims, iter, methTV, printswitch, nonneg; + mwSize dimX, dimY, dimZ; + const mwSize *dim_array; float *Input, *Output=NULL, lambda, epsil; number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c index bb868c7..1a0c070 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c @@ -49,9 +49,10 @@ void mexFunction( int nrhs, const mxArray *prhs[]) { - int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch, nonneg; - const int *dim_array; - const int *dim_array2; + int number_of_dims, iter, methTV, printswitch, nonneg; + mwSize dimX, dimY, dimZ; + const mwSize *dim_array; + const mwSize *dim_array2; float *Input, *InputRef, *Output=NULL, lambda, epsil, eta; number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c index 81b717d..ab45446 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c @@ -46,8 +46,9 @@ void mexFunction( int nrhs, const mxArray *prhs[]) { - int number_of_dims, iterationsNumb, dimX, dimY, dimZ; - const int *dim_array; + int number_of_dims, iterationsNumb; + mwSize dimX, dimY, dimZ; + const mwSize *dim_array; float *Input, *Output=NULL, lambdaROF, lambdaLLT, tau; dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c index e05f5d4..ec35b8b 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c @@ -43,8 +43,10 @@ void mexFunction( int nrhs, const mxArray *prhs[]) { - int number_of_dims, iter_numb, dimX, dimY, dimZ, penaltytype; - const int *dim_array; + int number_of_dims, iter_numb, penaltytype; + mwSize dimX, dimY, dimZ; + const mwSize *dim_array; + float *Input, *Output=NULL, lambda, tau, sigma; dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c index eaab4a7..9833392 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c @@ -45,9 +45,11 @@ void mexFunction( int nrhs, const mxArray *prhs[]) { - int number_of_dims, iter_numb, dimX, dimY, dimZ, penaltytype, i, inpaint_elements; - const int *dim_array; - const int *dim_array2; + int number_of_dims, iter_numb, penaltytype, i, inpaint_elements; + mwSize dimX, dimY, dimZ; + const mwSize *dim_array; + const mwSize *dim_array2; + float *Input, *Output=NULL, lambda, tau, sigma; unsigned char *Mask; @@ -95,7 +97,7 @@ void mexFunction( } inpaint_elements = 0; - for (i=0; i