The simple-parallel-tasks Reference Manual

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

The simple-parallel-tasks Reference Manual

This is the simple-parallel-tasks Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 05:49:13 2022 GMT+0.

Table of Contents


1 Introduction

#+TITLE: simple-parallel-tasks

This is a simple Common Lisp library to evaluate some forms in parallel.

* Installation

/simple-parallel-tasks/ requires the /chanl/ library.

** With Quicklisp

#+BEGIN_SRC lisp
(ql:quickload "simple-parallel-tasks")
#+END_SRC

** With ASDF

Put the directories of /simple-parallel-tasks/ and the dependencies where
/ASDF/ can find them and use:

#+BEGIN_SRC lisp
(asdf:load-system "simple-parallel-tasks")
#+END_SRC

* API

#+BEGIN_SRC lisp
(defmacro plist (&rest forms))
#+END_SRC

Evaluate /forms/ in parallel and return the results in a list.

#+BEGIN_SRC lisp
(defmacro pvalues (&rest forms))
#+END_SRC

Evaluate /forms/ in parallel and return the results as multiple values.

#+BEGIN_SRC lisp
(defmacro plet (bindings &body body))
#+END_SRC

Like /let/, but the /bindings/ are evaluated in parallel.

#+BEGIN_SRC lisp
(defmacro pprog1 (first-form &body forms))
#+END_SRC

Evaluate /first-form/ and /forms/ in parallel and return the result of the
evaluation of /first-form/.

#+BEGIN_SRC lisp
(defmacro pprogn (&rest forms))
#+END_SRC

Evaluate /forms/ in parallel and return the result of the evaluation of the
last form.

* Examples

#+BEGIN_SRC lisp
(time (simple-parallel-tasks:plist 1 (+ 4 5) (sleep 2) 8 (sleep 1) (/ 3 5)))

Evaluation took:
  2.004 seconds of real time

(1 9 NIL 8 NIL 3/5)
#+END_SRC

#+BEGIN_SRC lisp
(time (simple-parallel-tasks:pvalues 1 (+ 4 5) (sleep 2) 8 (sleep 1) (/ 3 5)))

Evaluation took:
  2.007 seconds of real time

1
9
NIL
8
NIL
3/5
#+END_SRC

#+BEGIN_SRC lisp
(time (simple-parallel-tasks:plet ((x (sleep 2))
                                   (y (+ 3 4))
                                   a
                                   (b (sleep 3))
                                   (z (floor 12 5)))
        (list x y a b z)))

Evaluation took:
  3.0000 seconds of real time

(NIL 7 NIL NIL 2)
#+END_SRC

* Tests

The tests require the /fiveam/ library.

#+BEGIN_SRC lisp
(asdf:test-system "simple-parallel-tasks")
#+END_SRC


2 Systems

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


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

2.1 simple-parallel-tasks

Evaluate forms in parallel

Author

Guillaume Le Vaillant

License

GPL-3

Version

1.0

Dependency

chanl (system).

Source

simple-parallel-tasks.asd.

Child Component

simple-parallel-tasks.lisp (file).


3 Files

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


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

3.1 Lisp


3.1.1 simple-parallel-tasks/simple-parallel-tasks.asd

Source

simple-parallel-tasks.asd.

Parent Component

simple-parallel-tasks (system).

ASDF Systems

simple-parallel-tasks.


3.1.2 simple-parallel-tasks/simple-parallel-tasks.lisp

Source

simple-parallel-tasks.asd.

Parent Component

simple-parallel-tasks (system).

Packages

simple-parallel-tasks.

Public Interface

4 Packages

Packages are listed by definition order.


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

4.1 simple-parallel-tasks

Source

simple-parallel-tasks.lisp.

Use List
  • chanl.
  • common-lisp.
Public Interface

5 Definitions

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


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

5.1 Public Interface


5.1.1 Macros

Macro: plet (bindings &body body)

Like LET, but the BINDINGS are evaluated in parallel.

Package

simple-parallel-tasks.

Source

simple-parallel-tasks.lisp.

Macro: plist (&rest forms)

Evaluate FORMS in parallel and return the results in a list.

Package

simple-parallel-tasks.

Source

simple-parallel-tasks.lisp.

Macro: pprog1 (first-form &body forms)

Evaluate FIRST-FORM and FORMS in parallel and return the result of the evaluation of FIRST-FORM.

Package

simple-parallel-tasks.

Source

simple-parallel-tasks.lisp.

Macro: pprogn (&rest forms)

Evaluate FORMS in parallel and return the result of the evaluation of the last form.

Package

simple-parallel-tasks.

Source

simple-parallel-tasks.lisp.

Macro: pvalues (&rest forms)

Evaluate FORMS in parallel and return the results as multiple values.

Package

simple-parallel-tasks.

Source

simple-parallel-tasks.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.3 Variables