Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion 3rd_party/CalcMD5/CalcMD5.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,21 @@

% If the current Matlab path is the parent folder of this script, the
% MEX function is not found - change the current directory!
error(['JSim:', mfilename, ':NoMex'], 'Cannot find MEX script.');
if ~exist(['CalcMD5' mexext], 'file')
warning('CalcMD5 does not seem compiled. Compiling...');
old_cd = pwd;
cd(fileparts(mfilename('fullpath')));
if strcmpi(mex.getCompilerConfigurations('C').Name(1:3), 'gcc')
mex CFLAGS="\$CFLAGS -std=c99" CalcMD5.c
else
mex CalcMD5.c
end
cd(old_cd);

if (nargin < 2), MD5 = CalcMD5(Data);
elseif (nargin < 3), MD5 = CalcMD5(Data, InClass);
else MD5 = CalcMD5(Data, InClass);
end
else
error(['JSim:', mfilename, ':NoMex'], 'Cannot find MEX script.');
end
Binary file added 3rd_party/CalcMD5/CalcMD5.mexa64
Binary file not shown.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ throughout my other projects. Make sure you download and keep updated!
Installation
------------

Update: the CalcMD5 code should now auto-compile upon its first exectuion.

Compile the weighted histogram code:

cd mycode/histogram
mex whistc.c

Compile the MD5 code:

cd 3rd_party/CalcMD5
mex CalcMD5.c

Compile the KDE code:

cd 3rd_party/@kde/mex
makemex

Get export_fig from:

https://github.com/altmany/export_fig
https://github.com/altmany/export_fig
3 changes: 3 additions & 0 deletions mycode/parallel/runFunctionOnDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
pBar.pop_bar();

if parallel
if exist(getPathName(local, 'slaves'), 'dir') == 0
mkdir(getPathName(local, 'slaves'));
end
% start the processing!
settings = struct('multicoreDir', getPathName(local, 'slaves'), ...
'nrOfEvalsAtOnce', nrOfEvalsAtOnce, 'useWaitbar', useWaitbar, ...
Expand Down