Difference between revisions of "Isworkernode.m"
(Sync syntax/arguments/outputs with current Spinach source) |
(Restore pre-bulk-edit wiki content) |
||
| Line 1: | Line 1: | ||
| − | {{DISPLAYTITLE:isworkernode.m}} | + | {{DISPLAYTITLE:isworkernode.m}} |
| − | |||
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. | 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== | ==Syntax== | ||
| − | answer=isworkernode() | + | answer=isworkernode() |
| − | |||
| − | |||
| − | |||
| − | |||
==Outputs== | ==Outputs== | ||
| − | answer - true if running on a parallel worker process | + | answer - true if running on a parallel worker process |
==See also== | ==See also== | ||
| − | |||
[[Kernel_utilities#Parallelisation_and_GPUs|Parallelisation and GPUs]] | [[Kernel_utilities#Parallelisation_and_GPUs|Parallelisation and GPUs]] | ||
''Version 2.2, authors: [[Ilya Kuprov]]'' | ''Version 2.2, authors: [[Ilya Kuprov]]'' | ||
Revision as of 14:49, 5 April 2026
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()
Outputs
answer - true if running on a parallel worker process
See also
Version 2.2, authors: Ilya Kuprov