Difference between revisions of "Isworkernode.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Update function See also links and function index membership)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:isworkernode.m}} __NOTOC__
 
{{DISPLAYTITLE:isworkernode.m}} __NOTOC__
−
 
 
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()
  
−
==Arguments==
+
==Parameters==
  
−
none
+
    none
  
 
==Outputs==
 
==Outputs==
  
−
answer - true if running on a parallel worker process
+
    answer - true if running on a parallel worker process
  
 
==See also==
 
==See also==
−
 
+
[[distrib_dim.m]], [[end_disallow_gpu.m]], [[parallel_profiler_report.m]], [[parallel_profiler_start.m]], [[poolsize.m]], [[save_anyway.m]], [[smack.m]], [[start_disallow_gpu.m]], [[swizzle.m]], [[Kernel_utilities]]
−
[[Kernel_utilities#Parallelisation_and_GPUs|Parallelisation and GPUs]]
 
−
 
 
  
 
''Version 2.2, authors: [[Ilya Kuprov]]''
 
''Version 2.2, authors: [[Ilya Kuprov]]''

Latest revision as of 18:38, 6 June 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()

Parameters

    none

Outputs

    answer - true if running on a parallel worker process

See also

distrib_dim.m, end_disallow_gpu.m, parallel_profiler_report.m, parallel_profiler_start.m, poolsize.m, save_anyway.m, smack.m, start_disallow_gpu.m, swizzle.m, Kernel_utilities

Version 2.2, authors: Ilya Kuprov