Next: , Previous: , Up: Reference manual   [Contents][Index]


7.9 Package FL.PARALLEL

This package provides some Femlisp extensions for parallel execution building on the BORDEAUX-THREADS and LPARALLEL libraries

Class: MUTEX-MIXIN

A mixin which adds a mutex to every instance of the class.

Direct slots:

Function: P-MAP &REST ARGS

Use map/pmap depending on availability of kernel. Recursive splitting of work is not done.

Class: PARQUEUE

A thread-safe queue waiting for input.

Superclasses: QUEUE WAITQUEUE-MIXIN

Direct slots:

Class: WAITQUEUE-MIXIN

Waitqueue mixin.

Superclasses: MUTEX-MIXIN

Direct slots:

Macro: WITH-ACCUMULATORS (NAME INITFORM REDUCE-OP) &BODY BODY

This macro sets up an array of accumulators for each worker initialized with initial-element. Within each worker the symbol name can be used for accessing the private accumulator. After the body was executed (probably containing parallel operations), the result array is reduced using reduce-op.

Macro: WITH-ATOMIC-OUTPUT &BODY BODY

If output of a process is desired to be atomic wrap it in with-atomic-output.

Macro: WITH-FEMLISP-WORKERS (WORK) &BODY BODY

This macro distributes work generated in body with calling the locally bound function work-on on some arguments to several working threads which call func on those arguments.

Macro: WITH-MUTEX OBJECT &BODY BODY

Needs to be called unfortunately around push/incf/setf.

Macro: WITH-MUTUAL-EXCLUSION (OBJ) &BODY BODY

Execute body on the waitqueue obj without other threads interfering.

Macro: WITH-WORKERS (WORK &REST KEYWORD-ARGS &KEY &ALLOW-OTHER-KEYS) &BODY BODY

This macro distributes work generated in body with calling the locally bound function work-on on some arguments to several working threads which call func on those arguments.

Function: WORKERS-AVAILABLE-P

Test if parallel sparse algebra is possible in the current context. Note that at the moment, we do not allow nested parallelization.


Next: , Previous: , Up: Reference manual   [Contents][Index]