Equation Solution  
    High Performance by Design
Navigation Tree  

'- - Basic Concept
'- - Limitations & Status
'- - Do Subroutine
'- - Functions
|     '- - nlp$use
|     '- - nlp$done
|     '- - nlp$staysoftcore
|     '- - nlp$loop
|     '- - nlp$syncloop
|     '- - nlp$barrier
|     '- - Parallel Locks
|     '- - nlp$getce
|     '- - User Times
'- - Where To Download
'- - Manual Tool!

Function nlp$syncloop


call nlp$syncloop_?(sub,start,stop,step,a_1,a_2,...)

sub -- the do-subroutine
start -- the initial value of do variable
stop -- the terminating bound of do variable
step -- the increment or the decrement of do variable.
a_1, a_2,... -- arguments to subroutine sub
the symbol ? -- number of arguments

For example, to dispatch the following loop
   do i = start, stop, step
      call sub(i,a,b)
   end do
The arguments, passed to neuLoop, can be illustrated in the following:
   sub(       i,            a,   b)
    |         |             |    |
    ↓         ↓             ↓    ↓
   sub   start,stop,step    a    b
In the above, the first row is the subroutine sub with three arguments (i,a,b); the second row is the arguments passed to neuLoop. One point that should be paid attention to is the do variable (e.g., i) in subroutine sub should be replaced with values of do variable, e.g., start, stop, step, when passed to nlp$syncloop. It can be seen arguments passed to neuLoop includes the subroutine name (e.g., sub), three parameters of do variable (e.g., start, stop, step), and remaining arguments (e.g., a,b), and a total of 8 arguments. Syntax to dispatch the above loop is

   call nlp$syncloop_6(sub,start,stop,step,a b)


      This function dispatches a loop to soft cores, and blocks itself until the jobs dispatched to soft cores are complete. For example, if an application has the following statements
   call nlp$loop_5(sub_1,,,,)
   call nlp$loop_9(sub_2,,,,)
   call nlp$syncloop_11(sub_3,,,,)
The caller blocks itself until the jobs in subroutines, sub_1, sub_2 and sub_3, which are dispatched in nlp$loop and nlp$syncloop statements are complete. What is the difference between nlp$loop and nlp$syncloop? In nlp$loop, caller dispatches jobs and immediately returns; while in nlp$syncloop, caller blocks itself until the jobs that are dispatched to soft cores are complete.

      neuLoop provides the following 52 nlp$syncloop functions to dispatch loops:
      ... ... ...
Number of arguments is appended in the subroutine name.