diff toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirparallel.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirparallel.m	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,27 @@
+function p = mirparallel(s)
+% mirparallel(1) toggles on parallel processing: (BETA)
+%   When ?Folder? or ?Folders? is used, several audio files can be analysed
+%   in parallel using several  parallel Matlab sessions running on the 
+%   different processors and/or  processor cores of your computer.
+%   (Requires MathWorks? Parallel Computing Toolbox.)
+% mirparallel(0) toggles back off parallel processing.
+
+persistent mir_parallel
+
+if nargin
+    warning('MIRtoolbox Parallel computing is currently in Beta Version.');
+    if s
+        try
+            matlabpool size;
+        catch
+            mirerror('mirparallel','Are you sure Parallel Processing Toolbox is installed?');
+        end
+    end
+    mir_parallel = s;
+else
+    if isempty(mir_parallel)
+        mir_parallel = 0;
+    end
+end
+
+p = mir_parallel;
\ No newline at end of file