petalisp

API Reference

petalisp

Elegant High Performance Computing

No packages.

petalisp.api

A Convenient API for Petalisp.

PETALISP.API

  • Function ?* (f z x &optional axis)

Also exports

  • PETALISP.CORE:RANGE-START-STEP-END
  • PETALISP.CORE:TRANSFORMATION-INVERTIBLEP
  • PETALISP.CORE:IMMEDIATEP
  • PETALISP.CORE:SHRINK-SHAPE
  • PETALISP.CORE:?
  • PETALISP.CORE:SHAPEP
  • PETALISP.CORE:TRANSFORM
  • PETALISP.REFERENCE-BACKEND:MAKE-REFERENCE-BACKEND
  • PETALISP.CORE:RANGEP
  • PETALISP.CORE:SHAPE-EQUAL
  • PETALISP.CORE:LAZY-ARRAY
  • PETALISP.CORE:*BACKEND*
  • PETALISP.CORE:APPLICATION
  • PETALISP.NATIVE-BACKEND:MAKE-NATIVE-BACKEND
  • PETALISP.CORE:REDUCTION
  • PETALISP.CORE:COMPUTE
  • PETALISP.CORE:FUSE
  • PETALISP.CORE:RANGE-EQUAL
  • PETALISP.CORE:SIZE-ONE-RANGE-P
  • PETALISP.CORE:MAP-RANGE
  • PETALISP.CORE:SHAPE-INTERSECTIONP
  • PETALISP.CORE:COLLAPSING-TRANSFORMATION
  • PETALISP.CORE:MAKE-RANGE-IMMEDIATE
  • PETALISP.CORE:MAP-TRANSFORMATION-OUTPUTS
  • PETALISP.CORE:TOTAL-SIZE
  • PETALISP.CORE:INPUT
  • PETALISP.CORE:REFCOUNT
  • PETALISP.CORE:SHAPE-CONTAINS
  • PETALISP.CORE:SHAPE-DIFFERENCE-LIST
  • PETALISP.CORE:LISP-DATUM-FROM-IMMEDIATE
  • PETALISP.CORE:STORAGE
  • PETALISP.CORE:BROADCAST-LIST-OF-ARRAYS
  • PETALISP.CORE:LAZY-ARRAY-P
  • PETALISP.CORE:RANGE-INTERSECTION
  • PETALISP.CORE:RESHAPE
  • PETALISP.CORE:EMPTY-ARRAY-P
  • PETALISP.CORE:RANGE
  • PETALISP.CORE:FUSE*
  • PETALISP.CORE:TRANSFORMATION
  • PETALISP.CORE:?*
  • PETALISP.CORE:ARRAY-IMMEDIATE
  • PETALISP.CORE:MAKE-SHAPE
  • PETALISP.CORE:RANGE-DIFFERENCE-LIST
  • PETALISP.CORE:SHAPE-RANGES
  • PETALISP.CORE:OPERATOR
  • PETALISP.CORE:RANGE-SIZE
  • PETALISP.CORE:RANGE-IMMEDIATE
  • PETALISP.CORE:BROADCAST
  • PETALISP.CORE:SHAPE-INTERSECTION
  • PETALISP.CORE:VALUE-N
  • PETALISP.CORE:COERCE-TO-LAZY-ARRAY
  • PETALISP.CORE:IDENTITY-TRANSFORMATION
  • PETALISP.CORE:BROADCAST-ARRAYS
  • PETALISP.CORE:SHAPE-RANK
  • PETALISP.CORE:IDENTITY-TRANSFORMATION-P
  • PETALISP.CORE:SHAPE-SIZE
  • PETALISP.CORE:FUSION
  • PETALISP.CORE:TRANSFORMATIONP
  • PETALISP.CORE:~
  • PETALISP.CORE:TRANSFORMATION-EQUAL
  • PETALISP.CORE:SPLIT-RANGE
  • PETALISP.CORE:INVERT-TRANSFORMATION
  • PETALISP.CORE:RANGE-END
  • PETALISP.CORE:RANGE-START
  • PETALISP.CORE:RANGE-STEP
  • PETALISP.CORE:COMPOSE-TRANSFORMATIONS
  • PETALISP.CORE:MAP-SHAPE
  • PETALISP.CORE:INDICES
  • PETALISP.CORE:RANK
  • PETALISP.CORE:ENLARGE-TRANSFORMATION
  • PETALISP.CORE:MAKE-TRANSFORMATION
  • PETALISP.CORE:?
  • PETALISP.CORE:RANGE-INTERSECTIONP
  • PETALISP.CORE:ELEMENT-TYPE
  • PETALISP.CORE:SHAPE
  • PETALISP.CORE:INPUTS
  • PETALISP.CORE:RANGE-CONTAINS
  • PETALISP.CORE:SCHEDULE
  • PETALISP.IR-BACKEND:MAKE-IR-BACKEND
  • PETALISP.CORE:SUBDIVISION
  • PETALISP.CORE:ENLARGE-SHAPE
  • PETALISP.CORE:?
  • PETALISP.CORE:IMMEDIATE
  • PETALISP.CORE:REFERENCE

petalisp.core

