The simple-parallel-tasks Reference Manual

Table of Contents

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 3.0 "Montgomery Scott" on Mon Dec 02 11:20:04 2019 GMT+0.


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

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.

* 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


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

2 Systems

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


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

2.1 simple-parallel-tasks

Author

Guillaume Le Vaillant

License

GPL-3

Description

Evaluate forms in parallel

Version

1.0

Dependency

chanl

Source

simple-parallel-tasks.asd (file)

Component

simple-parallel-tasks.lisp (file)


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

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


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

3.1.1 simple-parallel-tasks.asd

Location

simple-parallel-tasks.asd

Systems

simple-parallel-tasks (system)


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

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

Parent

simple-parallel-tasks (system)

Location

simple-parallel-tasks.lisp

Packages

simple-parallel-tasks

Exported Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 simple-parallel-tasks

Source

simple-parallel-tasks.lisp (file)

Use List
Exported Definitions

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

5 Definitions

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


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

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

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 (file)

Macro: plist &rest FORMS

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

Package

simple-parallel-tasks

Source

simple-parallel-tasks.lisp (file)

Macro: pvalues &rest FORMS

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

Package

simple-parallel-tasks

Source

simple-parallel-tasks.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, simple-parallel-tasks.asd: The simple-parallel-tasks․asd file
File, Lisp, simple-parallel-tasks/simple-parallel-tasks.lisp: The simple-parallel-tasks/simple-parallel-tasks․lisp file

L
Lisp File, simple-parallel-tasks.asd: The simple-parallel-tasks․asd file
Lisp File, simple-parallel-tasks/simple-parallel-tasks.lisp: The simple-parallel-tasks/simple-parallel-tasks․lisp file

S
simple-parallel-tasks.asd: The simple-parallel-tasks․asd file
simple-parallel-tasks/simple-parallel-tasks.lisp: The simple-parallel-tasks/simple-parallel-tasks․lisp file

Jump to:   F   L   S  

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

A.2 Functions

Jump to:   M   P  
Index Entry  Section

M
Macro, plet: Exported macros
Macro, plist: Exported macros
Macro, pvalues: Exported macros

P
plet: Exported macros
plist: Exported macros
pvalues: Exported macros

Jump to:   M   P  

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

A.3 Variables


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

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, simple-parallel-tasks: The simple-parallel-tasks package

S
simple-parallel-tasks: The simple-parallel-tasks system
simple-parallel-tasks: The simple-parallel-tasks package
System, simple-parallel-tasks: The simple-parallel-tasks system

Jump to:   P   S