The petalisp Reference Manual

Table of Contents

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

The petalisp Reference Manual

This is the petalisp Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 17:21:29 2021 GMT+0.


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

1 Introduction

#+TITLE: Petalisp

Petalisp is an attempt to generate high performance code for parallel
computers by JIT-compiling array definitions. It is not a full blown
programming language, but rather a carefully crafted extension of Common
Lisp that allows for extreme optimization and parallelization.

** Getting Started
1. Install Lisp and a suitable IDE.  If unsure, pick [[https://portacle.github.io/][Portacle]].
2. Download Petalisp via [[https://www.quicklisp.org/][Quicklisp]].
3. Check out some of the [[file:examples][examples]].

** Showcases
Petalisp is still under development, so the following examples may still
change slightly. Nevertheless they give a good glimpse on what programming
with Petalisp will be like.

Example 1: transposing a matrix
#+BEGIN_SRC lisp
(defun lazy-transpose (A)
  (lazy-reshape A (tranform m n to n m)))
#+END_SRC

Example 2: matrix-matrix multiplication
#+BEGIN_SRC lisp
(defun matrix-multiplication (A B)
  (lazy-reduce
   #'+
   (lazy #'*
         (lazy-reshape A (transform m n to n m 1))
         (lazy-reshape B (transform n k to n 1 k)))))
#+END_SRC

Example 3: the numerical Jacobi scheme in two dimensions
#+BEGIN_SRC lisp
(defun lazy-jacobi-2d (grid iterations)
  (let ((interior (interior grid)))
    (if (zerop iterations) grid
        (lazy-jacobi-2d
         (lazy-fuse x
               (lazy #'* 0.25
                  (lazy #'+
                     (lazy-reshape x (transform i0 i1 to (+ i0 1) i1) interior)
                     (lazy-reshape x (transform i0 i1 to (- i0 1) i1) interior)
                     (lazy-reshape x (transform i0 i1 to i0 (+ i1 1)) interior)
                     (lazy-reshape x (transform i0 i1 to i0 (- i1 1)) interior))))
         (- iterations 1)))))
#+END_SRC

** Performance

Coming soon!

** Frequently Asked Questions

*** Is Petalisp similar to NumPy?
NumPy is a widely used Python library for scientific computing on arrays.
It provides powerful N-dimensional arrays and a variety of functions for
working with these arrays.

Petalisp works on a more fundamental level.  It provides even more powerful
N-dimensional arrays, but just a few building blocks for working on them -
element-wise function application, reduction, reshaping and array fusion.

So Petalisp is not a substitute for NumPy.  However, it could be used to
write a library that behaves like NumPy, but that is much faster and fully
parallelized.  In fact, writing such a library is one of my future goals.

*** Do I have to program Lisp to use Petalisp?
Not necessarily.  Not everyone has the time to learn Common Lisp.  That is
why I am also working on some [[https://github.com/marcoheisig/petalisp-for-python][convenient Python bindings]] for Petalisp.

But: If you ever have time to learn Lisp, do it!  It is an enlightening
experience.

*** Why is Petalisp licensed under AGPL?
I am aware that this license prevents some people from using or
contributing to this piece of software, which is a shame. But unfortunately
the majority of software developers have not yet understood that

1. In a digital world, free software is a necessary prerequisite for a free
   society.
2. When developing software, open collaboration is way more efficient than
   competition.

So as long as distribution of non-free software is socially accepted,
copyleft licenses like the AGPL seem to be the lesser evil.

That being said, I am willing to discuss relicensing on an individual
basis.

*** Why is Petalisp written in Common Lisp?
I couldn't wish for a better tool for the job. Common Lisp is extremely
rich in features, standardized, fast, safe and mature. The Lisp community
is amazing and there are excellent libraries for almost every imaginable
task.

To illustrate why Lisp is particularly well suited for a project like
Petalisp, consider the following implementation of a JIT-compiler for
mapping a function over a vector of a certain element type:

#+BEGIN_SRC lisp
(defun vector-mapper (element-type)
  (compile nil `(lambda (fn vec)
                  (declare (function fn)
                           (type (simple-array ,element-type (*)) vec)
                           (optimize (speed 3) (safety 0)))
                  (loop for index below (length vec) do
                    (symbol-macrolet ((elt (aref vec index)))
                      (setf elt (funcall fn elt)))))))
#+END_SRC

Not only is this JIT-compiler just 8 lines of code, it is also 20 times
faster than invoking GCC or Clang on a roughly equivalent piece of C code.


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

2 Systems

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


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

2.1 petalisp

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Description

Elegant High Performance Computing

Dependency

petalisp.api (system)

Source

petalisp.asd (file)


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

2.2 petalisp.api

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Description

A Convenient API for Petalisp.

Dependencies
Source

petalisp.api.asd (file)

Components

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

2.3 petalisp.native-backend

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.native-backend.asd (file)

Components

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

2.4 petalisp.scheduler

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.scheduler.asd (file)

Components

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

2.5 petalisp.multicore-backend

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.multicore-backend.asd (file)

Components

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

2.6 petalisp.ir

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.ir.asd (file)

Components

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

2.7 petalisp.core

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.core.asd (file)

Components

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

2.8 petalisp.utilities

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.utilities.asd (file)

Components

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

2.9 petalisp.type-inference

Author

Marco Heisig <marco.heisig@fau.de>

License

AGPLv3

Dependencies
Source

petalisp.type-inference.asd (file)

Components

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

3 Modules

Modules are listed depth-first from the system components tree.


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

3.1 petalisp.type-inference/common-lisp

Dependency

differentiate.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/common-lisp/

Components

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

4 Files

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


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

4.1 Lisp


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

4.1.1 petalisp.asd

Location

petalisp.asd

Systems

petalisp (system)


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

4.1.2 petalisp.api.asd

Location

api/petalisp.api.asd

Systems

petalisp.api (system)


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

4.1.3 petalisp.native-backend.asd

Location

native-backend/petalisp.native-backend.asd

Systems

petalisp.native-backend (system)


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

4.1.4 petalisp.scheduler.asd

Location

scheduler/petalisp.scheduler.asd

Systems

petalisp.scheduler (system)


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

4.1.5 petalisp.multicore-backend.asd

Location

multicore-backend/petalisp.multicore-backend.asd

Systems

petalisp.multicore-backend (system)


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

4.1.6 petalisp.ir.asd

Location

ir/petalisp.ir.asd

Systems

petalisp.ir (system)


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

4.1.7 petalisp.core.asd

Location

core/petalisp.core.asd

Systems

petalisp.core (system)


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

4.1.8 petalisp.utilities.asd

Location

utilities/petalisp.utilities.asd

Systems

petalisp.utilities (system)


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

4.1.9 petalisp.type-inference.asd

Location

type-inference/petalisp.type-inference.asd

Systems

petalisp.type-inference (system)


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

4.1.10 petalisp.api/differentiator.lisp

Dependencies
Parent

petalisp.api (system)

Location

api/differentiator.lisp

Exported Definitions
Internal Definitions

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

4.1.11 petalisp.api/lazy-allreduce.lisp

Dependency

lazy-reduce.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-allreduce.lisp

Exported Definitions

lazy-allreduce (function)


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

4.1.12 petalisp.api/lazy-array-indices.lisp

Dependency

lazy-shape-indices.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-array-indices.lisp

Exported Definitions

lazy-array-indices (function)


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

4.1.13 petalisp.api/lazy-array-interior.lisp

Dependency

shape-interior.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-array-interior.lisp

Exported Definitions

lazy-array-interior (function)


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

4.1.14 petalisp.api/lazy-broadcast.lisp

Dependency

lazy-reshape.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-broadcast.lisp

Exported Definitions
Internal Definitions

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

4.1.15 petalisp.api/lazy-collapse.lisp

Dependency

lazy-reshape.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-collapse.lisp

Exported Definitions

lazy-collapse (function)


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

4.1.16 petalisp.api/lazy-drop-axes.lisp

Dependency

lazy-reshape.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-drop-axes.lisp

Exported Definitions

lazy-drop-axes (function)


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

4.1.17 petalisp.api/lazy-flatten.lisp

Dependency

lazy-reshape.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-flatten.lisp

Exported Definitions

lazy-flatten (function)


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

4.1.18 petalisp.api/lazy.lisp

Dependency

lazy-broadcast.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy.lisp

Exported Definitions

lazy (function)


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

4.1.19 petalisp.api/lazy-multiple-value.lisp

Dependency

lazy-broadcast.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-multiple-value.lisp

Exported Definitions

lazy-multiple-value (function)


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

4.1.20 petalisp.api/lazy-overwrite.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-overwrite.lisp

Exported Definitions

lazy-overwrite (function)


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

4.1.21 petalisp.api/lazy-reduce.lisp

Dependencies
Parent

petalisp.api (system)

Location

api/lazy-reduce.lisp

Exported Definitions

lazy-reduce (function)

Internal Definitions

lazy-reduce-aux (function)


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

4.1.22 petalisp.api/lazy-reshape.lisp

Dependency

shape-syntax.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-reshape.lisp

Exported Definitions

lazy-reshape (function)

Internal Definitions

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

4.1.23 petalisp.api/lazy-shape-indices.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-shape-indices.lisp

Exported Definitions

lazy-shape-indices (function)


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

4.1.24 petalisp.api/lazy-slice.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-slice.lisp

Exported Definitions

lazy-slice (function)


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

4.1.25 petalisp.api/lazy-slices.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/lazy-slices.lisp

Exported Definitions

lazy-slices (function)


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

4.1.26 petalisp.api/lazy-stack.lisp

Dependencies
Parent

petalisp.api (system)

Location

api/lazy-stack.lisp

Exported Definitions

lazy-stack (function)


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

4.1.27 petalisp.api/network.lisp

Dependencies
Parent

petalisp.api (system)

Location

api/network.lisp

Exported Definitions
Internal Definitions

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

4.1.28 petalisp.api/packages.lisp

Parent

petalisp.api (system)

Location

api/packages.lisp

Packages

petalisp.api

Exported Definitions

*backend* (special variable)


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

4.1.29 petalisp.api/prepare.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/prepare.lisp

Exported Definitions

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

4.1.30 petalisp.api/shape-interior.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/shape-interior.lisp

Exported Definitions

shape-interior (function)


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

4.1.31 petalisp.api/shape-syntax.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/shape-syntax.lisp

Exported Definitions
Internal Definitions

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

4.1.32 petalisp.api/transform.lisp

Dependency

packages.lisp (file)

Parent

petalisp.api (system)

Location

api/transform.lisp

Exported Definitions

transform (macro)

Internal Definitions

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

4.1.33 petalisp.api/vectorize.lisp

Dependency

lazy-multiple-value.lisp (file)

Parent

petalisp.api (system)

Location

api/vectorize.lisp

Exported Definitions

vectorize (function)


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

4.1.34 petalisp.api/documentation.lisp

Dependencies
Parent

petalisp.api (system)

Location

api/documentation.lisp


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

4.1.35 petalisp.native-backend/packages.lisp

Parent

petalisp.native-backend (system)

Location

native-backend/packages.lisp

Packages

petalisp.native-backend


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

4.1.36 petalisp.native-backend/worker-pool.lisp

Dependency

packages.lisp (file)

Parent

petalisp.native-backend (system)

Location

native-backend/worker-pool.lisp

Internal Definitions

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

4.1.37 petalisp.native-backend/memory-pool.lisp

Dependency

worker-pool.lisp (file)

Parent

petalisp.native-backend (system)

Location

native-backend/memory-pool.lisp

Internal Definitions

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

4.1.38 petalisp.native-backend/native-backend.lisp

Dependency

memory-pool.lisp (file)

Parent

petalisp.native-backend (system)

Location

native-backend/native-backend.lisp

Exported Definitions
Internal Definitions

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

4.1.39 petalisp.native-backend/execution.lisp

Dependency

native-backend.lisp (file)

Parent

petalisp.native-backend (system)

Location

native-backend/execution.lisp

Exported Definitions
Internal Definitions

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

4.1.40 petalisp.scheduler/packages.lisp

Parent

petalisp.scheduler (system)

Location

scheduler/packages.lisp

Packages

petalisp.scheduler


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

4.1.41 petalisp.scheduler/slice.lisp

Dependency

packages.lisp (file)

Parent

petalisp.scheduler (system)

Location

scheduler/slice.lisp

Internal Definitions

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

4.1.42 petalisp.scheduler/task.lisp

Dependency

slice.lisp (file)

Parent

petalisp.scheduler (system)

Location

scheduler/task.lisp

Exported Definitions
Internal Definitions

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

4.1.43 petalisp.scheduler/scheduler.lisp

Dependency

task.lisp (file)

Parent

petalisp.scheduler (system)

Location

scheduler/scheduler.lisp

Exported Definitions

schedule-on-workers (function)

Internal Definitions

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

4.1.44 petalisp.multicore-backend/packages.lisp

Parent

petalisp.multicore-backend (system)

Location

multicore-backend/packages.lisp

Packages

petalisp.multicore-backend


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

4.1.45 petalisp.multicore-backend/worker-pool.lisp

Dependency

packages.lisp (file)

Parent

petalisp.multicore-backend (system)

Location

multicore-backend/worker-pool.lisp

Internal Definitions

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

4.1.46 petalisp.multicore-backend/allocation-table.lisp

Dependency

worker-pool.lisp (file)

Parent

petalisp.multicore-backend (system)

Location

multicore-backend/allocation-table.lisp

Internal Definitions

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

4.1.47 petalisp.multicore-backend/multicore-backend.lisp

Dependency

allocation-table.lisp (file)

Parent

petalisp.multicore-backend (system)

Location

multicore-backend/multicore-backend.lisp

Exported Definitions
Internal Definitions

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

4.1.48 petalisp.ir/packages.lisp

Parent

petalisp.ir (system)

Location

ir/packages.lisp

Packages

petalisp.ir


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

4.1.49 petalisp.ir/device.lisp

Dependency

packages.lisp (file)

Parent

petalisp.ir (system)

Location

ir/device.lisp

Internal Definitions

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

4.1.50 petalisp.ir/ir.lisp

Dependency

device.lisp (file)

Parent

petalisp.ir (system)

Location

ir/ir.lisp

Exported Definitions
Internal Definitions

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

4.1.51 petalisp.ir/ir-checker.lisp

Dependency

ir.lisp (file)

Parent

petalisp.ir (system)

Location

ir/ir-checker.lisp

Exported Definitions

check-ir (function)

Internal Definitions

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

4.1.52 petalisp.ir/ir-conversion.lisp

Dependency

ir-checker.lisp (file)

Parent

petalisp.ir (system)

Location

ir/ir-conversion.lisp

Exported Definitions

ir-from-lazy-arrays (function)

Internal Definitions

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

4.1.53 petalisp.ir/blueprint.lisp

Dependency

ir-conversion.lisp (file)

Parent

petalisp.ir (system)

Location

ir/blueprint.lisp

Exported Definitions

kernel-blueprint (function)

Internal Definitions

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

4.1.54 petalisp.ir/kernel-interpreter.lisp

Dependency

blueprint.lisp (file)

Parent

petalisp.ir (system)

Location

ir/kernel-interpreter.lisp

Exported Definitions

interpret-kernel (function)


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

4.1.55 petalisp.ir/kernel-compiler.lisp

Dependency

kernel-interpreter.lisp (file)

Parent

petalisp.ir (system)

Location

ir/kernel-compiler.lisp

Exported Definitions
Internal Definitions

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

4.1.56 petalisp.ir/ir-backend.lisp

Dependency

kernel-compiler.lisp (file)

Parent

petalisp.ir (system)

Location

ir/ir-backend.lisp

Exported Definitions
Internal Definitions

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

4.1.57 petalisp.ir/documentation.lisp

Dependency

ir-backend.lisp (file)

Parent

petalisp.ir (system)

Location

ir/documentation.lisp


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

4.1.58 petalisp.core/packages.lisp

Parent

petalisp.core (system)

Location

core/packages.lisp

Packages

petalisp.core


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

4.1.59 petalisp.core/range.lisp

Dependency

packages.lisp (file)

Parent

petalisp.core (system)

Location

core/range.lisp

Exported Definitions
Internal Definitions

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

4.1.60 petalisp.core/shape.lisp

Dependency

range.lisp (file)

Parent

petalisp.core (system)

Location

core/shape.lisp

Exported Definitions
Internal Definitions

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

4.1.61 petalisp.core/transformation.lisp

Dependency

shape.lisp (file)

Parent

petalisp.core (system)

Location

core/transformation.lisp

Exported Definitions
Internal Definitions

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

4.1.62 petalisp.core/transformation-constructors.lisp

Dependency

transformation.lisp (file)

Parent

petalisp.core (system)

Location

core/transformation-constructors.lisp

Exported Definitions
Internal Definitions

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

4.1.63 petalisp.core/lazy-array.lisp

Dependency

transformation-constructors.lisp (file)

Parent

petalisp.core (system)

Location

core/lazy-array.lisp

Exported Definitions
Internal Definitions

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

4.1.64 petalisp.core/lazy-ref.lisp

Dependency

lazy-array.lisp (file)

Parent

petalisp.core (system)

Location

core/lazy-ref.lisp

Exported Definitions
Internal Definitions

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

4.1.65 petalisp.core/lazy-fuse.lisp

Dependency

lazy-ref.lisp (file)

Parent

petalisp.core (system)

Location

core/lazy-fuse.lisp

Exported Definitions

lazy-fuse (function)


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

4.1.66 petalisp.core/lazy-map.lisp

Dependency

lazy-fuse.lisp (file)

Parent

petalisp.core (system)

Location

core/lazy-map.lisp

Exported Definitions

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

4.1.67 petalisp.core/substitute-array.lisp

Dependency

lazy-map.lisp (file)

Parent

petalisp.core (system)

Location

core/substitute-array.lisp

Exported Definitions
Internal Definitions

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

4.1.68 petalisp.core/backend.lisp

Dependency

substitute-array.lisp (file)

Parent

petalisp.core (system)

Location

core/backend.lisp

Exported Definitions
Internal Definitions

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

4.1.69 petalisp.core/reference-backend.lisp

Dependency

backend.lisp (file)

Parent

petalisp.core (system)

Location

core/reference-backend.lisp

Exported Definitions
Internal Definitions

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

4.1.70 petalisp.utilities/packages.lisp

Parent

petalisp.utilities (system)

Location

utilities/packages.lisp

Packages

petalisp.utilities


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

4.1.71 petalisp.utilities/documentation.lisp

Dependency

packages.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/documentation.lisp

Exported Definitions
Internal Definitions

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

4.1.72 petalisp.utilities/defalias.lisp

Dependency

documentation.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/defalias.lisp

Exported Definitions

defalias (macro)

Internal Definitions

ensure-alias (function)


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

4.1.73 petalisp.utilities/queue.lisp

Dependency

defalias.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/queue.lisp

Exported Definitions
Internal Definitions

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

4.1.74 petalisp.utilities/circular-array.lisp

Dependency

queue.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/circular-array.lisp

Internal Definitions

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

4.1.75 petalisp.utilities/wsdeque.lisp

Dependency

circular-array.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/wsdeque.lisp

Exported Definitions
Internal Definitions

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

4.1.76 petalisp.utilities/bitfield.lisp

Dependency

wsdeque.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/bitfield.lisp

Exported Definitions

define-bitfield (macro)

Internal Definitions

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

4.1.77 petalisp.utilities/identical.lisp

Dependency

bitfield.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/identical.lisp

Exported Definitions

identical (function)


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

4.1.78 petalisp.utilities/memoization.lisp

Dependency

identical.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/memoization.lisp

Exported Definitions
Internal Definitions

+empty+ (constant)


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

4.1.79 petalisp.utilities/extended-euclid.lisp

Dependency

memoization.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/extended-euclid.lisp

Exported Definitions

extended-euclid (function)

Internal Definitions

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

4.1.80 petalisp.utilities/prime-factors.lisp

Dependency

extended-euclid.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/prime-factors.lisp

Exported Definitions
Internal Definitions

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

4.1.81 petalisp.utilities/weak-set.lisp

Dependency

prime-factors.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/weak-set.lisp

Exported Definitions
Internal Definitions

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

4.1.82 petalisp.utilities/with-collectors.lisp

Dependency

weak-set.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/with-collectors.lisp

Exported Definitions

with-collectors (macro)

Internal Definitions

with-collector (macro)


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

4.1.83 petalisp.utilities/number-of-cpus.lisp

Dependency

with-collectors.lisp (file)

Parent

petalisp.utilities (system)

Location

utilities/number-of-cpus.lisp

Exported Definitions

number-of-cpus (function)


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

4.1.84 petalisp.type-inference/packages.lisp

Parent

petalisp.type-inference (system)

Location

type-inference/packages.lisp

Packages

petalisp.type-inference


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

4.1.85 petalisp.type-inference/auxiliary-types.lisp

Dependency

packages.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/auxiliary-types.lisp

Exported Definitions
Internal Definitions

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

4.1.86 petalisp.type-inference/function-lambda-lists.lisp

Dependency

auxiliary-types.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/function-lambda-lists.lisp

Exported Definitions

function-arity (function)

Internal Definitions

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

4.1.87 petalisp.type-inference/float-bits.lisp

Dependency

function-lambda-lists.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/float-bits.lisp

Internal Definitions

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

4.1.88 petalisp.type-inference/ntype-1.lisp

Dependency

float-bits.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/ntype-1.lisp

Exported Definitions
Internal Definitions

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

4.1.89 petalisp.type-inference/ntype-2.lisp

Dependency

ntype-1.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/ntype-2.lisp

Exported Definitions
Internal Definitions

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

4.1.90 petalisp.type-inference/ntype-3.lisp

Dependency

ntype-2.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/ntype-3.lisp

Exported Definitions
Internal Definitions

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

4.1.91 petalisp.type-inference/conditions.lisp

Dependency

ntype-3.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/conditions.lisp

Exported Definitions
Internal Definitions

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

4.1.92 petalisp.type-inference/wrap.lisp

Dependency

conditions.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/wrap.lisp

Exported Definitions
Internal Definitions

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

4.1.93 petalisp.type-inference/fndb.lisp

Dependency

wrap.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/fndb.lisp

Internal Definitions

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

4.1.94 petalisp.type-inference/define-specializer.lisp

Dependency

fndb.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/define-specializer.lisp

Exported Definitions
Internal Definitions

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

4.1.95 petalisp.type-inference/define-differentiator.lisp

Dependency

define-specializer.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/define-differentiator.lisp

Exported Definitions

define-differentiator (macro)

Internal Definitions

%define-differentiator (macro)


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

4.1.96 petalisp.type-inference/define-instruction.lisp

Dependency

define-differentiator.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/define-instruction.lisp

Exported Definitions
Internal Definitions

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

4.1.97 petalisp.type-inference/specialize.lisp

Dependency

define-instruction.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/specialize.lisp

Exported Definitions
Internal Definitions

expression-builder (function)


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

4.1.98 petalisp.type-inference/differentiate.lisp

Dependency

specialize.lisp (file)

Parent

petalisp.type-inference (system)

Location

type-inference/differentiate.lisp

Exported Definitions

differentiate (function)

Internal Definitions

diff (function)


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

4.1.99 petalisp.type-inference/common-lisp/auxiliary.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/auxiliary.lisp

Internal Definitions

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

4.1.100 petalisp.type-inference/common-lisp/predicates.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/predicates.lisp

Internal Definitions

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

4.1.101 petalisp.type-inference/common-lisp/type-checks.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/type-checks.lisp

Exported Definitions
Internal Definitions

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

4.1.102 petalisp.type-inference/common-lisp/casts.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/casts.lisp

Exported Definitions
Internal Definitions

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

4.1.103 petalisp.type-inference/common-lisp/data-and-control-flow.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/data-and-control-flow.lisp

Exported Definitions
Internal Definitions

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

4.1.104 petalisp.type-inference/common-lisp/types-and-classes.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/types-and-classes.lisp

Internal Definitions

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

4.1.105 petalisp.type-inference/common-lisp/abs.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/abs.lisp

Exported Definitions
Internal Definitions

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

4.1.106 petalisp.type-inference/common-lisp/add.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/add.lisp

Exported Definitions
Internal Definitions

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

4.1.107 petalisp.type-inference/common-lisp/cmpeq.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/cmpeq.lisp

Exported Definitions
Internal Definitions

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

4.1.108 petalisp.type-inference/common-lisp/cmpneq.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/cmpneq.lisp

Exported Definitions
Internal Definitions

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

4.1.109 petalisp.type-inference/common-lisp/cmpx.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/cmpx.lisp

Exported Definitions
Internal Definitions

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

4.1.110 petalisp.type-inference/common-lisp/complex.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/complex.lisp

Exported Definitions
Internal Definitions

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

4.1.111 petalisp.type-inference/common-lisp/exp.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/exp.lisp

Internal Definitions

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

4.1.112 petalisp.type-inference/common-lisp/log.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/log.lisp

Internal Definitions

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

4.1.113 petalisp.type-inference/common-lisp/cos.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/cos.lisp

Exported Definitions
Internal Definitions

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

4.1.114 petalisp.type-inference/common-lisp/div.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/div.lisp

Exported Definitions
Internal Definitions

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

4.1.115 petalisp.type-inference/common-lisp/max.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/max.lisp

Exported Definitions
Internal Definitions

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

4.1.116 petalisp.type-inference/common-lisp/min.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/min.lisp

Exported Definitions
Internal Definitions

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

4.1.117 petalisp.type-inference/common-lisp/mul.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/mul.lisp

Exported Definitions
Internal Definitions

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

4.1.118 petalisp.type-inference/common-lisp/signum.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/signum.lisp

Internal Definitions

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

4.1.119 petalisp.type-inference/common-lisp/sin.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/sin.lisp

Exported Definitions
Internal Definitions

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

4.1.120 petalisp.type-inference/common-lisp/sub.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/sub.lisp

Exported Definitions
Internal Definitions

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

4.1.121 petalisp.type-inference/common-lisp/sqrt.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/sqrt.lisp

Internal Definitions

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

4.1.122 petalisp.type-inference/common-lisp/tan.lisp

Parent

common-lisp (module)

Location

type-inference/common-lisp/tan.lisp

Exported Definitions
Internal Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 petalisp.api

Source

packages.lisp (file)

Nickname

petalisp

Use List
Exported Definitions
Internal Definitions

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

5.2 petalisp.native-backend

Source

packages.lisp (file)

Use List
Exported Definitions

make-native-backend (function)

Internal Definitions

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

5.3 petalisp.scheduler

Source

packages.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.4 petalisp.multicore-backend

Source

packages.lisp (file)

Use List
Exported Definitions

make-multicore-backend (function)

Internal Definitions

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

5.5 petalisp.ir

Source

packages.lisp (file)

Use List
Used By List

petalisp.native-backend

Exported Definitions
Internal Definitions

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

5.6 petalisp.core

Source

packages.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

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

5.7 petalisp.utilities

Source

packages.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

5.8 petalisp.type-inference

Source

packages.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Constants

Constant: ~

The symbols ~, ~l, ~s and ~r are self-evaluating. Their only purpose is to separate range designators in the functions named ~, ~l, ~s and ~r.

Package

petalisp.api

Source

shape-syntax.lisp (file)

Constant: ~l

The symbols ~, ~l, ~s and ~r are self-evaluating. Their only purpose is to separate range designators in the functions named ~, ~l, ~s and ~r.

Package

petalisp.api

Source

shape-syntax.lisp (file)

Constant: ~r

The symbols ~, ~l, ~s and ~r are self-evaluating. Their only purpose is to separate range designators in the functions named ~, ~l, ~s and ~r.

Package

petalisp.api

Source

shape-syntax.lisp (file)

Constant: ~s

The symbols ~, ~l, ~s and ~r are self-evaluating. Their only purpose is to separate range designators in the functions named ~, ~l, ~s and ~r.

Package

petalisp.api

Source

shape-syntax.lisp (file)


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

6.1.2 Special variables

Special Variable: *backend*
Package

petalisp.core

Source

packages.lisp (file)

Special Variable: *ntypes*
Package

petalisp.type-inference

Source

ntype-1.lisp (file)


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

6.1.3 Macros

Macro: abort-specialization &rest ARGS
Package

petalisp.type-inference

Source

define-specializer.lisp (file)

Macro: check-ntype OBJECT NTYPE
Package

petalisp.type-inference

Source

define-specializer.lisp (file)

Macro: defalias ALIAS THING
Package

petalisp.utilities

Source

defalias.lisp (file)

Macro: define-bitfield NAME &body SLOTS

Defines an efficient collection of booleans and small integers.

For a supplied bitfield name NAME, and for some slot definitions of the form (SLOT-NAME TYPE), this macro defines the following functions:

1. A constructor named MAKE-{NAME}, that takes one keyword argument per SLOT-NAME, similar to the default constructor generated by DEFSTRUCT. It returns a bitfield whose entries have the values indicated by the keyword arguments, or a reasonable default (NIL for booleans, 0 for numbers).

2. A clone operation named CLONE-{NAME}, that takes an existing bitfield and one keyword argument per SLOT-NAME. It returns a copy of the existing bitfield, but where each supplied keyword argument supersedes the value of the corresponding slot.

3. A reader function named {NAME}-{SLOT-NAME} for each slot.

In addition to these functions, NAME is defined as a suitable subtype of (and unsigned-byte fixnum).

Currently this macro supports boolean, unsigned-byte and signed-byte slots.

Example:

(define-bitfield examplebits
(a boolean)
(b boolean)
(c boolean)
(x (signed-byte 5))
(id (unsigned-byte 16)))

(defparameter *a*
(make-examplebits :a nil :b t :id 42))

(list
(examplebits-a *a*)
(examplebits-b *a*)
(examplebits-c *a*)
(examplebits-x *a*)
(examplebits-id *a*))

;; Returns (NIL T NIL 0 42)

(defparameter *b*
(clone-examplebits *a* :c t :x -2))

(list
(examplebits-a *b*)
(examplebits-b *b*)
(examplebits-c *b*)
(examplebits-x *b*)
(examplebits-id *b*))

;; Returns (NIL T T -2 42)

Package

petalisp.utilities

Source

bitfield.lisp (file)

Macro: define-differentiator FUNCTION LAMBDA-LIST INDEX &body BODY
Package

petalisp.type-inference

Source

define-differentiator.lisp (file)

Macro: define-instruction (BASE-NAME INSTRUCTION-NAME) RESULT-TYPES ARGUMENTS &body BODY
Package

petalisp.type-inference

Source

define-instruction.lisp (file)

Macro: define-shape-syntax DELIMITER (TOKENS COLLECT FINISH) CONSTRUCTOR-SYNTAX PATTERN-SYNTAX
Package

petalisp.api

Source

shape-syntax.lisp (file)

Macro: define-simple-instruction (BASE-NAME INSTRUCTION-NAME) RESULT-TYPES ARGUMENT-TYPES
Package

petalisp.type-inference

Source

define-instruction.lisp (file)

Macro: define-specializer FUNCTION LAMBDA-LIST &body BODY
Package

petalisp.type-inference

Source

define-specializer.lisp (file)

Macro: document-compiler-macro NAME &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-compiler-macros NAMES &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-function NAME &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-functions NAMES &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-method-combination NAME &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-method-combinations NAMES &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-setf-expander NAME &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-setf-expanders NAMES &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-structure NAME &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-structures NAMES &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-variable NAME &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: document-variables NAMES &body BODY
Package

petalisp.utilities

Source

documentation.lisp (file)

Macro: ntype-subtypecase NTYPE &body CLAUSES
Package

petalisp.type-inference

Source

ntype-2.lisp (file)

Macro: transform &rest INPUTS-TO-OUTPUTS

Creates a transformation that maps some inputs to the specified outputs. The syntax is (transform INPUT-1 ... INPUT-N to OUTPUT-1 OUTPUT-N).

Each input can either be a variable, an integer, or a list whose first element is a variable and whose second element is a form that evaluates to an integer.

Each output is a form that may reference up to one of the input variables. The result of an output form in a context where the referenced input variable is bound to an integer must be an integer. The mapping form the input to the output must be linear.

Examples:

(transform i to (+ i 1))
=> (transform a to (1+ a))

(transform i to (+ (+ i 1) 5))
=> (transform a to (+ a 6))

(transform 1 2 3 to)
=> (transform 1 2 3 to)

(transform to 1 2 3)
=> (transform to 1 2 3)

(transform i j to j i)
=> (transform a b to b a)

Package

petalisp.api

Source

transform.lisp (file)

Macro: with-backend BACKEND-CREATION-FORM &body BODY
Package

petalisp.core

Source

backend.lisp (file)

Macro: with-collectors COLLECTORS &body BODY

Within the lexical scope of BODY, bind the specified collectors. Each entry in COLLECTORS must be a list of two valid function names - RESULT and GATHER. Each such pair of function names is bound to local functions, with the following behavior:

The function named GATHER takes a single argument, stores this argument in some unspecified way, and returns this argument.

The function named RESULT takes either zero or one object. It returns the list of all objects that have been stored by calls to the function named GATHER. If supplied, the optional argument is used as the tail of the list being returned. Calling the function named RESULT more than once results in undefined behavior.

Examples:

(with-collectors ((odds collect-odd)
(evens collect-even))
(loop for n below 8 do
(if (oddp n)
(collect-odd n)
(collect-even n)))
(values (odds) (evens)))

=> (1 3 5 7)
=> (0 2 4 6)

(with-collectors ((numbers collect-number))
(collect-number 2)
(collect-number 3)
(numbers ’(4 5 6))) ; Here, we explicitly supply a tail.

=> (2 3 4 5 6)

Package

petalisp.utilities

Source

with-collectors.lisp (file)

Macro: with-hash-table-memoization (KEY &key STORE-KEY) HASH-TABLE &body BODY

Memoize the value of BODY. If KEY is found in HASH-TABLE, BODY is not evaluated and the corresponding value is returned. Otherwise, BODY is evaluated and its values are first stored as the HASH-TABLE entry of KEY and then returned.

If the optional form STORE-KEY is supplied, it is evaluated after any evaluation of BODY and its value is used instead of KEY for storing the results. This way, KEY can be an object with dynamic extent (to avoid consing) and STORE-KEY can create a copy with indefinite extent when necessary.

Package

petalisp.utilities

Source

memoization.lisp (file)

Macro: with-memoization (KEY &key TEST STORE-KEY) &body BODY

Memoize the value of BODY. If KEY has the same value (with respect to TEST) as some previously computed key, then BODY is not evaluated and the values of the previous computation are returned.

Note: TEST is evaluated at load time in a null lexical environment and must be a valid hash table test designator.

If the optional form STORE-KEY is supplied, it is evaluated after any evaluation of BODY and its value is used instead of KEY for storing the results. This way, KEY can be an object with dynamic extent (to avoid consing) and STORE-KEY can create a copy with indefinite extent when necessary.

Package

petalisp.utilities

Source

memoization.lisp (file)

Macro: with-multiple-value-hash-table-memoization (KEY &key STORE-KEY) HASH-TABLE &body BODY

Memoize the multiple values of BODY. If KEY is found in HASH-TABLE, BODY is not evaluated and the values of the previous computation are returned. Otherwise, BODY is evaluated and its values are first stored at KEY in HASH-TABLE and then returned.

If the optional form STORE-KEY is supplied, it is evaluated after any evaluation of BODY and its value is used instead of KEY for storing the results. This way, KEY can be an object with dynamic extent (to avoid consing) and STORE-KEY can create a copy with indefinite extent when necessary.

Package

petalisp.utilities

Source

memoization.lisp (file)

Macro: with-multiple-value-memoization (KEY &key TEST STORE-KEY) &body BODY

Memoize the multiple values of BODY. If KEY has the same value (with respect to TEST) as some previously computed key, then BODY is not evaluated and the values of the previous computation are returned.

Note: TEST is evaluated at load time in a null lexical environment and must be a suitable hash table test.

If the optional form STORE-KEY is supplied, it is evaluated after any evaluation of BODY and its value is used instead of KEY for storing the results. This way, KEY can be an object with dynamic extent (to avoid consing) and STORE-KEY can create a copy with indefinite extent when necessary.

Package

petalisp.utilities

Source

memoization.lisp (file)

Macro: with-multiple-value-vector-memoization (KEY &key SIZE GROWTH) &body BODY

Memoize the values of BODY for VAR being a relatively small integer.

Package

petalisp.utilities

Source

memoization.lisp (file)

Macro: with-ntype-caching NTYPES &body BODY
Package

petalisp.type-inference

Source

ntype-2.lisp (file)

Macro: with-vector-memoization (KEY &key SIZE GROWTH) &body BODY

Memoize the value of BODY for KEY being a relatively small integer.

Package

petalisp.utilities

Source

memoization.lisp (file)

Macro: wrap FORM
Package

petalisp.type-inference

Source

wrap.lisp (file)

Macro: wrap-default &rest ARGS
Package

petalisp.type-inference

Source

define-specializer.lisp (file)


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

6.1.4 Compiler macros

Compiler Macro: compose-transformations &rest TRANSFORMATIONS
Package

petalisp.core

Source

transformation.lisp (file)

Compiler Macro: list-ntypes &rest NTYPES
Package

petalisp.type-inference

Source

ntype-3.lisp (file)

Compiler Macro: ntype TYPE-SPECIFIER
Package

petalisp.type-inference

Source

ntype-1.lisp (file)

Compiler Macro: range &rest ARGS
Package

petalisp.core

Source

range.lisp (file)


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

6.1.5 Functions

Function: and-fn A B
Package

petalisp.type-inference

Source

data-and-control-flow.lisp (file)

Function: array-element-ntype ARRAY
Package

petalisp.type-inference

Source

ntype-3.lisp (file)

Function: buffer-data INSTANCE
Function: (setf buffer-data) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-ntype INSTANCE
Function: (setf buffer-ntype) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-number-of-inputs BUFFER
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-number-of-loads BUFFER
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-number-of-outputs BUFFER
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-number-of-stores BUFFER
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-shape INSTANCE
Function: (setf buffer-shape) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-size BUFFER
Package

petalisp.ir

Source

ir.lisp (file)

Function: buffer-storage INSTANCE
Function: (setf buffer-storage) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: bufferp OBJECT
Package

petalisp.ir

Source

ir.lisp (file)

Function: call-instruction-operator INSTANCE
Function: (setf call-instruction-operator) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: call-instruction-p OBJECT
Package

petalisp.ir

Source

ir.lisp (file)

Function: call-network NETWORK &rest PLIST &key &allow-other-keys
Package

petalisp.api

Source

network.lisp (file)

Function: check-ir NODES &key KERNEL-DATA-TYPE BUFFER-DATA-TYPE
Package

petalisp.ir

Source

ir-checker.lisp (file)

Function: clear-shape-table SHAPE-TABLE
Package

petalisp.core

Source

shape.lisp (file)

Function: collapsing-transformation SHAPE
Package

petalisp.core

Source

transformation-constructors.lisp (file)

Function: compile-kernel KERNEL
Package

petalisp.ir

Source

kernel-compiler.lisp (file)

Function: complex-double-float* COMPLEX-DOUBLE-FLOAT0 COMPLEX-DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

mul.lisp (file)

Function: complex-double-float+ COMPLEX-DOUBLE-FLOAT0 COMPLEX-DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

add.lisp (file)

Function: complex-double-float- COMPLEX-DOUBLE-FLOAT0 COMPLEX-DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-double-float-abs COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

abs.lisp (file)

Function: complex-double-float-cos COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

cos.lisp (file)

Function: complex-double-float-from-complex-long-float COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-double-float-from-complex-short-float COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-double-float-from-complex-single-float COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-double-float-from-double-float DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-double-float-imagpart COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-double-float-realpart COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-double-float-sin COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

sin.lisp (file)

Function: complex-double-float-tan COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

tan.lisp (file)

Function: complex-double-float-unary- COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-double-float/ COMPLEX-DOUBLE-FLOAT0 COMPLEX-DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

div.lisp (file)

Function: complex-double-float/= COMPLEX-DOUBLE-FLOAT0 COMPLEX-DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

cmpneq.lisp (file)

Function: complex-double-float= COMPLEX-DOUBLE-FLOAT0 COMPLEX-DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

cmpeq.lisp (file)

Function: complex-long-float* COMPLEX-LONG-FLOAT0 COMPLEX-LONG-FLOAT1
Package

petalisp.type-inference

Source

mul.lisp (file)

Function: complex-long-float+ COMPLEX-LONG-FLOAT0 COMPLEX-LONG-FLOAT1
Package

petalisp.type-inference

Source

add.lisp (file)

Function: complex-long-float- COMPLEX-LONG-FLOAT0 COMPLEX-LONG-FLOAT1
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-long-float-abs COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

abs.lisp (file)

Function: complex-long-float-cos COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

cos.lisp (file)

Function: complex-long-float-from-complex-double-float COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-long-float-from-complex-short-float COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-long-float-from-complex-single-float COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-long-float-from-long-float LONG-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-long-float-imagpart COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-long-float-realpart COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-long-float-sin COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

sin.lisp (file)

Function: complex-long-float-tan COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

tan.lisp (file)

Function: complex-long-float-unary- COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-long-float/ COMPLEX-LONG-FLOAT0 COMPLEX-LONG-FLOAT1
Package

petalisp.type-inference

Source

div.lisp (file)

Function: complex-long-float/= COMPLEX-LONG-FLOAT0 COMPLEX-LONG-FLOAT1
Package

petalisp.type-inference

Source

cmpneq.lisp (file)

Function: complex-long-float= COMPLEX-LONG-FLOAT0 COMPLEX-LONG-FLOAT1
Package

petalisp.type-inference

Source

cmpeq.lisp (file)

Function: complex-short-float* COMPLEX-SHORT-FLOAT0 COMPLEX-SHORT-FLOAT1
Package

petalisp.type-inference

Source

mul.lisp (file)

Function: complex-short-float+ COMPLEX-SHORT-FLOAT0 COMPLEX-SHORT-FLOAT1
Package

petalisp.type-inference

Source

add.lisp (file)

Function: complex-short-float- COMPLEX-SHORT-FLOAT0 COMPLEX-SHORT-FLOAT1
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-short-float-abs COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

abs.lisp (file)

Function: complex-short-float-cos COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

cos.lisp (file)

Function: complex-short-float-from-complex-double-float COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-short-float-from-complex-long-float COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-short-float-from-complex-single-float COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-short-float-from-short-float SHORT-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-short-float-imagpart COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-short-float-realpart COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-short-float-sin COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

sin.lisp (file)

Function: complex-short-float-tan COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

tan.lisp (file)

Function: complex-short-float-unary- COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-short-float/ COMPLEX-SHORT-FLOAT0 COMPLEX-SHORT-FLOAT1
Package

petalisp.type-inference

Source

div.lisp (file)

Function: complex-short-float/= COMPLEX-SHORT-FLOAT0 COMPLEX-SHORT-FLOAT1
Package

petalisp.type-inference

Source

cmpneq.lisp (file)

Function: complex-short-float= COMPLEX-SHORT-FLOAT0 COMPLEX-SHORT-FLOAT1
Package

petalisp.type-inference

Source

cmpeq.lisp (file)

Function: complex-single-float* COMPLEX-SINGLE-FLOAT0 COMPLEX-SINGLE-FLOAT1
Package

petalisp.type-inference

Source

mul.lisp (file)

Function: complex-single-float+ COMPLEX-SINGLE-FLOAT0 COMPLEX-SINGLE-FLOAT1
Package

petalisp.type-inference

Source

add.lisp (file)

Function: complex-single-float- COMPLEX-SINGLE-FLOAT0 COMPLEX-SINGLE-FLOAT1
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-single-float-abs COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

abs.lisp (file)

Function: complex-single-float-cos COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

cos.lisp (file)

Function: complex-single-float-from-complex-double-float COMPLEX-DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-single-float-from-complex-long-float COMPLEX-LONG-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-single-float-from-complex-short-float COMPLEX-SHORT-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-single-float-from-single-float SINGLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: complex-single-float-imagpart COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-single-float-realpart COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: complex-single-float-sin COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

sin.lisp (file)

Function: complex-single-float-tan COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

tan.lisp (file)

Function: complex-single-float-unary- COMPLEX-SINGLE-FLOAT0
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: complex-single-float/ COMPLEX-SINGLE-FLOAT0 COMPLEX-SINGLE-FLOAT1
Package

petalisp.type-inference

Source

div.lisp (file)

Function: complex-single-float/= COMPLEX-SINGLE-FLOAT0 COMPLEX-SINGLE-FLOAT1
Package

petalisp.type-inference

Source

cmpneq.lisp (file)

Function: complex-single-float= COMPLEX-SINGLE-FLOAT0 COMPLEX-SINGLE-FLOAT1
Package

petalisp.type-inference

Source

cmpeq.lisp (file)

Function: compose-transformations TRANSFORMATION &rest MORE-TRANSFORMATIONS

Returns a single transformation that is equivalent to consecutive invocations of the supplied transformations in right-to-left order.

Examples:

(compose-transformations (transform i to (* 2 (1+ i))) (transform i to (1- (/ i 2))))
=> (transform a to a)

(compose-transformations (transform i j to (+ i 5) (+ j 7)) (transform i j to (* j 2) (* i 3))) => (transform a b to (+ (* 2 b) 5) (+ (* 3 a) 7))

Package

petalisp.core

Source

transformation.lisp (file)

Function: compute &rest ARRAYS

Returns, as multiple values, the computed result of each supplied argument.

The computed result of an array or lazy array with rank zero is the one element contained in this array. The computed result of any other array or lazy array is an array with the same rank and dimensions. The computed result of any other object is that object itself.

Examples:

(compute (lazy #’+ 2 #(3 4)))
=> #(5 6)

(compute (lazy-reshape #2A((1 2) (3 4)) (transform i j to j i)))
=> #2A((1 3) (2 4))

(compute 2 #0A3 #(4))
=> 2
=> 3
=> #(4)

Package

petalisp.core

Source

backend.lisp (file)

Function: compute-list-of-arrays ARRAYS

Returns a list of computed results - one for each element in the list of supplied arrays.

The computed result of an array or lazy array with rank zero is the one element contained in this array. The computed result of any other array or lazy array is an array with the same rank and dimensions. The computed result of any other object is that object itself.

Examples:

(compute-list-of-arrays (list (lazy #’+ 2 #(3 4))))
=> (#(5 6))

(compute-list-of-arrays
(list (lazy-reshape #2A((1 2) (3 4)) (transform i j to j i))))
=> (#2A((1 3) (2 4)))

(compute-list-of-arrays (list 2 #0A3 #(4)))
=> (2 3 #(4))

Package

petalisp.core

Source

backend.lisp (file)

Function: copy-arrays ARRAYS
Package

petalisp.core

Source

substitute-array.lisp (file)

Function: differentiate FUNCTION WRAPPERS WRAPPER-NTYPE WRAP-CONSTANT WRAP-FUNCTION INDEX
Package

petalisp.type-inference

Source

differentiate.lisp (file)

Function: differentiator OUTPUTS GRADIENTS

Returns a function that, for each node in a network whose roots are the supplied OUTPUTS will return the gradient at that node.

GRADIENTS must be a sequence of the same length as OUTPUTS, and whose elements are either arrays with or symbols that will be used as the name of such a parameter.

Package

petalisp.api

Source

differentiator.lisp (file)

Function: double-float* DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

mul.lisp (file)

Function: double-float+ DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

add.lisp (file)

Function: double-float- DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: double-float-abs DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

abs.lisp (file)

Function: double-float-cis DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: double-float-complex DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

complex.lisp (file)

Function: double-float-cos DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

cos.lisp (file)

Function: double-float-from-long-float LONG-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: double-float-from-short-float SHORT-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: double-float-from-single-float SINGLE-FLOAT0
Package

petalisp.type-inference

Source

casts.lisp (file)

Function: double-float-max DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

max.lisp (file)

Function: double-float-min DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

min.lisp (file)

Function: double-float-sin DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

sin.lisp (file)

Function: double-float-tan DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

tan.lisp (file)

Function: double-float-unary- DOUBLE-FLOAT0
Package

petalisp.type-inference

Source

sub.lisp (file)

Function: double-float/ DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

div.lisp (file)

Function: double-float/= DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

cmpneq.lisp (file)

Function: double-float< DOUBLE-FLOAT352 DOUBLE-FLOAT353
Package

petalisp.type-inference

Source

cmpx.lisp (file)

Function: double-float<= DOUBLE-FLOAT276 DOUBLE-FLOAT277
Package

petalisp.type-inference

Source

cmpx.lisp (file)

Function: double-float= DOUBLE-FLOAT0 DOUBLE-FLOAT1
Package

petalisp.type-inference

Source

cmpeq.lisp (file)

Function: double-float> DOUBLE-FLOAT256 DOUBLE-FLOAT257
Package

petalisp.type-inference

Source

cmpx.lisp (file)

Function: double-float>= DOUBLE-FLOAT276 DOUBLE-FLOAT277
Package

petalisp.type-inference

Source

cmpx.lisp (file)

Function: empty-array ()
Package

petalisp.core

Source

lazy-array.lisp (file)

Function: empty-arrays N
Package

petalisp.core

Source

lazy-array.lisp (file)

Function: empty-ntype-p NTYPE
Package

petalisp.type-inference

Source

ntype-3.lisp (file)

Function: empty-range-p OBJECT
Package

petalisp.core

Source

range.lisp (file)

Function: empty-shape-p OBJECT
Package

petalisp.core

Source

shape.lisp (file)

Function: enlarge-shape SHAPE RANGE

For a given shape S and range R, this function returns a shape whose first range is R, and whose remaining ranges are those of S.

Examples:

(enlarge-shape (~) (range 1 10))
=> (~ 1 10)

(enlarge-shape (~ 1 3) (range 1 4))
=> (~ 1 4 ~ 1 3)

Package

petalisp.core

Source

shape.lisp (file)

Function: eql-ntype-p NTYPE
Package

petalisp.type-inference

Source

ntype-3.lisp (file)

Function: extended-euclid U V

Given nonnegative integers u and v, return the values u1 and u3 such that u*u1 + v*u2 = u3 = gcd(u,v).

Package

petalisp.utilities

Source

extended-euclid.lisp (file)

Function: function-arity FUNCTION
Package

petalisp.type-inference

Source

function-lambda-lists.lisp (file)

Function: fuse-ranges &rest RANGES
Package

petalisp.core

Source

range.lisp (file)

Function: fuse-shapes SHAPE &rest MORE-SHAPES
Package

petalisp.core

Source

shape.lisp (file)

Function: generalize-ntype NTYPE
Package

petalisp.type-inference

Source

ntype-2.lisp (file)

Function: give-up-specialization ()
Package

petalisp.type-inference

Source

conditions.lisp (file)

Function: identical SEQUENCE &key TEST KEY

Check whether the KEYs of SEQUENCE are identical with respect to TEST.

Package

petalisp.utilities

Source

identical.lisp (file)

Function: identity-transformation RANK

Returns an identity transformation of the specified rank.

Package

petalisp.core

Source

transformation-constructors.lisp (file)

Function: identity-transformation-p OBJECT
Package

petalisp.core

Source

transformation.lisp (file)

Function: infer-ntypes FUNCTION NTYPES DEFAULT
Package

petalisp.type-inference

Source

specialize.lisp (file)

Function: instruction-inputs INSTANCE
Function: (setf instruction-inputs) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: instruction-number INSTANCE
Function: (setf instruction-number) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: instruction-transformation INSTANCE
Function: (setf instruction-transformation) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: instructionp OBJECT
Package

petalisp.ir

Source

ir.lisp (file)

Function: interior-buffer-p BUFFER
Package

petalisp.ir

Source

ir.lisp (file)

Function: interpret-kernel KERNEL ITERATION-SPACE
Package

petalisp.ir

Source

kernel-interpreter.lisp (file)

Function: ir-from-lazy-arrays LAZY-ARRAYS &key KERNEL-SIZE-THRESHOLD

Returns a list of buffers that form the root of an IR data flow graph that is equivalent to the data flow graph specified by the supplied LAZY-ARRAYS.

An IR graph is consists of alternating buffers and kernels. Each kernel reads and writes from zero or more buffers and writes to zero and more buffers. The behavior or each kernel is described by a directed acyclic graph of instructions.

Package

petalisp.ir

Source

ir-conversion.lisp (file)

Function: iref-instruction-p OBJECT
Package

petalisp.ir

Source

ir.lisp (file)

Function: iterating-instruction-p OBJECT
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-blueprint KERNEL
Package

petalisp.ir

Source

blueprint.lisp (file)

Function: kernel-buffers KERNEL
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-cost KERNEL
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-data INSTANCE
Function: (setf kernel-data) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-instruction-vector INSTANCE
Function: (setf kernel-instruction-vector) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-iteration-space INSTANCE
Function: (setf kernel-iteration-space) VALUE INSTANCE
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-number-of-inputs KERNEL
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-number-of-loads KERNEL
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-number-of-outputs KERNEL
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernel-number-of-stores KERNEL
Package

petalisp.ir

Source

ir.lisp (file)

Function: kernelp OBJECT
Package

petalisp.ir

Source

ir.lisp (file)

Function: lazy FUNCTION &rest ARRAYS

Returns one or more lazy arrays, whose contents are the values returned by the supplied function when applied element-wise to the contents of the remaining argument arrays. If the arguments don’t agree in shape, they are first broadcast with the function BROADCAST-ARRAY