PETALISP.CORE

  • Struct RANGE
    START
    STEP
    SIZE
  • Function RANGEP (object)
  • Function RANGE-START (instance)
  • Function RANGE-STEP (instance)
  • Function RANGE-SIZE (instance)
  • Function RANGE-END (range)
  • Function RANGE-START-STEP-END (range)
  • Function SPLIT-RANGE (range)
  • Function RANGE (start &optional (step-or-end 1 two-args-p) (end start three-args-p))
  • Function SIZE-ONE-RANGE-P (range)
  • Function MAP-RANGE (function range)
  • Function RANGE-CONTAINS (range integer)
  • Function RANGE-EQUAL (range-1 range-2)
  • Function RANGE-DIFFERENCE-LIST (range-1 range-2)
  • Function RANGE-INTERSECTION (range-1 range-2)
  • Function RANGE-INTERSECTIONP (range-1 range-2)
  • Type RANK
  • Struct SHAPE
    RANK
    RANGES
  • Function SHAPEP (object)
  • Function SHAPE-RANK (instance)
  • Function SHAPE-RANGES (instance)
  • Function MAKE-SHAPE (ranges)
  • Function SHAPE-SIZE (shape)
  • Function SHAPE-EQUAL (shape-1 shape-2)
  • Function SHAPE-DIFFERENCE-LIST (shape-1 shape-2)
  • Function SHAPE-INTERSECTION (shape-1 shape-2)
  • Function SHAPE-INTERSECTIONP (shape-1 shape-2)
  • Function MAP-SHAPE (function shape)
  • Function SHAPE-CONTAINS (shape index)
  • Function SHRINK-SHAPE (shape)
  • Function ENLARGE-SHAPE (shape range)
  • Function SUBDIVISION (shapes)
  • Variable ~
    'petalisp.core:~
  • Function ~ (&rest tilde-separated-range-designators)
  • Struct TRANSFORMATION
    INPUT-RANK
    OUTPUT-RANK
  • Function TRANSFORMATIONP (object)
  • Function TRANSFORMATION-INPUT-RANK (instance)
  • Function TRANSFORMATION-OUTPUT-RANK (instance)
  • Struct IDENTITY-TRANSFORMATION
    No slots.
  • Function IDENTITY-TRANSFORMATION-P (object)
  • Function TRANSFORMATION-INVERTIBLEP (transformation)
  • Generic-Function TRANSFORMATION-EQUAL (transformation-1 transformation-2)
  • Generic-Function INVERT-TRANSFORMATION (transformation)
  • Generic-Function MAP-TRANSFORMATION-OUTPUTS (function transformation &key from-end)
  • Generic-Function ENLARGE-TRANSFORMATION (transformation scale offset)
  • Generic-Function TRANSFORM (object transformation)
  • Generic-Function TRANSFORM-AXIS (axis transformation)
  • Method TRANSFORMATION-EQUAL ((t1 transformation) (t2 transformation))
  • Method TRANSFORMATION-EQUAL ((t1 identity-transformation) (t2 identity-transformation))
  • Method TRANSFORMATION-EQUAL ((t1 hairy-transformation) (t2 hairy-transformation))
  • Method INVERT-TRANSFORMATION ((transformation hairy-transformation))
  • Method MAP-TRANSFORMATION-OUTPUTS ((function function) (transformation identity-transformation) &key from-end)
  • Method MAP-TRANSFORMATION-OUTPUTS ((function function) (transformation hairy-transformation) &key from-end)
  • Method ENLARGE-TRANSFORMATION ((transformation identity-transformation) (scale (eql 1)) (offset (eql 0)))
  • Method ENLARGE-TRANSFORMATION ((transformation identity-transformation) (scale rational) (offset rational))
  • Method ENLARGE-TRANSFORMATION ((transformation hairy-transformation) (scaling rational) (offset rational))
  • Method TRANSFORM ((sequence sequence) (transformation transformation))
  • Method TRANSFORM ((sequence sequence) (transformation hairy-transformation))
  • Method TRANSFORM ((list list) (transformation hairy-transformation))
  • Method TRANSFORM ((shape shape) (transformation transformation))
  • Method TRANSFORM ((shape shape) (transformation hairy-transformation))
  • Method TRANSFORM ((shape shape) (transformation hairy-transformation))
  • Method TRANSFORM-AXIS ((axis integer) (transformation transformation))
  • Method TRANSFORM-AXIS ((axis integer) (hairy-transformation hairy-transformation))
  • Function COMPOSE-TRANSFORMATIONS (transformation &rest more-transformations)
  • Function IDENTITY-TRANSFORMATION (rank)
  • Function MAKE-TRANSFORMATION (&key (input-rank nil input-rank-supplied-p) (output-rank nil output-rank-supplied-p) (input-mask nil input-mask-supplied-p) (output-mask nil output-mask-supplied-p) (scalings nil scalings-supplied-p) (offsets nil offsets-supplied-p))
  • Macro ? (input-forms output-forms)
  • Function COLLAPSING-TRANSFORMATION (shape)
  • Function NORMALIZING-TRANSFORMATION (shape)
  • Generic-Function LAZY-ARRAY-P (object)
  • Generic-Function EMPTY-ARRAY-P (object)
  • Generic-Function IMMEDIATEP (object)
  • Generic-Function REUSABLEP (object)
  • Generic-Function TOTAL-SIZE (array)
  • Generic-Function ELEMENT-NTYPE (array)
  • Generic-Function ELEMENT-TYPE (array)
  • Generic-Function SHAPE (array)
  • Generic-Function INPUTS (array)
  • Generic-Function VALUE-N (array)
  • Generic-Function STORAGE (array)
  • Generic-Function OPERATOR (array)
  • Generic-Function REFCOUNT (array)
  • Generic-Function COERCE-TO-LAZY-ARRAY (array)
  • Generic-Function REPLACE-LAZY-ARRAY (lazy-array replacement)
  • Class LAZY-ARRAY
    %COMPUTABLE   Accessor: %COMPUTABLEP   Reader: COMPUTABLEP
  • Class IMMEDIATE  (LAZY-ARRAY)
    No slots.
  • Class NON-IMMEDIATE  (LAZY-ARRAY)
    %INPUTS   Reader: INPUTS
  • Class EMPTY-ARRAY  (IMMEDIATE)
    No slots.
  • Class NON-EMPTY-ARRAY  (LAZY-ARRAY)
    %SHAPE   Reader: SHAPE, SHAPE
    %NTYPE   Reader: ELEMENT-NTYPE
  • Class NON-EMPTY-IMMEDIATE  (NON-EMPTY-ARRAY, IMMEDIATE)
    No slots.
  • Class NON-EMPTY-NON-IMMEDIATE  (NON-EMPTY-ARRAY, NON-IMMEDIATE)
    %REFCOUNT   Accessor: %REFCOUNT   Reader: REFCOUNT
  • Class ARRAY-IMMEDIATE  (NON-EMPTY-IMMEDIATE)
    %REUSABLEP   Reader: REUSABLEP
    %STORAGE   Reader: STORAGE
  • Class RANGE-IMMEDIATE  (NON-EMPTY-IMMEDIATE)
    No slots.
  • Class APPLICATION  (NON-EMPTY-NON-IMMEDIATE)
    %OPERATOR   Reader: OPERATOR
    %VALUE-N   Reader: VALUE-N
  • Class REDUCTION  (NON-EMPTY-NON-IMMEDIATE)
    %OPERATOR   Reader: OPERATOR
    %VALUE-N   Reader: VALUE-N
  • Class FUSION  (NON-EMPTY-NON-IMMEDIATE)
    No slots.
  • Class REFERENCE  (NON-EMPTY-NON-IMMEDIATE)
    %TRANSFORMATION   Reader: TRANSFORMATION
  • Method COERCE-TO-LAZY-ARRAY ((array array))
  • Method COERCE-TO-LAZY-ARRAY ((object t))
  • Method REPLACE-LAZY-ARRAY ((instance reference) (replacement reference))
  • Method REPLACE-LAZY-ARRAY ((instance lazy-array) (replacement reference))
  • Method REPLACE-LAZY-ARRAY ((instance lazy-array) (replacement array-immediate))
  • Method REPLACE-LAZY-ARRAY ((instance lazy-array) (replacement range-immediate))
  • Method LAZY-ARRAY-P ((object t))
  • Method EMPTY-ARRAY-P ((object t))
  • Method EMPTY-ARRAY-P ((array array))
  • Method IMMEDIATEP ((object t))
  • Method TOTAL-SIZE ((array array))
  • Method TOTAL-SIZE ((non-empty-array non-empty-array))
  • Method ELEMENT-TYPE ((object t))
  • Method ELEMENT-NTYPE ((object t))
  • Method ELEMENT-NTYPE ((array array))
  • Method ELEMENT-NTYPE ((empty-array empty-array))
  • Method SHAPE ((object t))
  • Method SHAPE ((array array))
  • Method SHAPE ((empty-array empty-array))
  • Method RANK ((array array))
  • Method RANK ((lazy-array lazy-array))
  • Method RANK ((shape shape))
  • Method INPUTS ((object t))
  • Function INPUT (object)
  • Method TRANSFORM ((lazy-array lazy-array) (transformation transformation))
  • Function MAKE-ARRAY-IMMEDIATE (array &optional reusablep)
  • Function MAKE-RANGE-IMMEDIATE (range)
  • Function INDICES (array-or-shape &optional (axis 0))
  • Function EMPTY-ARRAY
  • Generic-Function MAKE-REFERENCE (input shape transformation)
  • Method MAKE-REFERENCE ((reference reference) (shape shape) (transformation transformation))
  • Method MAKE-REFERENCE ((lazy-array lazy-array) (shape shape) (identity-transformation identity-transformation))
  • Method MAKE-REFERENCE ((lazy-array lazy-array) (null null) (transformation transformation))
  • Method MAKE-REFERENCE ((lazy-array lazy-array) (shape shape) (transformation transformation))
  • Method MAKE-REFERENCE ((lazy-array lazy-array) (shape shape) (transformation transformation))
  • Function BROADCAST (array shape)
  • Function BROADCAST-ARRAYS (&rest arrays)
  • Function BROADCAST-LIST-OF-ARRAYS (list-of-arrays)
  • Function RESHAPE (array &rest modifiers)
  • Function FUSE (&rest inputs)
  • Function FUSE* (&rest inputs)
  • Function ? (function &rest arrays)
  • Function ?* (n-values function &rest arrays)
  • Function ? (function &rest arrays)
  • Variable *BACKEND*
  • Generic-Function COMPUTE-ON-BACKEND (lazy-arrays backend)
  • Generic-Function SCHEDULE-ON-BACKEND (lazy-arrays backend)
  • Generic-Function COMPUTE-IMMEDIATES (lazy-arrays backend)
  • Generic-Function LISP-DATUM-FROM-IMMEDIATE (lazy-array)
  • Generic-Function DELETE-BACKEND (backend)
  • Class BACKEND
    No slots.
  • Class ASYNCHRONOUS-BACKEND  (BACKEND)
    %SCHEDULER-QUEUE   Reader: SCHEDULER-QUEUE
    %SCHEDULER-THREAD   Accessor: SCHEDULER-THREAD
  • Method COMPUTE-ON-BACKEND ((lazy-arrays list) (backend t))
  • Method SCHEDULE-ON-BACKEND ((lazy-arrays list) (backend t))
  • Method COMPUTE-ON-BACKEND ((lazy-arrays list) (backend backend))
  • Method SCHEDULE-ON-BACKEND ((lazy-arrays list) (backend backend))
  • Method SCHEDULE-ON-BACKEND ((lazy-arrays list) (asynchronous-backend asynchronous-backend))
  • Method LISP-DATUM-FROM-IMMEDIATE ((array-immediate array-immediate))
  • Method LISP-DATUM-FROM-IMMEDIATE ((range-immediate range-immediate))
  • Method DELETE-BACKEND ((backend backend))
  • Method DELETE-BACKEND ((asynchronous-backend asynchronous-backend))
  • Function COMPUTE (&rest arguments)
  • Function SCHEDULE (&rest arguments)
  • Generic-Function DEVICEP (device)
  • Generic-Function DEVICE-NAME (device)
  • Generic-Function DEVICE-NUMBER-OF-WORKERS (device)
  • Generic-Function DEVICE-MEMORY-SIZE (device)
  • Generic-Function COMPILE-BLUEPRINT (blueprint device)
  • Generic-Function ALLOCATE-BUFFER (buffer device)
  • Generic-Function DEALLOCATE-BUFFER (buffer)
  • Generic-Function MOVE-BUFFER (buffer from-device to-device)
  • Class DEVICE
    %NAME   Reader: DEVICE-NAME
    %WORKERS   Reader: DEVICE-NUMBER-OF-WORKERS
    %MEMORY-SIZE   Reader: DEVICE-MEMORY-SIZE
  • Method DEVICEP (object)
  • Class NETWORK-INPUT  (ABSTRACT-IMMEDIATE)
    %NAME   Reader: NETWORK-INPUT-NAME
  • Generic-Function NETWORK-INPUT-P (object)
  • Method NETWORK-INPUT-P ((object t))
  • Method NETWORK-INPUT-P ((object t))
  • Method NETWORK-INPUT-P ((object t))
  • Function MAKE-NETWORK-INPUT (shape &key element-type (name (gensym)))
  • Class NETWORK
    %INPUTS   Reader: NETWORK-INPUTS
    %OUTPUTS   Reader: NETWORK-OUTPUTS
    %COMPILE-CACHE   Accessor: NETWORK-COMPILE-CACHE
  • Function MAKE-NETWORK (&key inputs outputs)
  • Function GRADIENT-NETWORK (network)

