Equation Solution  
    High Performance by Design
Navigation Tree  

 
neuLoop  
'- - 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!



Functions
nlp$createlock
nlp$deletelock
nlp$lock
nlp$unlock


SYNTAX
      call nlp$createlock(lockid)
      call nlp$deletelock(lockid)
      call nlp$lock(lockid)
      call nlp$unlock(lockid)
where lockid, 4-byte integer, is lock identity. The function nlp$createlock returns lockid. User cannot change the lockid. Functions nlp$deletelock, nlp$lock and nlp$unlock need the lockid.

PURPOSE

        A lock is created by the function nlp$createlock. When the lock is no longer necessary, the lock can be deleted by the function nlp$deletelock.

        Lock is for soft cores to enter critical section. A critical section is accessed by the lock holder. Before entering a critical section, soft core needs to call the function nlp$lock, and becomes the lock holder after returning from the call. If the lock is held by other soft core, a call to nlp$lock blocks the caller until the lock holder releases the lock. Only one soft core can hold the lock at a time. The function nlp$unlock releases the lock. For example,
  call nlp$lock(lockid)
  !! critical section that is accessed
  !! by one soft core at a time
  call nlp$unlock(lockid)