isworkernode.m

From Spinach Documentation Wiki
Revision as of 14:06, 5 April 2026 by Kuprov (talk | contribs) (Sync syntax/arguments/outputs with current Spinach source)
Jump to: navigation, search


Returns true if executed inside a parfor or spmd block. This function is used in the internal decision making of Spinach kernel: certain algorithms are switched to their serial versions if the calculation is already running inside some parallel loop.

Syntax

answer=isworkernode()

Arguments

none

Outputs

answer - true if running on a parallel worker process

See also

Parallelisation and GPUs


Version 2.2, authors: Ilya Kuprov