petalisp.examples

A collection of Petalisp usage examples.

PETALISP.EXAMPLES.ITERATIVE-METHODS

  • Function JACOBI (u f h &optional (iterations 1))
    Iteratively solve the Poisson equation -?u = f for a given uniform grid with spacing h, using the Jacobi scheme.
  • Function RBGS (u f h &optional (iterations 1))
    Iteratively solve the Poisson equation -?u = f for a given uniform grid with spacing h, using the Red-Black Gauss-Seidel scheme.
  • Function PROLONGATE (u)
  • Function RESTRICT (u)
  • Function V-CYCLE (u f h v1 v2)

PETALISP.EXAMPLES.LINEAR-ALGEBRA

  • Type MATRIX
  • Type SQUARE-MATRIX
  • Function ZEROS (m &optional (n m))
  • Function EYE (m &optional (n m))
  • Function TRANSPOSE (x)
  • Function DOT (x y)
  • Function NORM (x)
  • Function ASUM (x)
  • Function MAX* (x)
  • Function MATMUL (a b)
  • Function LU (a)

PETALISP.EXAMPLES.IMAGE-PROCESSING

No exported symbols.

petalisp.graphviz

Graphviz visualization of Petalisp data structures.

PETALISP.GRAPHVIZ

  • Variable *GRAPHVIZ-DEFAULT-VIEWER*
    (flet ((petalisp.graphviz::program-in-path-p (petalisp.graphviz::program)
             (multiple-value-bind
                 (petalisp.graphviz::out petalisp.graphviz::err
                  petalisp.graphviz::exit-code)
                 (uiop/run-program:run-program
                  (list "which" petalisp.graphviz::program) :ignore-error-status t)
               (declare (ignore petalisp.graphviz::out petalisp.graphviz::err))
               (zerop petalisp.graphviz::exit-code))))
      (find-if #'petalisp.graphviz::program-in-path-p '("okular" "evince" "xpdf")))
  • Variable *GRAPHVIZ-DEFAULT-FORMAT*
    :pdf
  • Function VIEW (graph-root &key (format *graphviz-default-format*) (viewer *graphviz-default-viewer*) (graph (graphviz-default-graph graph-root)))

petalisp.ir

PETALISP.IR

  • Struct BUFFER
    SHAPE
    NTYPE
    INPUTS
    OUTPUTS
    EXECUTEDP
    REUSABLEP
    DEVICE
    STORAGE
  • Function BUFFERP (object)
  • Function BUFFER-SHAPE (instance)
  • Function (setf BUFFER-SHAPE) (value instance)
  • Function BUFFER-NTYPE (instance)
  • Function (setf BUFFER-NTYPE) (value instance)
  • Function BUFFER-INPUTS (instance)
  • Function (setf BUFFER-INPUTS) (value instance)
  • Function BUFFER-OUTPUTS (instance)
  • Function (setf BUFFER-OUTPUTS) (value instance)
  • Function BUFFER-EXECUTEDP (instance)
  • Function (setf BUFFER-EXECUTEDP) (value instance)
  • Function BUFFER-REUSABLEP (instance)
  • Function (setf BUFFER-REUSABLEP) (value instance)
  • Function BUFFER-STORAGE (instance)
  • Function (setf BUFFER-STORAGE) (value instance)
  • Function MAKE-BUFFER (lazy-array)
  • Struct KERNEL
    ITERATION-SPACE
    LOAD-INSTRUCTIONS
    STORE-INSTRUCTIONS
    EXECUTEDP
  • Function KERNELP (object)
  • Function KERNEL-ITERATION-SPACE (instance)
  • Function (setf KERNEL-ITERATION-SPACE) (value instance)
  • Function KERNEL-EXECUTEDP (instance)
  • Function (setf KERNEL-EXECUTEDP) (value instance)
  • Function MAKE-KERNEL (&key ((iteration-space iteration-space) nil) ((load-instructions load-instructions) nil) ((store-instructions store-instructions) nil) ((executedp executedp) nil))
  • Function KERNEL-REDUCTION-RANGE (kernel)
  • Function KERNEL-COST (kernel)
  • Struct INSTRUCTION
    NUMBER
    INPUTS
  • Function INSTRUCTIONP (object)
  • Function INSTRUCTION-NUMBER (instance)
  • Function (setf INSTRUCTION-NUMBER) (value instance)
  • Function INSTRUCTION-INPUTS (instance)
  • Function (setf INSTRUCTION-INPUTS) (value instance)
  • Struct CALL-INSTRUCTION
    OPERATOR
  • Function CALL-INSTRUCTION-P (object)
  • Function CALL-INSTRUCTION-OPERATOR (instance)
  • Function (setf CALL-INSTRUCTION-OPERATOR) (value instance)
  • Struct ITERATING-INSTRUCTION
    TRANSFORMATION
  • Function ITERATING-INSTRUCTION-P (object)
  • Function INSTRUCTION-TRANSFORMATION (instance)
  • Function (setf INSTRUCTION-TRANSFORMATION) (value instance)
  • Struct IREF-INSTRUCTION
    No slots.
  • Function IREF-INSTRUCTION-P (object)
  • Struct LOAD-INSTRUCTION
    BUFFER
  • Function LOAD-INSTRUCTION-P (object)
  • Function LOAD-INSTRUCTION-BUFFER (instance)
  • Function (setf LOAD-INSTRUCTION-BUFFER) (value instance)
  • Struct STORE-INSTRUCTION
    BUFFER
  • Function STORE-INSTRUCTION-P (object)
  • Function STORE-INSTRUCTION-BUFFER (instance)
  • Function (setf STORE-INSTRUCTION-BUFFER) (value instance)
  • Struct REDUCE-INSTRUCTION
    OPERATOR
  • Function REDUCE-INSTRUCTION-P (object)
  • Function REDUCE-INSTRUCTION-OPERATOR (instance)
  • Function (setf REDUCE-INSTRUCTION-OPERATOR) (value instance)
  • Function MAP-BUFFER-INPUTS (function buffer)
  • Function MAP-BUFFER-OUTPUTS (function buffer)
  • Function MAP-KERNEL-STORE-INSTRUCTIONS (function kernel)
  • Function MAP-KERNEL-LOAD-INSTRUCTIONS (function kernel)
  • Function MAP-KERNEL-INPUTS (function kernel)
  • Function MAP-KERNEL-OUTPUTS (function kernel)
  • Function MAP-INSTRUCTION-INPUTS (function instruction)
  • Function MAP-BUFFERS-AND-KERNELS (buffer-fn kernel-fn root-buffers)
  • Function MAP-BUFFERS (function root-buffers)
  • Function MAP-KERNELS (function root-buffers)
  • Function MAP-INSTRUCTIONS (function kernel)
  • Function KERNEL-NUMBER-OF-LOADS (kernel)
  • Function KERNEL-NUMBER-OF-STORES (kernel)
  • Function KERNEL-HIGHEST-INSTRUCTION-NUMBER (kernel)
  • Function KERNEL-BUFFERS (kernel)
  • Function ASSIGN-INSTRUCTION-NUMBERS (kernel)
  • Function NORMALIZE-IR (root-buffers)
  • Function IR-FROM-LAZY-ARRAYS (lazy-arrays)
  • Function KERNEL-BLUEPRINT (kernel)
  • Function PARSE-KERNEL-BLUEPRINT (blueprint)

petalisp.scheduler

PETALISP.SCHEDULER

  • Struct TASK
    KERNEL
    WORKERS
  • Function TASK-KERNEL (instance)
  • Function (setf TASK-KERNEL) (value instance)
  • Function TASK-WORKERS (instance)
  • Function (setf TASK-WORKERS) (value instance)
  • Function TASKS-FROM-SLICE (slice workers)
  • Function SCHEDULE-ON-WORKERS (lazy-arrays n-workers enqueue-tasks barrier allocate deallocate)

petalisp.test-suite

A comprehensive test suite for Petalisp.

PETALISP.TEST-SUITE

  • Macro DEFINE-TEST (name &body body)
    Define a test function and add it to *TESTS*.
  • Macro IS (test-form)
    Assert that TEST-FORM evaluates to true.
  • Macro SIGNALS (condition &body body)
    Assert that `body' signals a condition of type `condition'.
  • Function ALL-TESTS
  • Function CHECK-PACKAGE (package &key skip)
  • Function RUN-TESTS (&rest tests)
  • Function MAKE-TESTING-BACKEND

petalisp.type-inference

PETALISP.TYPE-INFERENCE

  • Type FUNCTION-NAME
  • Type FUNCTION-DESIGNATOR
  • Type CHARACTER-DESIGNATOR
  • Type STRING-DESIGNATOR
  • Type PACKAGE-DESIGNATOR
  • Type RADIX
  • Type CHARACTER-CODE
  • Type ARITY
  • Type BYTE-SPECIFIER
  • Type COMPLEX-SHORT-FLOAT
  • Type COMPLEX-SINGLE-FLOAT
  • Type COMPLEX-DOUBLE-FLOAT
  • Type COMPLEX-LONG-FLOAT
  • Type GENERALIZED-BOOLEAN
  • Type MULTIPLE-VALUE-COUNT
  • Type TYPE-SPECIFIER
  • Function FUNCTION-ARITY (function)
  • Struct NTYPE
    TYPE-SPECIFIER
    ID
  • Function NTYPE (type-specifier)
  • Function TYPE-SPECIFIER (ntype)
  • Function NTYPE-OF (object)
  • Function GENERALIZE-NTYPE (ntype)
  • Macro WITH-NTYPE-CACHING (ntypes &body body)
  • Macro NTYPE-SUBTYPECASE (ntype &body clauses &environment env)
  • Function ARRAY-ELEMENT-NTYPE (array)
  • Function MAKE-RANK-ZERO-ARRAY (value)
  • Function NTYPE= (ntype-1 ntype-2)
  • Function EMPTY-NTYPE-P (ntype)
  • Function UNIVERSAL-NTYPE-P (ntype)
  • Function EQL-NTYPE-P (ntype)
  • Function NTYPE-UNION (&rest ntypes)
  • Function NTYPE-SUBTYPEP (ntype-1 ntype-2)
  • Function NTYPE-SUBTYPEPC1 (ntype-1 ntype-2)
  • Function LIST-NTYPES (&rest ntypes)
    Behaves just like LIST, but avoids consing in some cases.
  • Condition GIVE-UP-SPECIALIZATION  (CONDITION)
  • Function GIVE-UP-SPECIALIZATION
  • Function WRAPPER-NTYPE (wrapper)
  • Function WRAP-CONSTANT (constant)
  • Function WRAP-FUNCTION (ntypes function arguments)
  • Macro WRAP (form)
  • Macro DEFINE-SPECIALIZER (function lambda-list &body body)
  • Macro CHECK-NTYPE (object ntype)
  • Macro ABORT-SPECIALIZATION
  • Macro WRAP-DEFAULT
  • Macro DEFINE-DIFFERENTIATOR (function lambda-list index &body body)
  • Macro DEFINE-INSTRUCTION ((base-name instruction-name) result-types arguments &body body)
  • Macro DEFINE-SIMPLE-INSTRUCTION ((base-name instruction-name) result-types argument-types)
  • Function SPECIALIZE (function wrappers wrapper-ntype wrap-constant wrap-function default)
    Traverses a decomposition of FUNCTION into successive calls to more specialized functions, using the supplied wrapping functions. Returns the values returned by PROCESS-MULTIPLE-VALUE-FUNCTION. Arguments: FUNCTION - A function designator, or the name of a special operator. ARGUMENTS - A list of wrapped objects. WRAPPER-NTYPE - A function that is applied to obtain the ntype of a wrapped object. WRAP-CONSTANT - A function that is applied to turn a constant into a wrapped object. WRAP-FUNCTION - A function that is invoked with a first argument that is a list of ntypes of length K, a second argument that is a function designator, and a list of wrapped objects. It must return K wrapped objects - one for each ntype. DEFAULT - A thunk that is executed to produce a default value when the supplied FUNCTION and WRAPPERS are too complicated for specialization. May signal an error of type WRONG-NUMBER-OF-ARGUMENTS or INVALID-ARGUMENTS when the number or type of the supplied WRAPPERS is not suitable for the supplied FUNCTION.
  • Function INFER-NTYPES (function ntypes default)
  • Function DIFFERENTIATE (function wrappers wrapper-ntype wrap-constant wrap-function index)
  • Function THE-NUMBER (object)
  • Function THE-REAL (object)
  • Function THE-RATIONAL (object)
  • Function THE-INTEGER (object)
  • Function THE-FLOAT (object)
  • Function THE-SHORT-FLOAT (object)
  • Function THE-SINGLE-FLOAT (object)
  • Function THE-DOUBLE-FLOAT (object)
  • Function THE-LONG-FLOAT (object)
  • Function THE-COMPLEX (object)
  • Function THE-COMPLEX-SHORT-FLOAT (object)
  • Function THE-COMPLEX-SINGLE-FLOAT (object)
  • Function THE-COMPLEX-DOUBLE-FLOAT (object)
  • Function THE-COMPLEX-LONG-FLOAT (object)
  • Function THE-FUNCTION (object)
  • Function THE-CHARACTER (object)
  • Function THE-SYMBOL (object)
  • Function SHORT-FLOAT-FROM-SINGLE-FLOAT (single-float18)
  • Function SHORT-FLOAT-FROM-DOUBLE-FLOAT (double-float155)
  • Function SHORT-FLOAT-FROM-LONG-FLOAT (long-float260)
  • Function SINGLE-FLOAT-FROM-SHORT-FLOAT (short-float539)
  • Function SINGLE-FLOAT-FROM-DOUBLE-FLOAT (double-float644)
  • Function SINGLE-FLOAT-FROM-LONG-FLOAT (long-float749)
  • Function DOUBLE-FLOAT-FROM-SHORT-FLOAT (short-float1028)
  • Function DOUBLE-FLOAT-FROM-SINGLE-FLOAT (single-float1133)
  • Function DOUBLE-FLOAT-FROM-LONG-FLOAT (long-float1238)
  • Function LONG-FLOAT-FROM-SHORT-FLOAT (short-float1517)
  • Function LONG-FLOAT-FROM-SINGLE-FLOAT (single-float1622)
  • Function LONG-FLOAT-FROM-DOUBLE-FLOAT (double-float1727)
  • Function COMPLEX-SHORT-FLOAT-FROM-SHORT-FLOAT (short-float1992)
  • Function COMPLEX-SHORT-FLOAT-FROM-COMPLEX-SINGLE-FLOAT (complex-single-float2101)
  • Function COMPLEX-SHORT-FLOAT-FROM-COMPLEX-DOUBLE-FLOAT (complex-double-float2210)
  • Function COMPLEX-SHORT-FLOAT-FROM-COMPLEX-LONG-FLOAT (complex-long-float2319)
  • Function COMPLEX-SINGLE-FLOAT-FROM-SINGLE-FLOAT (single-float2590)
  • Function COMPLEX-SINGLE-FLOAT-FROM-COMPLEX-SHORT-FLOAT (complex-short-float2699)
  • Function COMPLEX-SINGLE-FLOAT-FROM-COMPLEX-DOUBLE-FLOAT (complex-double-float2808)
  • Function COMPLEX-SINGLE-FLOAT-FROM-COMPLEX-LONG-FLOAT (complex-long-float2917)
  • Function COMPLEX-DOUBLE-FLOAT-FROM-DOUBLE-FLOAT (double-float3188)
  • Function COMPLEX-DOUBLE-FLOAT-FROM-COMPLEX-SHORT-FLOAT (complex-short-float3297)
  • Function COMPLEX-DOUBLE-FLOAT-FROM-COMPLEX-SINGLE-FLOAT (complex-single-float3406)
  • Function COMPLEX-DOUBLE-FLOAT-FROM-COMPLEX-LONG-FLOAT (complex-long-float3515)
  • Function COMPLEX-LONG-FLOAT-FROM-LONG-FLOAT (long-float3786)
  • Function COMPLEX-LONG-FLOAT-FROM-COMPLEX-SHORT-FLOAT (complex-short-float3895)
  • Function COMPLEX-LONG-FLOAT-FROM-COMPLEX-SINGLE-FLOAT (complex-single-float4004)
  • Function COMPLEX-LONG-FLOAT-FROM-COMPLEX-DOUBLE-FLOAT (complex-double-float4113)
  • Function AND-FN (a b)
  • Function OR-FN (a b)
  • Function PROG2-FN (a b)
  • Function SHORT-FLOAT-ABS (short-float131)
  • Function SINGLE-FLOAT-ABS (single-float241)
  • Function DOUBLE-FLOAT-ABS (double-float351)
  • Function LONG-FLOAT-ABS (long-float461)
  • Function COMPLEX-SHORT-FLOAT-ABS (complex-short-float571)
  • Function COMPLEX-SINGLE-FLOAT-ABS (complex-single-float681)
  • Function COMPLEX-DOUBLE-FLOAT-ABS (complex-double-float791)
  • Function COMPLEX-LONG-FLOAT-ABS (complex-long-float901)
  • Function SHORT-FLOAT+ (short-float172 short-float173)
  • Function SINGLE-FLOAT+ (single-float347 single-float348)
  • Function DOUBLE-FLOAT+ (double-float522 double-float523)
  • Function LONG-FLOAT+ (long-float697 long-float698)
  • Function COMPLEX-SHORT-FLOAT+ (complex-short-float872 complex-short-float873)
  • Function COMPLEX-SINGLE-FLOAT+ (complex-single-float1047 complex-single-float1048)
  • Function COMPLEX-DOUBLE-FLOAT+ (complex-double-float1222 complex-double-float1223)
  • Function COMPLEX-LONG-FLOAT+ (complex-long-float1397 complex-long-float1398)
  • Function SHORT-FLOAT= (short-float0 short-float1)
  • Function SINGLE-FLOAT= (single-float204 single-float205)
  • Function DOUBLE-FLOAT= (double-float376 double-float377)
  • Function LONG-FLOAT= (long-float548 long-float549)
  • Function COMPLEX-SHORT-FLOAT= (complex-short-float720 complex-short-float721)
  • Function COMPLEX-SINGLE-FLOAT= (complex-single-float892 complex-single-float893)
  • Function COMPLEX-DOUBLE-FLOAT= (complex-double-float1064 complex-double-float1065)
  • Function COMPLEX-LONG-FLOAT= (complex-long-float1236 complex-long-float1237)
  • Function SHORT-FLOAT/= (short-float0 short-float1)
  • Function SINGLE-FLOAT/= (single-float204 single-float205)
  • Function DOUBLE-FLOAT/= (double-float376 double-float377)
  • Function LONG-FLOAT/= (long-float548 long-float549)
  • Function COMPLEX-SHORT-FLOAT/= (complex-short-float720 complex-short-float721)
  • Function COMPLEX-SINGLE-FLOAT/= (complex-single-float892 complex-single-float893)
  • Function COMPLEX-DOUBLE-FLOAT/= (complex-double-float1064 complex-double-float1065)
  • Function COMPLEX-LONG-FLOAT/= (complex-long-float1236 complex-long-float1237)
  • Function SHORT-FLOAT< (short-float97 short-float98)
  • Function SINGLE-FLOAT< (single-float301 single-float302)
  • Function DOUBLE-FLOAT< (double-float473 double-float474)
  • Function LONG-FLOAT< (long-float645 long-float646)
  • Function SHORT-FLOAT> (short-float908 short-float909)
  • Function SINGLE-FLOAT> (single-float1080 single-float1081)
  • Function DOUBLE-FLOAT> (double-float1252 double-float1253)
  • Function LONG-FLOAT> (long-float1424 long-float1425)
  • Function SHORT-FLOAT<= (short-float1687 short-float1688)
  • Function SINGLE-FLOAT<= (single-float1873 single-float1874)
  • Function DOUBLE-FLOAT<= (double-float2059 double-float2060)
  • Function LONG-FLOAT<= (long-float2245 long-float2246)
  • Function SHORT-FLOAT>= (short-float2522 short-float2523)
  • Function SINGLE-FLOAT>= (single-float2708 single-float2709)
  • Function DOUBLE-FLOAT>= (double-float2894 double-float2895)
  • Function LONG-FLOAT>= (long-float3080 long-float3081)
  • Function SHORT-FLOAT-COMPLEX (short-float0 short-float1)
  • Function SINGLE-FLOAT-COMPLEX (single-float207 single-float208)
  • Function DOUBLE-FLOAT-COMPLEX (double-float382 double-float383)
  • Function LONG-FLOAT-COMPLEX (long-float557 long-float558)
  • Function COMPLEX-SHORT-FLOAT-REALPART (complex-short-float1063)
  • Function COMPLEX-SINGLE-FLOAT-REALPART (complex-single-float1171)
  • Function COMPLEX-DOUBLE-FLOAT-REALPART (complex-double-float1279)
  • Function COMPLEX-LONG-FLOAT-REALPART (complex-long-float1387)
  • Function COMPLEX-SHORT-FLOAT-IMAGPART (complex-short-float1651)
  • Function COMPLEX-SINGLE-FLOAT-IMAGPART (complex-single-float1759)
  • Function COMPLEX-DOUBLE-FLOAT-IMAGPART (complex-double-float1867)
  • Function COMPLEX-LONG-FLOAT-IMAGPART (complex-long-float1975)
  • Function SHORT-FLOAT-CIS (short-float2400)
  • Function SINGLE-FLOAT-CIS (single-float2508)
  • Function DOUBLE-FLOAT-CIS (double-float2616)
  • Function LONG-FLOAT-CIS (long-float2724)
  • Function SHORT-FLOAT-COS (short-float126)
  • Function SINGLE-FLOAT-COS (single-float234)
  • Function DOUBLE-FLOAT-COS (double-float342)
  • Function LONG-FLOAT-COS (long-float450)
  • Function COMPLEX-SHORT-FLOAT-COS (complex-short-float558)
  • Function COMPLEX-SINGLE-FLOAT-COS (complex-single-float666)
  • Function COMPLEX-DOUBLE-FLOAT-COS (complex-double-float774)
  • Function COMPLEX-LONG-FLOAT-COS (complex-long-float882)
  • Function SHORT-FLOAT/ (short-float0 short-float1)
  • Function SINGLE-FLOAT/ (single-float207 single-float208)
  • Function DOUBLE-FLOAT/ (double-float382 double-float383)
  • Function LONG-FLOAT/ (long-float557 long-float558)
  • Function COMPLEX-SHORT-FLOAT/ (complex-short-float732 complex-short-float733)
  • Function COMPLEX-SINGLE-FLOAT/ (complex-single-float907 complex-single-float908)
  • Function COMPLEX-DOUBLE-FLOAT/ (complex-double-float1082 complex-double-float1083)
  • Function COMPLEX-LONG-FLOAT/ (complex-long-float1257 complex-long-float1258)
  • Function SHORT-FLOAT-MAX (short-float0 short-float1)
  • Function SINGLE-FLOAT-MAX (single-float227 single-float228)
  • Function DOUBLE-FLOAT-MAX (double-float422 double-float423)
  • Function LONG-FLOAT-MAX (long-float617 long-float618)
  • Function SHORT-FLOAT-MIN (short-float0 short-float1)
  • Function SINGLE-FLOAT-MIN (single-float227 single-float228)
  • Function DOUBLE-FLOAT-MIN (double-float422 double-float423)
  • Function LONG-FLOAT-MIN (long-float617 long-float618)
  • Function SHORT-FLOAT* (short-float178 short-float179)
  • Function SINGLE-FLOAT* (single-float353 single-float354)
  • Function DOUBLE-FLOAT* (double-float528 double-float529)
  • Function LONG-FLOAT* (long-float703 long-float704)
  • Function COMPLEX-SHORT-FLOAT* (complex-short-float878 complex-short-float879)
  • Function COMPLEX-SINGLE-FLOAT* (complex-single-float1053 complex-single-float1054)
  • Function COMPLEX-DOUBLE-FLOAT* (complex-double-float1228 complex-double-float1229)
  • Function COMPLEX-LONG-FLOAT* (complex-long-float1403 complex-long-float1404)
  • Function SHORT-FLOAT-SIN (short-float126)
  • Function SINGLE-FLOAT-SIN (single-float234)
  • Function DOUBLE-FLOAT-SIN (double-float342)
  • Function LONG-FLOAT-SIN (long-float450)
  • Function COMPLEX-SHORT-FLOAT-SIN (complex-short-float558)
  • Function COMPLEX-SINGLE-FLOAT-SIN (complex-single-float666)
  • Function COMPLEX-DOUBLE-FLOAT-SIN (complex-double-float774)
  • Function COMPLEX-LONG-FLOAT-SIN (complex-long-float882)
  • Function SHORT-FLOAT- (short-float210 short-float211)
  • Function SINGLE-FLOAT- (single-float385 single-float386)
  • Function DOUBLE-FLOAT- (double-float560 double-float561)
  • Function LONG-FLOAT- (long-float735 long-float736)
  • Function COMPLEX-SHORT-FLOAT- (complex-short-float910 complex-short-float911)
  • Function COMPLEX-SINGLE-FLOAT- (complex-single-float1085 complex-single-float1086)
  • Function COMPLEX-DOUBLE-FLOAT- (complex-double-float1260 complex-double-float1261)
  • Function COMPLEX-LONG-FLOAT- (complex-long-float1435 complex-long-float1436)
  • Function SHORT-FLOAT-UNARY- (short-float1610)
  • Function SINGLE-FLOAT-UNARY- (single-float1718)
  • Function DOUBLE-FLOAT-UNARY- (double-float1826)
  • Function LONG-FLOAT-UNARY- (long-float1934)
  • Function COMPLEX-SHORT-FLOAT-UNARY- (complex-short-float2042)
  • Function COMPLEX-SINGLE-FLOAT-UNARY- (complex-single-float2150)
  • Function COMPLEX-DOUBLE-FLOAT-UNARY- (complex-double-float2258)
  • Function COMPLEX-LONG-FLOAT-UNARY- (complex-long-float2366)
  • Function SHORT-FLOAT-TAN (short-float0)
  • Function SINGLE-FLOAT-TAN (single-float140)
  • Function DOUBLE-FLOAT-TAN (double-float248)
  • Function LONG-FLOAT-TAN (long-float356)
  • Function COMPLEX-SHORT-FLOAT-TAN (complex-short-float464)
  • Function COMPLEX-SINGLE-FLOAT-TAN (complex-single-float572)
  • Function COMPLEX-DOUBLE-FLOAT-TAN (complex-double-float680)
  • Function COMPLEX-LONG-FLOAT-TAN (complex-long-float788)

petalisp.utilities

PETALISP.UTILITIES

  • Function IDENTICAL (sequence &key (test #'eql) (key #'identity))
    Check whether the KEYs of SEQUENCE are identical with respect to TEST.
  • Macro WITH-MEMOIZATION ((key &key (test nil test-p) (store-key nil store-key-p)) &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.
  • Macro WITH-MULTIPLE-VALUE-MEMOIZATION ((key &key (test nil test-p) (store-key nil store-key-p)) &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.
  • Macro WITH-MULTIPLE-VALUE-HASH-TABLE-MEMOIZATION ((key &key (store-key nil store-key-p)) 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.
  • Macro WITH-HASH-TABLE-MEMOIZATION ((key &key (store-key nil store-key-p)) 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.
  • Macro WITH-VECTOR-MEMOIZATION ((key &key (size 7) (growth 2.0)) &body body)
    Memoize the value of BODY for KEY being a relatively small integer.
  • Macro WITH-MULTIPLE-VALUE-VECTOR-MEMOIZATION ((key &key (size 7) (growth 2.0)) &body body)
    Memoize the values of BODY for VAR being a relatively small integer.
  • 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).
  • Macro DEFINE-METHOD-PAIR (name &rest args)
  • Macro DEFINE-CLASS-PREDICATE (class-name &key hyphenate)
  • Function PRIME-FACTORS (integer)
    Return the list of prime factors of INTEGER in ascending order.
  • 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)