-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathcdcsInstall.m
More file actions
38 lines (31 loc) · 850 Bytes
/
cdcsInstall.m
File metadata and controls
38 lines (31 loc) · 850 Bytes
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
function cdcsInstall
% CDCSINSTALL
%
% Install CDCS and compile required binaries.
%
% See also CDCS, CDCSTEST
% First, compile some files from CSparse
here = pwd;
cd('include')
cs_install
cd(here);
movefile(['include',filesep,'cs_lsolve.mex*'], ...
[here,filesep,'packages',filesep,'+cdcs_utils']);
movefile(['include',filesep,'cs_ltsolve.mex*'], ...
[here,filesep,'packages',filesep,'+cdcs_utils']);
% Then compile some mex files from this package
cd(['packages',filesep,'+cdcs_utils',filesep,'private'])
if (~isempty (strfind (computer, '64')))
mexcmd = 'mex -largeArrayDims' ;
else
mexcmd = 'mex' ;
end
eval([mexcmd, ' svec.c']);
eval([mexcmd, ' smat.c']);
cd(here)
% Finally add to path and save
addpath([here,filesep,'packages']);
addpath(here);
savepath
fprintf('\nCompilation completed successfully.\n');
end