Code covered by the BSD License  

Highlights from
Multicore - Parallel processing on multiple cores

Multicore - Parallel processing on multiple cores

by

 

26 Jan 2007 (Updated )

This package provides parallel processing on multiple cores/machines.

postprocessdemo(postProcStruct)
function postprocessdemo(postProcStruct)
%POSTPROCESSDEMO  Example for a user-defined postprocessing function.
%   POSTPROCESSDEMO(POSTPROCSTRUCT) accepts a structure passed by function
%   STARTMULTICOREMASTER and makes some command-line outputs. The functions
%   shall demonstrate the basic use of the postprocessing function.
%
%   Markus Buehren
%   Last modified 19.06.2009
%
%   See also STARTMULTICOREMASTER.

persistent lastDisplayTime
if isempty(lastDisplayTime)
  lastDisplayTime = mbtime;
end

if strcmp(postProcStruct.state, 'initialization')
  disp(sprintf('Multicore demo started at %s', postProcStruct.userData));
end  

if mbtime - lastDisplayTime > 2.0
  lastDisplayTime = mbtime;

  disp(sprintf('Current time: %s.', datestr(now)));
  disp(sprintf('Jobs done by master: %2d',     postProcStruct.nrOfFilesMaster));
  disp(sprintf('Jobs done by slave:  %2d',     postProcStruct.nrOfFilesSlaves));

end

Contact us