Skip to content
Browse files

sped up compilation

  • Loading branch information...
1 parent 4e00af1 commit 9291cd341d7a69684151f1b9c7b9f920b23d40a3 @cvondrick cvondrick committed Nov 29, 2012
Showing with 35 additions and 42 deletions.
  1. +1 −1 compile.m
  2. +1 −9 invertHOG.m
  3. +33 −32 spams/compile.m
View
2 compile.m
@@ -3,5 +3,5 @@
fprintf('compiling features.cc\n');
mex -O internal/features.cc -o internal/features
-fprintf('compiling spams\n'):
+fprintf('compiling spams\n');
run 'spams/compile.m'
View
10 invertHOG.m
@@ -17,22 +17,14 @@
% This function should take no longer than a second to invert any reasonably sized
% HOG feature point on a 12 core machine.
function im = invertHOG(feat, pd),
+
if ~exist('pd', 'var'),
global ihog_pd
if isempty(ihog_pd),
ihog_pd = load('pd.mat');
end
pd = ihog_pd;
end
-im = invertHOGdo(feat, pd);
-
-
-
-% invertHOGdo(feat, pd)
-%
-% This function uses 'pd' to invert 'feat'. It does most of the heavy lifting
-% of inversion, including the sparse coding.
-function im = invertHOGdo(feat, pd),
[ny, nx, ~] = size(feat);
View
65 spams/compile.m
@@ -113,41 +113,42 @@
COMPILE = {
% compile dictLearn toolbox
'-I./linalg/ -I./decomp/ -I./dictLearn/ dictLearn/mex/mexTrainDL.cpp',
- '-I./linalg/ -I./decomp/ -I./dictLearn/ dictLearn/mex/mexTrainDL_Memory.cpp',
+ %'-I./linalg/ -I./decomp/ -I./dictLearn/ dictLearn/mex/mexTrainDL_Memory.cpp',
% compile dag toolbox
- '-I./dags/ -I./linalg/ dags/mex/mexRemoveCyclesGraph.cpp',
- '-I./dags/ -I./linalg/ dags/mex/mexCountPathsDAG.cpp',
- '-I./dags/ -I./linalg/ dags/mex/mexCountConnexComponents.cpp',
- % compile proximal toolbox
- '-I./linalg/ -I./prox/ prox/mex/mexEvalPathCoding.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexFistaFlat.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexFistaTree.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexFistaGraph.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexFistaPathCoding.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexProximalFlat.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexProximalTree.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexProximalGraph.cpp',
- '-I./linalg/ -I./prox/ prox/mex/mexProximalPathCoding.cpp',
- % compile linalg toolbox
- '-I./linalg/ linalg/mex/mexCalcAAt.cpp',
- '-I./linalg/ linalg/mex/mexCalcXAt.cpp',
- '-I./linalg/ linalg/mex/mexCalcXY.cpp',
- '-I./linalg/ linalg/mex/mexCalcXYt.cpp',
- '-I./linalg/ linalg/mex/mexCalcXtY.cpp',
- '-I./linalg/ linalg/mex/mexConjGrad.cpp',
- '-I./linalg/ linalg/mex/mexInvSym.cpp',
- '-I./linalg/ linalg/mex/mexSort.cpp',
- '-I./linalg/ linalg/mex/mexNormalize.cpp',
+ %'-I./dags/ -I./linalg/ dags/mex/mexRemoveCyclesGraph.cpp',
+ %'-I./dags/ -I./linalg/ dags/mex/mexCountPathsDAG.cpp',
+ %'-I./dags/ -I./linalg/ dags/mex/mexCountConnexComponents.cpp',
+ %% compile proximal toolbox
+ %'-I./linalg/ -I./prox/ prox/mex/mexEvalPathCoding.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexFistaFlat.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexFistaTree.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexFistaGraph.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexFistaPathCoding.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexProximalFlat.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexProximalTree.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexProximalGraph.cpp',
+ %'-I./linalg/ -I./prox/ prox/mex/mexProximalPathCoding.cpp',
+ %% compile linalg toolbox
+ %'-I./linalg/ linalg/mex/mexCalcAAt.cpp',
+ %'-I./linalg/ linalg/mex/mexCalcXAt.cpp',
+ %'-I./linalg/ linalg/mex/mexCalcXY.cpp',
+ %'-I./linalg/ linalg/mex/mexCalcXYt.cpp',
+ %'-I./linalg/ linalg/mex/mexCalcXtY.cpp',
+ %'-I./linalg/ linalg/mex/mexConjGrad.cpp',
+ %'-I./linalg/ linalg/mex/mexInvSym.cpp',
+ %'-I./linalg/ linalg/mex/mexSort.cpp',
+ %'-I./linalg/ linalg/mex/mexNormalize.cpp',
% compile decomp toolbox
'-I./linalg/ -I./decomp/ decomp/mex/mexLasso.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexOMP.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexCD.cpp'
- '-I./linalg/ -I./decomp/ decomp/mex/mexL1L2BCD.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexLassoMask.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexLassoWeighted.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexOMPMask.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexSOMP.cpp',
- '-I./linalg/ -I./decomp/ decomp/mex/mexSparseProject.cpp'};
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexOMP.cpp',
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexCD.cpp'
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexL1L2BCD.cpp',
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexLassoMask.cpp',
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexLassoWeighted.cpp',
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexOMPMask.cpp',
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexSOMP.cpp',
+ %'-I./linalg/ -I./decomp/ decomp/mex/mexSparseProject.cpp'
+ };
if linux || mac
fid=fopen('run_matlab.sh','w+');

0 comments on commit 9291cd3

Please sign in to comment.
Something went wrong with that request. Please try again.