The cl-parallel Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

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 Thu Sep 15 04:02:59 2022 GMT+0.

Table of Contents


1 Systems

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


Previous: , Up: Systems   [Contents][Index]

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.


Previous: , Up: Files   [Contents][Index]

2.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

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.


Previous: , Up: Packages   [Contents][Index]

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.


Next: , Previous: , Up: Definitions   [Contents][Index]

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.


Previous: , Up: Public Interface   [Contents][Index]

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


Next: , Previous: , Up: Internals   [Contents][Index]

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.


Previous: , Up: Internals   [Contents][Index]

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


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   M   P   R   W  
Index Entry  Section

F
Function, future-finished-p: Public ordinary functions
Function, future-p: Public ordinary functions
Function, par-every: Public ordinary functions
Function, par-find: Public ordinary functions
Function, par-find-if: Public ordinary functions
Function, par-map: Public ordinary functions
Function, par-map-chunked: Public ordinary functions
Function, par-map-reduce: Public ordinary functions
Function, par-some: Public ordinary functions
Function, partition-if: Private ordinary functions
Function, realize: Public ordinary functions
Function, realize-if-finished: Public ordinary functions
future: Public macros
future-finished-p: Public ordinary functions
future-p: Public ordinary functions

M
Macro, future: Public macros
Macro, par-calls: Public macros
Macro, with-sequential-thread-queue: Private macros
Macro, with-thread-queue: Private macros

P
par-calls: Public macros
par-every: Public ordinary functions
par-find: Public ordinary functions
par-find-if: Public ordinary functions
par-map: Public ordinary functions
par-map-chunked: Public ordinary functions
par-map-reduce: Public ordinary functions
par-some: Public ordinary functions
partition-if: Private ordinary functions

R
realize: Public ordinary functions
realize-if-finished: Public ordinary functions

W
with-sequential-thread-queue: Private macros
with-thread-queue: Private macros

Jump to:   F   M   P   R   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables