forked from gidariss/LocNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LocNet_build.m
44 lines (40 loc) · 1.3 KB
/
LocNet_build.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function LocNet_build()
if ~exist('liblinear_train')
try
fprintf('Compiling liblinear version 1.94\n');
fprintf('Source code page:\n');
fprintf(' http://www.csie.ntu.edu.tw/~cjlin/liblinear/\n');
mex -outdir bin ...
CFLAGS="\$CFLAGS -std=c99 -O3 -fPIC" -largeArrayDims ...
external/liblinear-1.94/matlab/train.c ...
external/liblinear-1.94/matlab/linear_model_matlab.c ...
external/liblinear-1.94/linear.cpp ...
external/liblinear-1.94/tron.cpp ...
"external/liblinear-1.94/blas/*.c" ...
-output liblinear_train;
catch exception
fprintf('Error message %s\n', getReport(exception));
end
end
if ~exist('nms_mex')
try
fprintf('Compiling nms_mex\n');
mex -outdir bin ...
-largeArrayDims ...
code/postprocessing/nms_mex.cpp ...
-output nms_mex;
catch exception
fprintf('Error message %s\n', getReport(exception));
end
end
if ~exist('nms_gpu_mex', 'file')
try
fprintf('Compiling nms_gpu_mex\n');
addpath(fullfile(pwd, 'code', 'postprocessing'));
nvmex('code/postprocessing/nms_gpu_mex.cu', 'bin');
delete('nms_gpu_mex.o');
catch exception
fprintf('Error message %s\n', getReport(exception));
end
end
end