The dense-arrays Reference Manual

This is the dense-arrays Reference Manual, version 0.3.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Nov 06 13:10:44 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 dense-arrays

Numpy like array objects for Common Lisp

Author

Shubhamkar B. Ayare

License

MIT

Version

0.3.0

Defsystem Dependency

asdf-system-connections (system).

Dependencies
  • abstract-arrays (system).
  • polymorphic-functions (system).
  • alexandria (system).
  • compiler-macro-notes (system).
  • closer-mop (system).
  • extensible-compound-types (system).
  • extensible-compound-types-cl (system)., for feature :extensible-compound-types
  • fiveam (system).
  • iterate (system).
  • trivial-garbage (system).
  • cl-form-types (system).
  • trivial-types (system).
  • uiop (system).
Source

dense-arrays.asd.

Child Components

3 Modules

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


3.1 dense-arrays/src

Source

dense-arrays.asd.

Parent Component

dense-arrays (system).

Child Components

3.2 dense-arrays/optim

Dependency

src (module).

Source

dense-arrays.asd.

Parent Component

dense-arrays (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 dense-arrays/dense-arrays.asd

Source

dense-arrays.asd.

Parent Component

dense-arrays (system).

ASDF Systems

dense-arrays.


4.1.2 dense-arrays/src/package.lisp

Source

dense-arrays.asd.

Parent Component

src (module).

Packages

dense-arrays.

Public Interface
Internals

4.1.3 dense-arrays/src/protocol.lisp

Dependency

package.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 dense-arrays/src/types.lisp

Dependency

protocol.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.5 dense-arrays/src/dense-arrays.lisp

Dependency

types.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 dense-arrays/src/broadcast.lisp

Dependency

dense-arrays.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface
Internals

%broadcast-compatible-p (function).


4.1.7 dense-arrays/src/do-arrays.lisp

Dependency

broadcast.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface

do-arrays (macro).

Internals

4.1.8 dense-arrays/src/argwhere.lisp

Dependency

do-arrays.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Internals

4.1.9 dense-arrays/src/aref.lisp

Dependency

argwhere.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.10 dense-arrays/src/copy.lisp

Dependency

aref.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface

copy-array (function).


4.1.11 dense-arrays/src/unupgraded.lisp

Dependency

copy.lisp (file).

Source

dense-arrays.asd.

Parent Component

src (module).

Public Interface
Internals

unupgraded-dense-array-class (class).


4.1.12 dense-arrays/optim/misc.lisp

Source

dense-arrays.asd.

Parent Component

optim (module).

Public Interface

dense-array-type-class (function).

Internals

4.1.13 dense-arrays/optim/aref.lisp

Dependency

misc.lisp (file).

Source

dense-arrays.asd.

Parent Component

optim (module).

Public Interface

array= (compiler macro).


4.1.14 dense-arrays/optim/unupgraded.lisp

Dependency

aref.lisp (file).

Source

dense-arrays.asd.

Parent Component

optim (module).


5 Packages

Packages are listed by definition order.


5.1 dense-arrays

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • it.bese.fiveam.
  • iterate.
  • polymorphic-functions.
Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *array-element-print-format*

The format control string used to print the elements of DENSE-ARRAYS:ARRAY.

It is possible to set this value to "~/USER-DEFINED-FUNCTION/" where USER-DEFINED-FUNCTION should accept at least four arguments.

Also see:
- https://en.wikipedia.org/wiki/Format_(Common_Lisp)
- http://www.gigamonkeys.com/book/a-few-format-recipes.html

Package

dense-arrays.

Source

dense-arrays.lisp.

Special Variable: *array-element-type*

If BOUND, this is the default value of the ELEMENT-TYPE or TYPE argument. Overrides *ARRAY-ELEMENT-TYPE-ALIST*.
Is overriden by explicitly passing an ELEMENT-TYPE or TYPE argument.

Package

dense-arrays.

Source

package.lisp.

Special Variable: *array-element-type-alist*

An ALIST mapping package to the default element-type used in that package. (Inspired from SWANK:*READTABLE-ALIST*)
Overrides none.
Is overriden by *ARRAY-ELEMENT-TYPE* when bound, or by explicitly passing an ELEMENT-TYPE or TYPE argument.

Package

dense-arrays.

Source

package.lisp.

Special Variable: *array-layout*

Specifies the default layout constructed by DENSE-ARRAYS:MAKE-ARRAY and constructor functions like ASARRAY, ZEROS, ONES, etc in the DENSE-ARRAYS-PLUS-LITE package.

Package

dense-arrays.

Source

package.lisp.

Special Variable: *dense-array-class*

Specifies the default value of CLASS in DENSE-ARRAYS:MAKE-ARRAY and other functions. (TODO: Specify these other functions.)

Package

dense-arrays.

Source

protocol.lisp.


6.1.2 Macros

Macro: do-arrays (rank/bindings &body body)

Traverses the arrays in row-major order.

If the first argument RANK/BINDINGS is of type SIZE, it’d be treated as the rank of the arrays. Then, the BINDINGS are assumed to be the first element of the BODY.

Otherwise, the first argument is treated as if they are BINDINGS.
Each BINDING is of the form
(ELT-VAR ARRAY &OPTIONAL (ELEMENT-TYPE *) &KEY (CLASS-NAME *DENSE-ARRAY-CLASS*)) Here, only ARRAY is evaluated.

Examples

(let ((a (make-array ’(2 3)))
(b (make-array ’(2 3))))
(do-arrays ((c a t)
(d b t))
(print (list c d))))

(let ((a (make-array ’(2 3)))
(b (make-array ’(2 3))))
(do-arrays 2 ((c a t) ; The 2 indicates the rank of the arrays
(d b t))
(print (list c d))))

Either of the two cases might be faster depending on the number of dimensions.

Package

dense-arrays.

Source

do-arrays.lisp.


6.1.3 Compiler macros

Compiler Macro: array= (array1 array2 &key test)
Package

dense-arrays.

Source

aref.lisp.


6.1.4 Ordinary functions

Function: aref* (dense-array &rest subscripts)

Accessor function for DENSE-ARRAYS::DENSE-ARRAY with semantics
intended to be similar to numpy’s indexing semantics.
See https://numpy.org/doc/stable/user/basics.indexing.html

Each element of SUBSCRIPTS can be
- either an integer denoting the position within the axis which is to be indexed
- or a list of the form (&OPTIONAL START &KEY END STEP) with each of START END STEP being integers if supplied. START denotes the start position within the axis, END denotes the ending position within the axis, STEP denotes at what distance within the axis the next element should come after the previous, starting from START

Each of the SUBSCRIPTS, START, END, STEP can also be negative integers, in which case the last element along the axis is given the index -1, the second last is given the index -2 and so on. Thus, ‘(aref ... ’(-1 :step -1))‘ can reverse a one dimensional array.

Like, CL:AREF or ABSTRACT-ARRAYS:AREF, returns the element corresponding to SUBSCRIPTS if all the subscripts are integers and there as many subscripts
as the rank of the array.

If the number (aka length) of SUBSCRIPTS were less than the array’s rank, or
if some of the SUBSCRIPTS were lists described above, then returns a VIEW
of the arrays. A VIEW is a window into the original array and thus
avoids copying the elements of the original array.

Examples illustrating the numpy-equivalent indexes:

a[::] (aref a nil)
a[::2] (aref a ’(0 :step 2))
a[3, ::-1] (aref a 3 ’(-1 :step -1))
a[3::, -1] (aref a ’(3) -1)

The SUBSCRIPTS can also be integer or boolean arrays, denoting which elements
to select from each of the axes. But in this case the corresponding elements
of the array are copied over into a new array.

Package

dense-arrays.

Source

aref.lisp.

Function: (setf aref*) (dense-array &rest subscripts)
Package

dense-arrays.

Source

aref.lisp.

Function: array-displaced-to (array)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-displacement (array)

Returns two values:
- ARRAY-STORAGE
- and OFFSET along first axis
Consequences are undefined if ARRAY is displaced along multiple axis.

Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-layout (array)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-offset (array axis-number)

Return the length of offset corresponding to AXIS-NUMBER of ARRAY.

Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-offsets (array)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-stride (array axis-number)

Return the length of stride corresponding to AXIS-NUMBER of ARRAY.

Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-strides (array)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array= (array1 array2 &key test)

Returns non-NIL if each element of ARRAY1 is equal to each corresponding element of ARRAY2 using TEST, which should be a two-argument function that takes the one element of the first array and the corresponding element of the second and tests for their equality.

Package

dense-arrays.

Source

aref.lisp.

Function: broadcast-array (array broadcast-dimensions)
Package

dense-arrays.

Source

broadcast.lisp.

Function: broadcast-arrays (&rest arrays)

Returns two values. The first value is the list of broadcasted arrays if the second value is non-NIL.

Package

dense-arrays.

Source

broadcast.lisp.

Function: broadcast-compatible-p (&rest arrays)

Returns two values:
- The first value is a generalized boolean indicating whether the arrays can be broadcasted. - The second value is the dimension of the array resulting from the broadcast.

The broadcasting semantics are equivalent to numpy semantics. Two arrays are broadcast compatible, if
- they have the same dimensions, or
- if, for the dimensions they differ, one of the dimension is of length 1, or
- the dimensions of the lower-ranked array matches the rightmost dimensions
of the higher-ranked array

Thus, arrays with the following dimensions are broadcast-compatible:
- (3) (3)
- (3 1) (3 3)
- (3 3) (1 3)
- (3 3) (3)

Arrays with the following dimensions are not compatible:
- (3 1) (3)

See https://numpy.org/doc/stable/user/basics.broadcasting.html for an elaborate discussion.

Package

dense-arrays.

Source

broadcast.lisp.

Function: copy-array (array &key layout)

Returns a copy of ARRAY. Creates a completely new array even if ARRAY is a VIEW (see ARRAY-VIEW-P).

Package

dense-arrays.

Source

copy.lisp.

Function: dense-array-type-class (array-type &optional env)
Package

dense-arrays.

Source

misc.lisp.

Function: make-array (dimensions &rest args &key element-type initial-element initial-contents constructor strides adjustable fill-pointer class layout displaced-to offsets displaced-index-offset)

Like CL:MAKE-ARRAY but returns a DENSE-ARRAYS::DENSE-ARRAY instead of CL:ARRAY. Additionally takes

- LAYOUT argument which can be one of (:ROW-MAJOR :COLUMN-MAJOR NIL)
- CLASS argument which should be a class designator denoting the class to which the constructed dense array will belong to

- CONSTRUCTOR if supplied should be a function that takes as many arguments
as the number of dimensions aka rank of the array, and return the element that should correspond to the position indicated by the arguments of the function. For example:

(make-array ’(2 3) :constructor (lambda (&rest indexes) (cons ’indexes indexes))) ;=> #<STANDARD-DENSE-ARRAY :ROW-MAJOR 2x3 T
((INDEXES 0 0) (INDEXES 0 1) (INDEXES 0 2))
((INDEXES 1 0) (INDEXES 1 1) (INDEXES 1 2))
{10194A2FE3}>

Package

dense-arrays.

Source

dense-arrays.lisp.

Function: print-array (array &optional array-element-print-format &key level length stream)

Prints ARRAY as if by CL:PRINT.
Format recipes: http://www.gigamonkeys.com/book/a-few-format-recipes.html.

Package

dense-arrays.

Source

dense-arrays.lisp.


6.1.5 Generic functions

Generic Function: storage-accessor (class)

Returns a SYMBOL that is fbound to an accessor function that takes (STORAGE INDEX) as arguments and returns the element at INDEX in STORAGE. The function is an accessor function in the sense that SYMBOL should also be associated with (SETF SYMBOL) function that takes (NEW-VALUE STORAGE INDEX) as arguments and sets the STORAGE element at INDEX to NEW-VALUE.
This function is primarily used inside AREF, ROW-MAJOR-AREF and DO-ARRAYS, and their SETF counterparts.
See src/protocol.lisp and plus/cl-cuda.lisp for reference.

Package

dense-arrays.

Source

protocol.lisp.

Methods
Method: storage-accessor ((class standard-dense-array-class))
Method: storage-accessor (class)
Generic Function: storage-allocator (class)

Returns a symbol fbound to a function with signature
(SIZE &KEY ELEMENT-TYPE INITIAL-ELEMENT)
that allocates a VECTOR of length SIZE of ELEMENT-TYPE with each element as INITIAL-ELEMENT for use as a STORAGE-VECTOR for the ABSTRACT-ARRAY.

Package

dense-arrays.

Source

protocol.lisp.

Methods
Method: storage-allocator ((class standard-dense-array-class))
Method: storage-allocator (class)
Generic Function: storage-deallocator (class)

Returns either NIL or a symbol fbound to a function to be called
to delete the STORAGE when the ABSTRACT-ARRAY goes out of scope. This function should take only the STORAGE object as its argument.
Internally, this function plays a role in the finalizer of the garbage collection using TRIVIAL-GARBAGE.
See plus/static-vectors.lisp and the DENSE-ARRAYS:MAKE-ARRAY function for reference.

Package

dense-arrays.

Source

protocol.lisp.

Methods
Method: storage-deallocator ((class standard-dense-array-class))
Method: storage-deallocator (class)
Generic Function: storage-element-type-upgrader (class)

Equivalent to the CL:UPGRADED-ARRAY-ELEMENT-TYPE, this returns a function that takes a single argument element-type as input and returns the upgraded array element type for the array class given by CLASS used for STORAGE.
The upgraded array element type is then stored in the dense-array object and used for other tasks downstream.
See plus/cl-cuda.lisp and the DENSE-ARRAYS:MAKE-ARRAY function for reference.

Package

dense-arrays.

Source

protocol.lisp.

Methods
Method: storage-element-type-upgrader ((class unupgraded-dense-array-class))
Source

unupgraded.lisp.

Method: storage-element-type-upgrader ((class standard-dense-array-class))
Method: storage-element-type-upgrader (class)
Generic Function: storage-type-inferrer-from-array-type (class)

This should return a function that takes as input the ARRAY-TYPE and returns
the possibly specialized type of storage that the corresponding array object
will have. This is primarily used for optimization purposes inside DENSE-ARRAYS:DO-ARRAYS and the compiler macros of DENSE-ARRAYS:AREF DENSE-ARRAYS:ROW-MAJOR-AREF and SETF counterparts.
See src/protocol.lisp, plus/cl-cuda.lisp, src/do-arrays.lisp and optim/aref.lisp for reference.

Package

dense-arrays.

Source

protocol.lisp.

Methods
Method: storage-type-inferrer-from-array-type ((class standard-dense-array-class))
Method: storage-type-inferrer-from-array-type (class)

6.1.6 Standalone methods

Method: print-object ((array dense-array) stream)
Source

dense-arrays.lisp.


6.1.7 Classes

Class: standard-dense-array
Package

dense-arrays.

Source

protocol.lisp.

Direct superclasses

dense-array.

Class: standard-dense-array-class
Package

dense-arrays.

Source

protocol.lisp.

Direct superclasses

dense-array-class.

Direct subclasses

unupgraded-dense-array-class.

Direct methods
Class: unupgraded-dense-array
Package

dense-arrays.

Source

unupgraded.lisp.

Direct superclasses

dense-array.


6.1.8 Types

Type: array (&optional element-type rank)
Package

dense-arrays.

Source

types.lisp.

Type: simple-array (&optional element-type rank)
Package

dense-arrays.

Source

types.lisp.

Type: simple-unupgraded-array (&optional element-type rank)
Package

dense-arrays.

Source

unupgraded.lisp.

Type: unupgraded-array (&optional element-type rank)
Package

dense-arrays.

Source

unupgraded.lisp.


6.2 Internals


6.2.1 Symbol macros

Symbol Macro: default-element-type
Package

dense-arrays.

Source

package.lisp.

Symbol Macro: package-local-element-type
Package

dense-arrays.

Source

package.lisp.


6.2.2 Macros

Macro: define-dense-array-types (type-name class-name array-name &optional simple-array-name)
Package

dense-arrays.

Source

types.lisp.

Macro: define-macro-helper (name lambda-list &body body)
Package

dense-arrays.

Source

do-arrays.lisp.

Macro: destructuring-lists (bindings &body body)
Package

dense-arrays.

Source

do-arrays.lisp.

Macro: ensure-single (&rest symbols)
Package

dense-arrays.

Source

dense-arrays.lisp.

Macro: lm (&rest body-vars)
Package

dense-arrays.

Source

do-arrays.lisp.

Macro: map-collect (format &rest list-vars)

(map-collect ‘(c ,%1) ’(1 2 3)) ;=> ((C 1) (C 2) (C 3))

Package

dense-arrays.

Source

do-arrays.lisp.

Macro: the-int-index (form)
Package

dense-arrays.

Source

package.lisp.

Macro: the-size (form)
Package

dense-arrays.

Source

package.lisp.


6.2.3 Compiler macros

Compiler Macro: assert-type (value-form type-form &optional datum &rest datum-args)
Package

dense-arrays.

Source

dense-arrays.lisp.

Compiler Macro: cl-aref (array index)
Package

dense-arrays.

Source

protocol.lisp.

Compiler Macro: (setf cl-aref) (array index)
Package

dense-arrays.

Source

protocol.lisp.


6.2.4 Ordinary functions

Function: %aref (array &rest subscripts)

Returns a copy of the subscripted array.

Package

dense-arrays.

Source

aref.lisp.

Function: (setf %aref) (array &rest subscripts)
Package

dense-arrays.

Source

aref.lisp.

Function: %aref-view (array &rest subscripts)

Returns a VIEW of the subscripted ARRAY (without copying the contents)

Package

dense-arrays.

Source

aref.lisp.

Function: (setf %aref-view) (array &rest subscripts)
Package

dense-arrays.

Source

aref.lisp.

Function: %broadcast-compatible-p (dimensions-a dimensions-b)

Returns two values:
The first value is a generalized boolean indicating whether the two dimensions are broadcast compatible. The second value is the dimensions of the array resulting from the broadcast.

Package

dense-arrays.

Source

broadcast.lisp.

Function: 1d-storage-array (array)

Returns the storage-vector underlying the ARRAY. This is equivalent to ARRAY-DISPLACED-TO.

Package

dense-arrays.

Source

dense-arrays.lisp.

Function: argwhere (bit-array)
Package

dense-arrays.

Source

argwhere.lisp.

Function: array-displaced-index-offset (array)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: array-view-p (array)

Returns T if the ARRAY is a VIEW, otherwise returns NIL. A VIEW does not
have a known layout, and is useful as a window into certain elements of the larger array. A VIEW provides a way to obtain sub-arrays or reshapes or transposes out of ARRAY without copying.

Package

dense-arrays.

Source

dense-arrays.lisp.

Function: assert-type (value type &optional datum &rest datum-args)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: cl-aref (array index)
Package

dense-arrays.

Source

protocol.lisp.

Function: (setf cl-aref) (array index)
Package

dense-arrays.

Source

protocol.lisp.

Function: collect-reduce-from-end (function list initial-element)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: da-ref (array &rest subscripts)
Package

dense-arrays.

Source

aref.lisp.

Function: dense-array-layout (dense-array)
Package

dense-arrays.

Source

protocol.lisp.

Function: dense-array-offsets (dense-array)
Package

dense-arrays.

Source

protocol.lisp.

Function: dense-array-root-array (dense-array)
Package

dense-arrays.

Source

protocol.lisp.

Function: dense-array-strides (dense-array)
Package

dense-arrays.

Source

protocol.lisp.

Function: dense-array-type-element-type (type-spec)
Package

dense-arrays.

Source

types.lisp.

Function: dimensions->strides (dimensions layout)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: expand-do-arrays-with-rank (elt-vars array-vars storage-types storage-accessors rank body)
Package

dense-arrays.

Source

do-arrays.lisp.

Function: expand-do-arrays-without-rank (elt-vars array-vars storage-types storage-accessors body)
Package

dense-arrays.

Source

do-arrays.lisp.

Function: nonzero (bit-array)
Package

dense-arrays.

Source

argwhere.lisp.

Function: normalize-index (index dimension)
Package

dense-arrays.

Source

aref.lisp.

Function: pretty-print-number (stream arg colon-modifier-p at-modifier-p)
Package

dense-arrays.

Source

dense-arrays.lisp.

Function: primary-form-type (form env)
Package

dense-arrays.

Source

misc.lisp.

Function: simple-dense-array-p (object)
Package

dense-arrays.

Source

types.lisp.


6.2.5 Generic functions

Generic Reader: axis-number (condition)
Generic Writer: (setf axis-number) (condition)
Package

dense-arrays.

Methods
Reader Method: axis-number ((condition print-lines-exhausted))
Writer Method: (setf axis-number) ((condition print-lines-exhausted))
Source

dense-arrays.lisp.

Target Slot

axis-number.

Generic Reader: form (condition)
Package

dense-arrays.

Methods
Reader Method: form ((condition slot-type-failure))
Source

misc.lisp.

Target Slot

form.

Generic Reader: form-type (condition)
Package

dense-arrays.

Methods
Reader Method: form-type ((condition slot-type-failure))
Source

misc.lisp.

Target Slot

form-type.

Generic Reader: index (condition)
Generic Writer: (setf index) (condition)
Package

dense-arrays.

Methods
Reader Method: index ((condition invalid-index))
Writer Method: (setf index) ((condition invalid-index))
Source

aref.lisp.

Target Slot

index.

Generic Reader: slot (condition)
Package

dense-arrays.

Methods
Reader Method: slot ((condition slot-type-failure))
Source

misc.lisp.

Target Slot

slot.


6.2.6 Conditions

Condition: backend-failure
Package

dense-arrays.

Source

misc.lisp.

Direct superclasses

slot-type-failure.

Direct slots
Slot: slot
Allocation

:class

Initform

(quote (quote dense-arrays::backend))

Initargs

:slot

Condition: do-arrays/element-type-failure
Package

dense-arrays.

Source

do-arrays.lisp.

Direct superclasses

optimization-failure-note.

Direct slots
Slot: binding-form
Initargs

:binding-form

Condition: element-type-failure
Package

dense-arrays.

Source

misc.lisp.

Direct superclasses

slot-type-failure.

Direct slots
Slot: slot
Allocation

:class

Initform

(quote (quote abstract-arrays::element-type))

Initargs

:slot

Condition: invalid-array-index-for-axis
Package

dense-arrays.

Source

aref.lisp.

Direct superclasses

invalid-array-index.

Direct slots
Slot: axis
Initargs

:axis

Slot: valid
Initform

(quote nil)

Initargs

:valid

Condition: invalid-index
Package

dense-arrays.

Source

aref.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: index
Initargs

:index

Readers

index.

Writers

(setf index).

Condition: print-lines-exhausted
Package

dense-arrays.

Source

dense-arrays.lisp.

Direct superclasses

condition.

Direct methods
Direct slots
Slot: axis-number
Initargs

:axis-number

Readers

axis-number.

Writers

(setf axis-number).

Condition: rank-failure
Package

dense-arrays.

Source

misc.lisp.

Direct superclasses

slot-type-failure.

Direct slots
Slot: slot
Allocation

:class

Initform

(quote (quote abstract-arrays::rank))

Initargs

:slot

Condition: slot-type-failure
Package

dense-arrays.

Source

misc.lisp.

Direct superclasses

optimization-failure-note.

Direct subclasses
Direct methods
Direct slots
Slot: form
Initargs

:form

Readers

form.

Writers

This slot is read-only.

Slot: form-type
Initargs

:form-type

Readers

form-type.

Writers

This slot is read-only.

Slot: slot
Initargs

:slot

Readers

slot.

Writers

This slot is read-only.


6.2.7 Classes

Class: dense-array

- DIMENSIONS is a list of dimensions.
- STRIDES is a list of strides along each dimension. - OFFSETS is a list of offsets along each dimension.

Package

dense-arrays.

Source

protocol.lisp.

Direct superclasses

abstract-array.

Direct subclasses
Direct methods

print-object.

Direct slots
Slot: strides
Type

list

Initform

(error "strides must be supplied during dense-array initialization")

Initargs

:strides

Slot: offsets
Initform

(error "offsets must be supplied during dense-array initialization")

Initargs

:offsets

Slot: layout
Type

(member nil :row-major :column-major)

Initform

(error "layout must be supplied during dense-array initialization")

Initargs

:layout

Slot: root-array
Initform

(error "root-array must be supplied during dense-array initialization")

Initargs

:root-array

Class: dense-array-class
Package

dense-arrays.

Source

protocol.lisp.

Direct superclasses

abstract-array-class.

Direct subclasses

standard-dense-array-class.

Class: unupgraded-dense-array-class
Package

dense-arrays.

Source

unupgraded.lisp.

Direct superclasses

standard-dense-array-class.

Direct methods

storage-element-type-upgrader.


6.2.8 Types

Type: %dense-array (&optional element-type rank)
Package

dense-arrays.

Source

types.lisp.

Type: int-index ()
Package

dense-arrays.

Source

package.lisp.

Type: int32 ()
Package

dense-arrays.

Source

package.lisp.

Type: int64 ()
Package

dense-arrays.

Source

package.lisp.

Type: simple-dense-array (&optional element-type rank)
Package

dense-arrays.

Source

types.lisp.

Type: size ()
Package

dense-arrays.

Source

package.lisp.

Type: uint32 ()
Package

dense-arrays.

Source

package.lisp.

Type: uint64 ()
Package

dense-arrays.

Source

package.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (   1  
A   B   C   D   E   F   G   I   L   M   N   P   S   T  
Index Entry  Section

%
%aref: Private ordinary functions
%aref-view: Private ordinary functions
%broadcast-compatible-p: Private ordinary functions

(
(setf %aref): Private ordinary functions
(setf %aref-view): Private ordinary functions
(setf aref*): Public ordinary functions
(setf axis-number): Private generic functions
(setf axis-number): Private generic functions
(setf cl-aref): Private compiler macros
(setf cl-aref): Private ordinary functions
(setf index): Private generic functions
(setf index): Private generic functions

1
1d-storage-array: Private ordinary functions

A
aref*: Public ordinary functions
argwhere: Private ordinary functions
array-displaced-index-offset: Private ordinary functions
array-displaced-to: Public ordinary functions
array-displacement: Public ordinary functions
array-layout: Public ordinary functions
array-offset: Public ordinary functions
array-offsets: Public ordinary functions
array-stride: Public ordinary functions
array-strides: Public ordinary functions
array-view-p: Private ordinary functions
array=: Public compiler macros
array=: Public ordinary functions
assert-type: Private compiler macros
assert-type: Private ordinary functions
axis-number: Private generic functions
axis-number: Private generic functions

B
broadcast-array: Public ordinary functions
broadcast-arrays: Public ordinary functions
broadcast-compatible-p: Public ordinary functions

C
cl-aref: Private compiler macros
cl-aref: Private ordinary functions
collect-reduce-from-end: Private ordinary functions
Compiler Macro, (setf cl-aref): Private compiler macros
Compiler Macro, array=: Public compiler macros
Compiler Macro, assert-type: Private compiler macros
Compiler Macro, cl-aref: Private compiler macros
copy-array: Public ordinary functions

D
da-ref: Private ordinary functions
define-dense-array-types: Private macros
define-macro-helper: Private macros
dense-array-layout: Private ordinary functions
dense-array-offsets: Private ordinary functions
dense-array-root-array: Private ordinary functions
dense-array-strides: Private ordinary functions
dense-array-type-class: Public ordinary functions
dense-array-type-element-type: Private ordinary functions
destructuring-lists: Private macros
dimensions->strides: Private ordinary functions
do-arrays: Public macros

E
ensure-single: Private macros
expand-do-arrays-with-rank: Private ordinary functions
expand-do-arrays-without-rank: Private ordinary functions

F
form: Private generic functions
form: Private generic functions
form-type: Private generic functions
form-type: Private generic functions
Function, %aref: Private ordinary functions
Function, %aref-view: Private ordinary functions
Function, %broadcast-compatible-p: Private ordinary functions
Function, (setf %aref): Private ordinary functions
Function, (setf %aref-view): Private ordinary functions
Function, (setf aref*): Public ordinary functions
Function, (setf cl-aref): Private ordinary functions
Function, 1d-storage-array: Private ordinary functions
Function, aref*: Public ordinary functions
Function, argwhere: Private ordinary functions
Function, array-displaced-index-offset: Private ordinary functions
Function, array-displaced-to: Public ordinary functions
Function, array-displacement: Public ordinary functions
Function, array-layout: Public ordinary functions
Function, array-offset: Public ordinary functions
Function, array-offsets: Public ordinary functions
Function, array-stride: Public ordinary functions
Function, array-strides: Public ordinary functions
Function, array-view-p: Private ordinary functions
Function, array=: Public ordinary functions
Function, assert-type: Private ordinary functions
Function, broadcast-array: Public ordinary functions
Function, broadcast-arrays: Public ordinary functions
Function, broadcast-compatible-p: Public ordinary functions
Function, cl-aref: Private ordinary functions
Function, collect-reduce-from-end: Private ordinary functions
Function, copy-array: Public ordinary functions
Function, da-ref: Private ordinary functions
Function, dense-array-layout: Private ordinary functions
Function, dense-array-offsets: Private ordinary functions
Function, dense-array-root-array: Private ordinary functions
Function, dense-array-strides: Private ordinary functions
Function, dense-array-type-class: Public ordinary functions
Function, dense-array-type-element-type: Private ordinary functions
Function, dimensions->strides: Private ordinary functions
Function, expand-do-arrays-with-rank: Private ordinary functions
Function, expand-do-arrays-without-rank: Private ordinary functions
Function, make-array: Public ordinary functions
Function, nonzero: Private ordinary functions
Function, normalize-index: Private ordinary functions
Function, pretty-print-number: Private ordinary functions
Function, primary-form-type: Private ordinary functions
Function, print-array: Public ordinary functions
Function, simple-dense-array-p: Private ordinary functions

G
Generic Function, (setf axis-number): Private generic functions
Generic Function, (setf index): Private generic functions
Generic Function, axis-number: Private generic functions
Generic Function, form: Private generic functions
Generic Function, form-type: Private generic functions
Generic Function, index: Private generic functions
Generic Function, slot: Private generic functions
Generic Function, storage-accessor: Public generic functions
Generic Function, storage-allocator: Public generic functions
Generic Function, storage-deallocator: Public generic functions
Generic Function, storage-element-type-upgrader: Public generic functions
Generic Function, storage-type-inferrer-from-array-type: Public generic functions

I
index: Private generic functions
index: Private generic functions

L
lm: Private macros

M
Macro, define-dense-array-types: Private macros
Macro, define-macro-helper: Private macros
Macro, destructuring-lists: Private macros
Macro, do-arrays: Public macros
Macro, ensure-single: Private macros
Macro, lm: Private macros
Macro, map-collect: Private macros
Macro, the-int-index: Private macros
Macro, the-size: Private macros
make-array: Public ordinary functions
map-collect: Private macros
Method, (setf axis-number): Private generic functions
Method, (setf index): Private generic functions
Method, axis-number: Private generic functions
Method, form: Private generic functions
Method, form-type: Private generic functions
Method, index: Private generic functions
Method, print-object: Public standalone methods
Method, slot: Private generic functions
Method, storage-accessor: Public generic functions
Method, storage-accessor: Public generic functions
Method, storage-allocator: Public generic functions
Method, storage-allocator: Public generic functions
Method, storage-deallocator: Public generic functions
Method, storage-deallocator: Public generic functions
Method, storage-element-type-upgrader: Public generic functions
Method, storage-element-type-upgrader: Public generic functions
Method, storage-element-type-upgrader: Public generic functions
Method, storage-type-inferrer-from-array-type: Public generic functions
Method, storage-type-inferrer-from-array-type: Public generic functions

N
nonzero: Private ordinary functions
normalize-index: Private ordinary functions

P
pretty-print-number: Private ordinary functions
primary-form-type: Private ordinary functions
print-array: Public ordinary functions
print-object: Public standalone methods

S
simple-dense-array-p: Private ordinary functions
slot: Private generic functions
slot: Private generic functions
storage-accessor: Public generic functions
storage-accessor: Public generic functions
storage-accessor: Public generic functions
storage-allocator: Public generic functions
storage-allocator: Public generic functions
storage-allocator: Public generic functions
storage-deallocator: Public generic functions
storage-deallocator: Public generic functions
storage-deallocator: Public generic functions
storage-element-type-upgrader: Public generic functions
storage-element-type-upgrader: Public generic functions
storage-element-type-upgrader: Public generic functions
storage-element-type-upgrader: Public generic functions
storage-type-inferrer-from-array-type: Public generic functions
storage-type-inferrer-from-array-type: Public generic functions
storage-type-inferrer-from-array-type: Public generic functions

T
the-int-index: Private macros
the-size: Private macros


A.3 Variables

Jump to:   *  
A   B   D   F   I   L   O   P   R   S   V  
Index Entry  Section

*
*array-element-print-format*: Public special variables
*array-element-type*: Public special variables
*array-element-type-alist*: Public special variables
*array-layout*: Public special variables
*dense-array-class*: Public special variables

A
axis: Private conditions
axis-number: Private conditions

B
binding-form: Private conditions

D
default-element-type: Private symbol macros

F
form: Private conditions
form-type: Private conditions

I
index: Private conditions

L
layout: Private classes

O
offsets: Private classes

P
package-local-element-type: Private symbol macros

R
root-array: Private classes

S
slot: Private conditions
slot: Private conditions
slot: Private conditions
slot: Private conditions
Slot, axis: Private conditions
Slot, axis-number: Private conditions
Slot, binding-form: Private conditions
Slot, form: Private conditions
Slot, form-type: Private conditions
Slot, index: Private conditions
Slot, layout: Private classes
Slot, offsets: Private classes
Slot, root-array: Private classes
Slot, slot: Private conditions
Slot, slot: Private conditions
Slot, slot: Private conditions
Slot, slot: Private conditions
Slot, strides: Private classes
Slot, valid: Private conditions
Special Variable, *array-element-print-format*: Public special variables
Special Variable, *array-element-type*: Public special variables
Special Variable, *array-element-type-alist*: Public special variables
Special Variable, *array-layout*: Public special variables
Special Variable, *dense-array-class*: Public special variables
strides: Private classes
Symbol Macro, default-element-type: Private symbol macros
Symbol Macro, package-local-element-type: Private symbol macros

V
valid: Private conditions


A.4 Data types

Jump to:   %  
A   B   C   D   E   F   I   M   O   P   R   S   T   U  
Index Entry  Section

%
%dense-array: Private types

A
aref.lisp: The dense-arrays/src/aref․lisp file
aref.lisp: The dense-arrays/optim/aref․lisp file
argwhere.lisp: The dense-arrays/src/argwhere․lisp file
array: Public types

B
backend-failure: Private conditions
broadcast.lisp: The dense-arrays/src/broadcast․lisp file

C
Class, dense-array: Private classes
Class, dense-array-class: Private classes
Class, standard-dense-array: Public classes
Class, standard-dense-array-class: Public classes
Class, unupgraded-dense-array: Public classes
Class, unupgraded-dense-array-class: Private classes
Condition, backend-failure: Private conditions
Condition, do-arrays/element-type-failure: Private conditions
Condition, element-type-failure: Private conditions
Condition, invalid-array-index-for-axis: Private conditions
Condition, invalid-index: Private conditions
Condition, print-lines-exhausted: Private conditions
Condition, rank-failure: Private conditions
Condition, slot-type-failure: Private conditions
copy.lisp: The dense-arrays/src/copy․lisp file

D
dense-array: Private classes
dense-array-class: Private classes
dense-arrays: The dense-arrays system
dense-arrays: The dense-arrays package
dense-arrays.asd: The dense-arrays/dense-arrays․asd file
dense-arrays.lisp: The dense-arrays/src/dense-arrays․lisp file
do-arrays.lisp: The dense-arrays/src/do-arrays․lisp file
do-arrays/element-type-failure: Private conditions

E
element-type-failure: Private conditions

F
File, aref.lisp: The dense-arrays/src/aref․lisp file
File, aref.lisp: The dense-arrays/optim/aref․lisp file
File, argwhere.lisp: The dense-arrays/src/argwhere․lisp file
File, broadcast.lisp: The dense-arrays/src/broadcast․lisp file
File, copy.lisp: The dense-arrays/src/copy․lisp file
File, dense-arrays.asd: The dense-arrays/dense-arrays․asd file
File, dense-arrays.lisp: The dense-arrays/src/dense-arrays․lisp file
File, do-arrays.lisp: The dense-arrays/src/do-arrays․lisp file
File, misc.lisp: The dense-arrays/optim/misc․lisp file
File, package.lisp: The dense-arrays/src/package․lisp file
File, protocol.lisp: The dense-arrays/src/protocol․lisp file
File, types.lisp: The dense-arrays/src/types․lisp file
File, unupgraded.lisp: The dense-arrays/src/unupgraded․lisp file
File, unupgraded.lisp: The dense-arrays/optim/unupgraded․lisp file

I
int-index: Private types
int32: Private types
int64: Private types
invalid-array-index-for-axis: Private conditions
invalid-index: Private conditions

M
misc.lisp: The dense-arrays/optim/misc․lisp file
Module, optim: The dense-arrays/optim module
Module, src: The dense-arrays/src module

O
optim: The dense-arrays/optim module

P
Package, dense-arrays: The dense-arrays package
package.lisp: The dense-arrays/src/package․lisp file
print-lines-exhausted: Private conditions
protocol.lisp: The dense-arrays/src/protocol․lisp file

R
rank-failure: Private conditions

S
simple-array: Public types
simple-dense-array: Private types
simple-unupgraded-array: Public types
size: Private types
slot-type-failure: Private conditions
src: The dense-arrays/src module
standard-dense-array: Public classes
standard-dense-array-class: Public classes
System, dense-arrays: The dense-arrays system

T
Type, %dense-array: Private types
Type, array: Public types
Type, int-index: Private types
Type, int32: Private types
Type, int64: Private types
Type, simple-array: Public types
Type, simple-dense-array: Private types
Type, simple-unupgraded-array: Public types
Type, size: Private types
Type, uint32: Private types
Type, uint64: Private types
Type, unupgraded-array: Public types
types.lisp: The dense-arrays/src/types․lisp file

U
uint32: Private types
uint64: Private types
unupgraded-array: Public types
unupgraded-dense-array: Public classes
unupgraded-dense-array-class: Private classes
unupgraded.lisp: The dense-arrays/src/unupgraded․lisp file
unupgraded.lisp: The dense-arrays/optim/unupgraded․lisp file