Just to update, I think the reason the jacobian_error_3d_double crashed is becasue I run out of free memory and that's why malloc return a null pointer.
Using coarser spacing (4x4x4 instead of 2x2x2) results in correct execution of the function (becasue less memory is used).
Also note, that Matlab return more available threads(8) than actually supported(4), and runs slower on 8 threads than on 4 threads
jacobian_error_3d_double crashes on win7 64bit, Intel i7-3632QM cpu (quad core), 16GB RAM.
Compiled with Visual Studio 2013.
Input volume was about 600x500x60.
I managed to get it to run by setting Nthreds=1 indide the c code and re-compiling.
Of course it takes forever to run (and almost 15GB of RAM), but at least it runs...
There seems to be a problem with the threads and mallocs calls.
I keep getting the following error when trying to mex the files:
In file included from bspline_error_2d_double.c:1:
In file included from /Applications/MATLAB_R2013a.app/extern/include/mex.h:58:
In file included from /Applications/MATLAB_R2013a.app/extern/include/matrix.h:294:
/Applications/MATLAB_R2013a.app/extern/include/tmwtypes.h:819:9: error: unknown type name 'char16_t'
typedef char16_t CHAR16_T;
1 error generated.
mex: compile of ' "bspline_error_2d_double.c"' failed.
any ideas as to why?
Running on a mac