Enable parallel processing in CTAP
The parfor loop enables parallel processing in Matlab by starting a 'worker pool' and assigning loop iterations to different workers. It would be quite valuable since CTAP can become very slow for branching pipes with many measurements, especially running, e.g., CTAP_peek_data or ICA.
While it is trivial to change for to parfor, there are caveats.
-
parfordoes not run iterations in assigned order, so it cannot be used for the loops that run CTAP steps, step sets, or branch pipes. Parallel processing would seem to work only for measurements - apparently
parforis incompatible with some of the code inside the measurements' for loop, e.g. theclearfunction, or nested functions. These would need to be changed before usingparfor