error while running a deformable part model
Show older comments
System
Ubuntu
Matlab r2020b
gcc 9.3
While running the compile.m following error (underlined) shows
Building with 'g++'.
/home/nasim/Desktop/voc-release5/2012/voc-dpm/fv_cache/fv_cache.cc: In function ‘void gradient_handler(int, mxArray**, int, const mxArray**)’:
/home/nasim/Desktop/voc-release5/2012/voc-dpm/fv_cache/fv_cache.cc:417:21: warning: narrowing conversion of ‘dim’ from ‘int’ to ‘mwSize’ {aka ‘long unsigned int’} [-Wnarrowing]
417 | mwSize dims[] = { dim };
| ^~~
/home/nasim/Desktop/voc-release5/2012/voc-dpm/fv_cache/fv_cache.cc: In function ‘void get_model_handler(int, mxArray**, int, const mxArray**)’:
/home/nasim/Desktop/voc-release5/2012/voc-dpm/fv_cache/fv_cache.cc:510:23: warning: narrowing conversion of ‘(int)M.model::num_blocks’ from ‘int’ to ‘mwSize’ {aka ‘long unsigned int’} [-Wnarrowing]
510 | mwSize dims[] = { M.num_blocks };
| ~~^~~~~~~~~~
/home/nasim/Desktop/voc-release5/2012/voc-dpm/fv_cache/fv_cache.cc:515:38: warning: narrowing conversion of ‘(((int)M.model::block_sizes) + ((sizetype)(((long unsigned int)i) * 4)))’ from ‘int’ to ‘mwSize’ {aka ‘long unsigned int’} [-Wnarrowing]
515 | mwSize dims[] = { M.block_sizes[i] };
| ~~~~~~~~~~~~~~~^
MEX completed successfully.
Building with 'g++'.
Error using mex
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc: In function ‘double conv(int, int,
const float*, const mwSize*, const float*, const mwSize*, int)’:
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc:62:25: warning: comparison of integer
expressions of different signedness: ‘int’ and ‘const mwSize’ {aka ‘const long unsigned int’}
[-Wsign-compare]
62 | for (int xp = 0; xp < B_dims[1]; xp++) {
| ~~~^~~~~~~~~~~
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc: In function ‘double rconv(int, int,
int, int, int)’:
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc:97:43: error: cannot convert ‘int*’
to ‘const mwSize*’ {aka ‘const long unsigned int*’} in initialization
97 | const mwSize A_dims = MODEL->featdims[L];
| ~~~~~~~~~~~~~~~~~^
| |
| int
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc: In function ‘double pconvdt(int,
int, int, int, int, int, int, int, int, int, double)’:
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc:116:43: error: cannot convert ‘int*’
to ‘const mwSize*’ {aka ‘const long unsigned int*’} in initialization
116 | const mwSize A_dims = MODEL->featdims[L];
| ~~~~~~~~~~~~~~~~~^
| |
| int
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc: In function ‘double partscore(int,
int, int, int, int, int, double)’:
/home/nasim/Desktop/voc-release5/2012/voc-dpm/star-cascade/cascade.cc:195:43: error: cannot convert ‘int*’
to ‘const mwSize*’ {aka ‘const long unsigned int*’} in initialization
195 | const mwSize A_dims = MODEL->featdims[L];
| ~~~~~~~~~~~~~~~~~^
| |
| int
Error in cascade_compile (line 55)
eval(mexcmd);
Error in compile (line 44)
cascade_compile(opt, verb);
1 Comment
Madhav Thakker
on 18 Mar 2021
Hi Nasim,
Have a look at https://in.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer and make edits to the question as necessary.
Answers (0)
Categories
Find more on Integrate External Code in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!