Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/matlab 2022 macos #513

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,19 @@ Makefile
*.[do]
*.l[doa]
*.loT
*.orig
*.orig
*.mexmaci64
src/matlab/vigraBoundaryTensor.m
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these types of m files automatically generated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, auto generated by Matlab . I added them to .gitignore to prevent checkin by accident

src/matlab/vigraConnectedComponents.m
src/matlab/vigraCorner.m
src/matlab/vigraAdjacency.m
src/matlab/vigraExporthdf5RF.m
src/matlab/vigraImporthdf5RF.m
src/matlab/vigraLearnRF.m
src/matlab/vigraLeastAngleRegression.m
src/matlab/vigraPredictLabelsRF.m
src/matlab/vigraPredictProbabilitiesRF.m
src/matlab/vigraRadialSymmetry.m
src/matlab/vigraResize2.m
src/matlab/vigraResize3.m
src/matlab/vigraWatershed.m
6 changes: 3 additions & 3 deletions include/vigra/matlab.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ getString(mxArray const * t)



class CompileTimeError;
class CompileTimeError {};

namespace detail {

Expand Down Expand Up @@ -1179,8 +1179,8 @@ class SparseArray

int len = data.size();
in = mxCreateSparse(width, length, len, mxREAL);
int* jc = mxGetJc(in);
int* ir = mxGetIr(in);
mwIndex* jc = mxGetJc(in);
mwIndex* ir = mxGetIr(in);
double* pr = mxGetPr(in);
if(len == 0){
jc[0] = 1;
Expand Down
14 changes: 7 additions & 7 deletions src/matlab/vigraDistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ void vigraMexFunction(vigra::matlab::OutputArray outputs, vigra::matlab::InputAr
}
}

/*+++++++++++++++++++++++MexEntryFunc++++++++++++++++++++++++++++++++*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please undo these purely stylist changes.

git checkout master -- src/matlab/vigraDistance.cpp
git checkout master -- src/matlab/vigraResize2.cpp
git checkout master -- src/matlab/vigraResize3.cpp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's no stylist changes - the original version creates compiler warnings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but ok - if you insist I will...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mex compiler doesn't like multiline comments? i'm maybe out of touch. sorry.

Can you copy paste the warning again?

Copy link
Contributor Author

@tschuldigung tschuldigung Oct 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIght, I should have listed the warning in the first place. These warnings appear for almost every .cpp file within the Matlab folder

vigraDistance.cpp
compiling: vigraDistance.cpp
mex -O -I../../include  -outdir '.' ./vigraDistance.cpp
Building with 'Xcode Clang++'.
vigraDistance.cpp:175:1: warning: '/*' within block comment [-Wcomment]
/* if a certain class is NOT supported - you will have to copy the
^
vigraDistance.cpp:176:1: warning: '/*' within block comment [-Wcomment]
/* body of the callMexFunctor function and edit it here.
^
vigraDistance.cpp:177:1: warning: '/*' within block comment [-Wcomment]
/* Supports (u)int[8|16|32|64], float and double.
^
vigraDistance.cpp:178:1: warning: '/*' within block comment [-Wcomment]
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
^
4 warnings generated.

MEX completed successfully.
creating: vigraDistance.m

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhhh i see, they were opening a comment /* many times within the comment itself.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi Marc @hmaarrfk ! Can we merge this fix into master?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. i was looking at this last night. hsould be ok.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for your patience

/* Gatewayfunction - see matlab.hxx for details.
/* if a certain class is NOT supported - you will have to copy the
/* body of the callMexFunctor function and edit it here.
/* Supports (u)int[8|16|32|64], float and double.
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/** MATLAB
//+++++++++++++++++++++++MexEntryFunc++++++++++++++++++++++++++++++++
// Gatewayfunction - see matlab.hxx for details.
// if a certain class is NOT supported - you will have to copy the
// body of the callMexFunctor function and edit it here.
// Supports (u)int[8|16|32|64], float and double.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/* MATLAB
function D = vigraDistance(inputArray)
function D = vigraDistance(inputArray, options);

Expand Down
6 changes: 3 additions & 3 deletions src/matlab/vigraResize2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ using namespace matlab;



/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* This function does all the work
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// This function does all the work
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


//#define RN_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions src/matlab/vigraResize3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ using namespace matlab;



/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* This function does all the work
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// This function does all the work
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


//#define RN_DEBUG
Expand Down