-
Notifications
You must be signed in to change notification settings - Fork 80
/
compile_mex.m
36 lines (28 loc) · 919 Bytes
/
compile_mex.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
function compile_mex( cudaRoot )
%compile_mex compiles all the MEX-functions included in this package
rootDir = fileparts( mfilename( 'fullpath' ) );
% image cropping on a GPU
cd( fullfile(rootDir, 'utils', 'cropRectanglesMex') );
if exist('cudaRoot', 'var')
build_cropRectanglesMex( cudaRoot );
else
build_cropRectanglesMex;
end
cd(rootDir);
% computation of the min-marginals
cd( fullfile(rootDir, 'pairwiseModel', 'computeMinMarginalsBinaryMex') );
build_computeMinMarginalsBinaryMex;
cd(rootDir);
% brute force energy minimization
cd( fullfile(rootDir, 'pairwiseModel', 'energyMinimization', 'bruteForceBinaryPairwiseMex') );
build_bruteForceBinaryPairwiseMex;
cd( rootDir );
% QPBO
cd( fullfile(rootDir, 'pairwiseModel', 'energyMinimization', 'qpboMex') );
build_qpboMex;
cd( rootDir );
% TRW-S
cd( fullfile(rootDir, 'pairwiseModel', 'energyMinimization', 'trwsMex') );
build_trwsMex;
cd( rootDir );
end