]> AND Private Git Repository - these_gilles.git/blob - THESE/codes/graphe/GCmex1.9/compile_gc.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
11 oct
[these_gilles.git] / THESE / codes / graphe / GCmex1.9 / compile_gc.m
1 % v = regexp(version(),'\.','split');\r
2 % mj = str2double(v{1});\r
3 % mn = str2double(v{2});\r
4 % % v = version();\r
5 % % di = find(v=='.');\r
6 % % mj= str2double(v(1:di(1)-1));\r
7 % % mn= str2double(v(di(1)+1 :di(2)-1));\r
8 \r
9 if strfind(computer(),'64')\r
10     defs = '-DA64BITS '; % for 64bit machines - define pointer type\r
11 else\r
12     defs = '';\r
13 end\r
14 % if mj < 7 || (mj==7 && mn < 3)\r
15 if verLessThan('matlab','7.3')    \r
16     defs = [defs, '-DmwIndex=int -DmwSize=size_t '];\r
17 end\r
18 \r
19 cmd = sprintf('mex -O -largeArrayDims %s GraphCutMex.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);\r
20 eval(cmd);\r
21 cmd = sprintf('mex -O -largeArrayDims %s GraphCut3dConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);\r
22 eval(cmd);\r
23 cmd = sprintf('mex -O -largeArrayDims %s GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);\r
24 eval(cmd);\r
25 cmd = sprintf('mex -O -largeArrayDims %s GraphCutConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);\r
26 eval(cmd);\r
27 clear cmd mj mn v di defs\r
28 \r
29 \r
30 % if strcmp(computer(),'GLNXA64')\r
31 %     mex -g  -DA64BITS GraphCutMex.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
32 %     mex -g  -DA64BITS GraphCut3dConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
33 %     if v >= 7.3\r
34 %         mex -g  -largeArrayDims -DMAT73 -DA64BITS GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
35 %     else\r
36 %         mex -g  -DA64BITS GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
37 %     end\r
38 %     mex -g -DA64BITS GraphCutConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
39 % else\r
40 %     mex -g GraphCutMex.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
41 %     mex -g  GraphCut3dConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
42 %     if v >= 7.3\r
43 %         mex -g  -largeArrayDims -DMAT73 GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
44 %     else\r
45 %         mex -g  GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
46 %     end\r
47 %     mex -g  GraphCutConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp\r
48 % end    \r