The cl-parallel Reference Manual

This is the cl-parallel Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:33:19 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 cl-parallel

A fairly simple parallelism library for Common Lisp

Author

Tom Hulihan

License

MIT

Version

0.1.1

Dependency

bordeaux-threads (system).

Source

cl-parallel.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 cl-parallel/cl-parallel.asd

Source

cl-parallel.asd.

Parent Component

cl-parallel (system).

ASDF Systems

cl-parallel.


2.1.2 cl-parallel/src/package.lisp

Source

cl-parallel.asd.

Parent Component

cl-parallel (system).

Packages

parallel.


2.1.3 cl-parallel/src/future.lisp

Dependency

src/package.lisp (file).

Source

cl-parallel.asd.

Parent Component

cl-parallel (system).

Public Interface

2.1.4 cl-parallel/src/list.lisp

Dependencies
Source

cl-parallel.asd.

Parent Component

cl-parallel (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 parallel

Source

src/package.lisp.

Use List
  • bordeaux-threads.
  • common-lisp.
Public Interface
Internals

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Macros

Macro: future (&rest body)

This macro essentially creates a new future type – a computation that happens seperately from the rest of the program, and may or may not be finished

Package

parallel.

Source

src/future.lisp.

Macro: par-calls (&rest calls)

Make multiple calls in parallel.

Package

parallel.

Source

src/list.lisp.


4.1.2 Ordinary functions

Function: future-finished-p (f)

Return true iff the argument is a live thread

Package

parallel.

Source

src/future.lisp.

Function: future-p (f)

Test whether or not a value is a future.

Package

parallel.

Source

src/future.lisp.

Function: par-every (pred xs &key max-threads sleep-time)

Given a predicate and a list, will determine if every element of the list satisfies that predicate.

Package

parallel.

Source

src/list.lisp.

Function: par-find (item xs &key max-threads from-end)

Given an item and a list, will return that item if it is found, nil otherwise.

Package

parallel.

Source

src/list.lisp.

Function: par-find-if (pred xs &key max-threads key from-end)

Given a predicate and a list, will return the first element in the list that satisfies that predicate.

Package

parallel.

Source

src/list.lisp.

Function: par-map (f xs &key max-threads sleep-time)

This function computes a function upon a list in parallel.

Package

parallel.

Source

src/list.lisp.

Function: par-map-chunked (f xs &key chunk-size max-threads sleep-time)

Break a list up into ‘size‘ chunks, and process those chunks in parallel.

Package

parallel.

Source

src/list.lisp.

Function: par-map-reduce (map-fn reduce-fn xs &key max-threads sleep-time initial-value)

Given a mapping function, reducing function, and list, will map the values accross the list in parallel, then reduce them in the order that the computations finish.

Package

parallel.

Source

src/list.lisp.

Function: par-some (pred xs &key max-threads sleep-time)

Given a predicate and a list, return true if at least one element in the list satifies the predicate.

Package

parallel.

Source

src/list.lisp.

Function: realize (f)

Force a future to be evaluated, or return nil if the value is not a future.

Package

parallel.

Source

src/future.lisp.

Function: realize-if-finished (f)

If the future is finished, return the value; if the future is still running, return the future; if the value is not a future, return it.

Package

parallel.

Source

src/future.lisp.


4.2 Internals


4.2.1 Macros

Macro: with-sequential-thread-queue (lst (to-do running) &key max-threads done down up)
Package

parallel.

Source

src/list.lisp.

Macro: with-thread-queue (lst (in out) &key max-threads sleep-time done down up)
Package

parallel.

Source

src/list.lisp.


4.2.2 Ordinary functions

Function: partition-if (pred xs)

Given a predicate and a list, will return a list with the first element being all of the elements that satisfy the predicate, and the second element being all of the elements that do not satisfy the predicate.

Package

parallel.

Source

src/list.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions


A.3 Variables