The numcl Reference Manual

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

The numcl Reference Manual

This is the numcl Reference Manual, version 0.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 05:26:03 2022 GMT+0.

Table of Contents


1 Introduction

* Numcl [[https://travis-ci.org/numcl/numcl][https://travis-ci.org/numcl/numcl.svg?branch=master]]

This is a Numpy clone in Common Lisp.
At the moment the library is written in pure Common Lisp, focusing more on correctness and usefulness, not speed.

+ NUMCL is currently available in Quicklisp.
+ [[./example.lisp]] contains a script that you can explore the functions already implemented in NUMCL.
+ Find the full documentation at: https://numcl.github.io/numcl/
+ Check the latest benchmark result against numpy in https://github.com/numcl/numcl-benchmarks/ .

[[https://asciinema.org/a/245792][https://asciinema.org/a/245792.svg]]

** NEWS

+ 2020/2/26 version 0.2.0 is released! 
+ 2020/2/29 =matmul*= : multi-argument version of =matmul= is added. It
  optimizes the multiplication order in order to reduce the runtime / memory.
+ 2020/3/30 Refactored the type inference framework using float infiny / NaNs.
+ 2020/6/29 Minor incompatibility: =LOG=, =LOG2= always return real arrays. Use =LOGC= instead for the original behavior.

** Quick tutorial

In order to guarantee the speed and to simplify the implementation, the arrays
given to numcl functions must satisfy the following two conditions:

+ It is a specialized array. Things of type =(array single-float)=, =(array (unsigned-byte 16))= etc.
+ It is an array displaced to a simple 1D specialized array.
  "[[http://www.lispworks.com/documentation/HyperSpec/Body/t_smp_ar.htm][Simple array]]" means a non-displaced, non-adjustable array without fill pointer.

This means you cannot directly feed the arrays such as =#2A((0.0 1.0) (2.0 3.0))=,
which is an array of type =(simple-array T)=.

There are two ways to create an array similar to what you have and is compatible to numcl:

+ =(reshape (arange 4.0) '(2 2))=
+ =(asarray #2A((0.0 1.0) (2.0 3.0)))=
  + or =(asarray '((0.0 1.0) (2.0 3.0)))=
  + or =(asarray '(#(0.0 1.0) #(2.0 3.0)))=.
+ =(let ((a (zeros '(2 2) :type 'single-float))) (dotimes (i 2) (dotimes (j 2) (setf (aref a i j) ...))))=.

The names and the parameters of numcl functions mostly (rather strictly) follows
the numpy counterpart. There are even numpy names, such as =dtype=, which are
just aliases for =array-element-type=.

** Goals

+ *Closely follow the numpy API, but still make it lispy.*
  + Delegate the documentation effort to Numpy community.
+ *Replace the Common Lisp array interface.*
  + We do not deviate from the traditional symbols/idioms in Common Lisp unless necessary.
    Therefore we provide symbols that conflicts the Common Lisp symbol.
    Math functions become aliases to the original CL functions when the inputs are not arrays.
  + See [[doc/DETAILS.org#packages][doc/DETAILS.org#packages]] .

** Features/Contracts

+ APIs are provided as functions, not macros.
  + It is a design flaw otherwise.
  + This does not mean the API is functional --- we use procedural code.
+ Still, zero overhead.
  + The APIs are simply the wrappers over simple functions and designed to be fully inlined.
  + Optimization will be done on the compiler side, not by macros.
+ Operations are type-correct.
  + They always return arrays of the most specific array-element-type. For example,
  + (zeros 5) returns a bit vector.
  + (asarray '(1 2 3)) returns an (unsigned-byte 2) vector.
  + See [[doc/DETAILS.org#types][doc/DETAILS.org#types]] .
+ NUMCL Arrays are CL arrays.
  + As this library aims to extend Common Lisp (not to replace part of it) in a
    compatible way, we do not introduce custom structures/classes for
    representing an array.
  + See [[doc/DETAILS.org#representation][doc/DETAILS.org#representation]] .

** Dependencies

This library is *at least* tested on implementation listed below (note: I am lazy to update the version list below, but I regularly use it on much newer versions and never encountered a problem. As of writing, it works on 2.0.5.) :

+ SBCL 1.4.12 on X86-64 Linux 4.4.0-141-generic (author's environment)
+ SBCL 1.5.1  on X86-64 Linux 4.4.0-141-generic (author's environment)
+ SBCL 2.0.1  on X86-64 Ubuntu 16.04.6 LTS Linux 4.15.0-1028-gcp
+ ccl-1.11.5  on X86-64 Ubuntu 16.04.6 LTS Linux 4.15.0-1028-gcp
+ SBCL 2.0.1  on X86-64 Mac OS X 10.13.6
+ ccl-1.11.5  on X86-64 Mac OS X 10.13.6
+ SBCL 2.0.0  on X86-64 Windows Server, version 1809
+ SBCL 2.0.0  on Arm64   Ubuntu 16.04.6 LTS Linux 5.3.0-19-generic
+ SBCL 1.5.8  on ppc64le Ubuntu 16.04.6 LTS Linux 5.0.0-37-generic

Dependency graph:

[[./numcl.png]]

** Author, License, Copyright

Masataro Asai (guicho2.71828@gmail.com)

Licensed under LGPL v3.

Copyright (c) 2019 IBM Corporation




2 Systems

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


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

2.1 numcl

Numpy clone in Common Lisp, using MAGICL/LLA/MGL-MAT as the backend (in the future)

Author

Masataro Asai

Contact

guicho2.71828@gmail.com

Home Page

https://github.com/numcl/numcl

License

LGPL

Version

0.2.0

Dependencies
  • trivia (system).
  • alexandria (system).
  • iterate (system).
  • type-r (system).
  • constantfold (system).
  • lisp-namespace (system).
  • cl-randist (system).
  • float-features (system).
  • function-cache (system).
  • specialized-function (system).
  • gtype (system).
Source

numcl.asd.

Child Component

src (module).


Next: , Previous: , Up: The numcl Reference Manual   [Contents][Index]

3 Modules

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


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

3.1 numcl/src

Source

numcl.asd.

Parent Component

numcl (system).

Child Components

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   [Contents][Index]

4.1.1 numcl/numcl.asd

Source

numcl.asd.

Parent Component

numcl (system).

ASDF Systems

numcl.


4.1.2 numcl/src/0package.lisp

Source

numcl.asd.

Parent Component

src (module).

Packages

4.1.3 numcl/src/0specialops.lisp

Dependency

0package.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.4 numcl/src/1version.lisp

Dependency

0specialops.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface

numcl-version (function).

Internals

make-version-string (function).


4.1.5 numcl/src/1constantfolded.lisp

Dependency

1version.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.6 numcl/src/1constants.lisp

Dependency

1constantfolded.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.7 numcl/src/1docstrings.lisp

Dependency

1constants.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.8 numcl/src/1instantiate.lisp

Dependency

1docstrings.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

%make-array (function).


4.1.9 numcl/src/1type.lisp

Dependency

1instantiate.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.10 numcl/src/1util.lisp

Dependency

1type.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.11 numcl/src/2alias.lisp

Dependency

1util.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface

4.1.12 numcl/src/2aref.lisp

Dependency

2alias.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.13 numcl/src/2typeinfer.lisp

Dependency

2aref.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.14 numcl/src/3arange.lisp

Dependency

2typeinfer.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.15 numcl/src/3array.lisp

Dependency

3arange.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface

asarray (function).

Internals

4.1.16 numcl/src/3copy.lisp

Dependency

3array.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface

4.1.17 numcl/src/3einsum.lisp

Dependency

3copy.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.18 numcl/src/3zeros.lisp

Dependency

3einsum.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

+zeros-doc+ (special variable).


4.1.19 numcl/src/4concatenate.lisp

Dependency

3zeros.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface

4.1.20 numcl/src/4einsum-backends/common-lisp.lisp

Dependency

4concatenate.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Internals

4.1.21 numcl/src/4linear-algebra2.lisp

Dependency

4einsum-backends/common-lisp.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.22 numcl/src/4linear-algebra3.lisp

Dependency

4linear-algebra2.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.23 numcl/src/5numeric.lisp

Dependency

4linear-algebra3.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.24 numcl/src/5random.lisp

Dependency

5numeric.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface

4.1.25 numcl/src/5reduce.lisp

Dependency

5random.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

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

4.1.26 numcl/src/5where.lisp

Dependency

5reduce.lisp (file).

Source

numcl.asd.

Parent Component

src (module).

Public Interface
Internals

%array-index-from-row-major-index/vector (function).


5 Packages

Packages are listed by definition order.


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

5.1 numcl.impl

Internal package for implementing numcl.

Source

0package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • constantfold.
  • gtype.
  • iterate.
  • numcl.exported.
  • specialized-function.
  • trivia.level2.
  • type-r.
Internals

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

5.2 numcl

NUMCL defines several symbols which have the same name as the corresponding CL symbols. We call them **conflicting symbols**. To avoid the confusion in the code base, we use 3 packages: NUMCL.EXPORTED, NUMCL.IMPL, NUMCL.

This package replaces COMMON-LISP package by shadowing-import symbols from NUMCL.EXPORTED on top of COMMON-LISP package.

Source

0package.lisp.

Use List

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

5.3 numcl.exported

External package for storing the exported symbols.

Source

0package.lisp.

Used By List
Public Interface

6 Definitions

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


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

6.1 Public Interface


6.1.1 Symbol macros

Symbol Macro: *
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: **
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: ***
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: +
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: ++
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: +++
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: /
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: //
Package

numcl.exported.

Source

5numeric.lisp.

Symbol Macro: ///
Package

numcl.exported.

Source

5numeric.lisp.


6.1.2 Compiler macros

Compiler Macro: arange (&rest args)
Package

numcl.exported.

Source

3arange.lisp.

Compiler Macro: broadcast (function x y &key type atomic)

For binary functions

Package

numcl.exported.

Source

5numeric.lisp.

Compiler Macro: diag (a &optional result)

Return the diagonal element of a matrix as a vector

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: einsum (subscripts &rest args)
Package

numcl.exported.

Source

3einsum.lisp.

Compiler Macro: eye (n &key m k type)

Returns a matrix whose k-th diagnonal filled with 1.
N,M specifies the shape of the return array. K will adjust the sub-diagonal – positive K moves it upward.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: inner (a b &optional result)

Inner product of two vectors.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: kron (a b &optional result)

Compute the kronecker product of two vectors.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: map-array-into (result-sequence function &rest sequences)
Package

numcl.exported.

Source

5numeric.lisp.

Compiler Macro: matmul (a b &optional result)

Matrix product of two arrays.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: matmul* (&rest args)
Package

numcl.exported.

Source

4linear-algebra3.lisp.

Compiler Macro: outer (a b &optional result)

Compute the outer product of two vectors.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: transpose (matrix &optional result)

Reverses the axes of an array.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: tri (n &key m k type)

Returns a triangle matrix whose lower diagnonal (including the diagonal) filled with 1.
N,M specifies the shape of the return array. K will adjust the sub-diagonal – positive K fills more 1s.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: tril (matrix &optional k)

Returns the copy of matrix with elements above the k-th diagonal zeroed. Positive K fills less 0s.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: triu (matrix &optional k)

Returns the copy of matrix with elements below the k-th diagonal zeroed. Positive K fills more 0s.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: vander (v &key n increasing)

Returns a matrix where M[i,j] == V[i]^(N-j) when increasing is false (default), and M[i,j] == V[i]^j when increasing is true.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Compiler Macro: vdot (a b &optional result)

Dot product of two vectors. For complex values, the first value is conjugated.

Package

numcl.exported.

Source

4linear-algebra2.lisp.


6.1.3 Ordinary functions

Function: * (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: + (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: - (first &rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: / (first &rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: /= (x y &rest more)
Package

numcl.exported.

Source

5numeric.lisp.

Function: 1+ (array)
Package

numcl.exported.

Source

5numeric.lisp.

Function: 1- (array)
Package

numcl.exported.

Source

5numeric.lisp.

Function: < (x y &rest more)
Package

numcl.exported.

Source

5numeric.lisp.

Function: <= (x y &rest more)
Package

numcl.exported.

Source

5numeric.lisp.

Function: = (x y &rest more)
Package

numcl.exported.

Source

5numeric.lisp.

Function: > (x y &rest more)
Package

numcl.exported.

Source

5numeric.lisp.

Function: >= (x y &rest more)
Package

numcl.exported.

Source

5numeric.lisp.

Function: abs (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: acos (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: acosh (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: amax (array &rest args &key axes type)
Package

numcl.exported.

Source

5reduce.lisp.

Function: amin (array &rest args &key axes type)
Package

numcl.exported.

Source

5reduce.lisp.

Function: arange (&rest args)

Arange’s argument signature is irregular, following the API of numpy. The interpretation of its arguments depends on the number of arguments.

(arange stop &key type)
(arange start stop &key type)
(arange start stop step &key type)

Don’t worry, we provide a compiler-macro to avoid the runtime dispatch.

Package

numcl.exported.

Source

3arange.lisp.

Function: aref (array &rest subscripts)

An extended ‘aref‘ that accepts ranges as lists, similar to numpy’s array access. For a 3D array x,

* range

“‘
x[1:5,2,3] = (aref x ’(1 5) 2 3)
x[2,1:5,3] = (aref x 2 ’(1 5) 3)
x[2,1:2:5,3] = (aref x 2 ’(1 2 5) 3)
x[2,1:,3] = (aref x 2 ’(1 t) 3)
x[2,:1,3] = (aref x 2 ’(t 1) 3)
x[2,:,3] = (aref x 2 ’(t t) 3)
x[2,:,3] = (aref x 2 t 3)
“‘

* insufficient axis

“‘commonlisp
(aref x ’(1 5)) == (aref x ’(1 5) t t)
(aref x 2 ’(1 5)) == (aref x 2 ’(1 5) t)
“‘

* newaxis

“‘commonlisp
(aref x ’(1 2 5) nil 2 3)
“‘

* ellipsis

“‘commonlisp
(aref x ’- 2) = (aref x t t 2) = x[...,2]
(aref x 2 ’-) = (aref x 2 t t) = x[2,...]
(aref x 2 ’- 3) = (aref x 2 t 3) = x[2,...,3]
(aref x 2 3 ’-) = (aref x 2 3 t) = x[2,3,...]
“‘

Package

numcl.exported.

Source

2aref.lisp.

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

numcl.exported.

Source

2aref.lisp.

Function: argwhere (array fn)

Returns a list of the multidimentional indices of the elements which satisfies the predicate FN. Note that the list elements are the multidimentional indices, even for a single-dimensional array.

Package

numcl.exported.

Source

5where.lisp.

Function: array-index-from-row-major-index (array row-major-index)

Takes a multidimentional array and a row-major-index. Returns a list containing the normal index.

Package

numcl.exported.

Source

5where.lisp.

Function: asarray (contents &key type)

Note: ASARRAY is *SLOW* as it recurses into the substructures.

Copy ‘CONTENTS‘ to a new array.
When ‘CONTENTS‘ is a multidimentional array, its elements are copied to a new array that guarantees the NUMCL assumption. When ‘CONTENTS‘ is a nested sequence, it is traversed up to the depth that guarantees the sane shape for an array. When elements are copied, it is coerced to TYPE.
When TYPE is not given, it is replaced with the float-contagion type deduced from the elements of ‘CONTENTS‘.
It may return a 0-dimensional array with ‘CONTENTS‘ being the only element.

For example:

“‘lisp
;; a vector of two lists.
(asarray ’((1) (1 2))) -> #((1) (1 2))
;; a 2D array of 4 lists.
(asarray ’(((1) (1 2)) ((3) (3 4)))) -> #2A(((1) (1 2)) ((3) (3 4)))

(asarray ’((1 2) (3 4))) -> #2A((1 2) (3 4))
(asarray #(#(1 2) #(3 4))) -> #2A((1 2) (3 4))
(asarray #((1 2) (3 4))) -> #2A((1 2) (3 4))
“‘

However, this behavior may not be ideal because the resulting shape could be affected by the lengths of the strings.

“‘lisp
(asarray #(#(1 2) #(3 4))) -> #2A((1 2) (3 4))
(asarray #(#(1 2) #(3 4 5))) -> #(#(1 2) #(3 4 5))

(asarray #("aa" "aa")) -> #2A((#a #a) (#a #a))
(asarray #("aa" "aaa")) -> #("aa" "aaa")
“‘

As a remedy to this problem, we allow TYPE to be a specifier for vector subtypes. Providing such a type specifier will keep the leaf objects (e.g. strings) from split into individual elements.
We don’t allow it to be a multidimentional array [at the moment.]

“‘lisp
(asarray #(#(1 2) #(3 4)) :type ’(array fixnum (*))) -> #(#(1 2) #(3 4))
(asarray #(#(1 2) #(3 4 5)) :type ’(array fixnum (*))) -> #(#(1 2) #(3 4 5))

(asarray #("aa" "aa") :type ’string) -> #("aa" "aa")
(asarray #("aa" "aaa") :type ’string) -> #("aa" "aaa")

(asarray ’((1 2) (3 4)) :type ’(array fixnum (* *))) -> error
“‘

Package

numcl.exported.

Source

3array.lisp.

Function: asin (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: asinh (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: astype (array type)
Package

numcl.exported.

Source

3copy.lisp.

Function: atan (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: atanh (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: avg (array &key axes)
Package

numcl.exported.

Source

5reduce.lisp.

Function: bernoulli (p &optional shape)

Returns a bit array whose elements are 1 with probability P

Package

numcl.exported.

Source

5random.lisp.

Function: bernoulli-like (a)
Package

numcl.exported.

Source

5random.lisp.

Function: beta (a b &optional shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: binomial (n p &optional shape)
Package

numcl.exported.

Source

5random.lisp.

Function: broadcast (function x y &key type atomic)

For binary functions

Package

numcl.exported.

Source

5numeric.lisp.

Function: ceiling (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: cis (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: clip (array min max)
Package

numcl.exported.

Source

5numeric.lisp.

Function: concatenate (arrays &key axis out)
Package

numcl.exported.

Source

4concatenate.lisp.

Function: conjugate (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: copy (array)
Package

numcl.exported.

Source

3copy.lisp.

Function: cos (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: cosh (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: denominator (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: diag (a &optional result)

Return the diagonal element of a matrix as a vector

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: dtype (array)
Package

numcl.exported.

Source

2alias.lisp.

Function: einsum (subscripts &rest args)

Note: Broadcasting with ‘EINSUM‘ is experimental.

Performs Einstein’s summation.
The SUBSCRIPT specification is significantly extended from that of Numpy
and can be seens as a full-brown DSL for array operations.

SUBSCRIPTS is a sequence of the form ‘(<ISPEC>+ [-> <TRANSFORM>*] [-> <OSPEC>*] [-> <IOPTION>*] [-> <OOPTION>*])‘.
The remaining arguments ARGS contain the input arrays and optionally the output arrays.

Inputs are interpreted in the following rule, depending on the number of arrows.

“‘commonlisp
(<ISPEC>+)
(<ISPEC>+ -> <OSPEC>*)
(<ISPEC>+ -> <TRANSFORM>* -> <OSPEC>*)
(<ISPEC>+ -> <TRANSFORM>* -> <OSPEC>* -> <IOPTION>*)
(<ISPEC>+ -> <TRANSFORM>* -> <OSPEC>* -> <IOPTION>* -> <OOPTION>*)
“‘

# SPEC

The first set of SPECs specifies the input subscripts,
and the second set of SPECs specifies the output subscripts.
Unlike Numpy, there can be multiple output subscripts:
It can performs multiple operations in the same loop, then return multiple values.
The symbol ‘->‘ can be a string and can belong to any package because it is compared by ‘STRING=‘.

Each SPEC is an string designator, such as a symbol IJK or a string "IJK",
where each character is considered as an index.
Broadcasting can be specified by a hyphen.
It signals a type-error when it contains any non-alpha char except hyphens (-).
Note that a symbol NIL is interpreted as an empty list rather than N, I and L.
Once broadcasting is used in one input, it must be used in all inputs/outputs.

Alternatively, each SPEC can be a list that contains a list of symbols.
For example, ‘((i j) (j k) -> (i k))‘ and ‘(ij jk -> ik)‘ are equivalent.

When -> and the output SPECs are omitted, a single output is assumed and its spec is
a union of the input specs.
For example, ‘(ij jk)‘ is equivalent to ‘(ij jk -> ijk)‘.
Note that ‘(ij jk)‘ and ‘(ij jk ->)‘ have the different meanings:
The latter sums up all elements.

# TRANSFORM

TRANSFORM is a list of element-wise operations.
The number of TRANSFORM should correspond to the number of outputs.
In each TRANSFORM, the elements in the input arrays can be referenced by $N, where N is a 1-indexed number.
Similarly the output array can be referred to by @N.

+ Example: ‘(ij ik -> (+ @1 (* $1 $2)) -> ik)‘ is equivalent to ‘(ij ik -> ik)‘ (a GEMM).
+ Example: ‘(i -> (sin $1) -> i)‘ is equivalent to mapping a sin function to an array.

By default, TRANSFORM is ‘(+ @1 (* $1 ... $N))‘ for N inputs, which is equivalent to Einstein’s summation.

# OPTION

Each OPTION is a list of iteration specifiers.
Iteration specifier is a form ‘(index &key (start 0) (end -1) (step 1))‘.
‘START‘ and ‘END‘ are the forms specifying the interval designator of the loop range, which supersedes the default full-width loop. ‘STEP‘ is a form specifying the increment of the index.
‘INDEX‘ is a symbol which should match one of the subscripts used in one of the ‘SPEC‘.

For example, you can specify

“‘commonlisp
(einsum ’(ij jk -> (+ @1 (* $1 $2)) -> ik -> ((j :step 2)) ((j :step 3)))
(ones ’(5 10))
(ones ’(15 5)))
“‘

to suggest that
the index ‘j‘ for the first array should have a stride of 2,
and the index ‘j‘ for the second array should have a stride of 3.

This is fairly complex, but we hope to provide the maximum flexibility.

# ARGS

The shape of each input array should unify against the corresponding input spec. For example,
with a spec ‘IJI‘, the input array should be of rank 3 as well as
the 1st and the 3rd dimension of the input array should be the same.
Note that this is affected by ‘OPTIONS‘ — when specified,
it uses the number of iteration instead of the size of the dimension.

The shape of each output array is determined by the corresponding output spec.
For example, if ‘SUBSCRIPTS‘ is ‘(ij jk -> ik)‘
and the input arrays are NxM and MxL matrices, the output has a shape NxL.

If the output arrays are provided, their shapes and types are also checked against the
corresponding output spec. The types should match the result of the numerical
operations on the elements of the input arrays.

The outputs are calculated in the following rule.

+ The output array types are calculated based on the ‘TRANSFORM‘, and
the shapes are calcurated based on the ‘SPEC‘ and the input arrays.
+ The output arrays are allocated and initialized by zeros.
+ Einsum nests one loop for each index in the input specs.
For example, ‘(ij jk -> ik)‘ results in a triple loop.
+ In the innermost loop, each array element is bound to ‘$1..$N‘ / ‘@1..@N‘.
+ For each ‘@i‘, ‘i‘-th transform is evaluated and assigned to ‘@i‘.

+ If the same index appears multiple times in a single spec,
they share the same value in each iteration.
For example, ‘(ii -> i)‘ returns the diagonal elements of the matrix.

When TRANSFORMs are missing, it follows naturally from the default ‘TRANSFORM‘ values that

+ When an index used in the input spec is missing in the output spec,
the axis is aggregated over the iteration by summation.
+ If the same index appears across the different input specs,
the element values from the multiple input arrays are aggregated by multiplication.
For example, ‘(ij jk -> ik)‘ will perform
‘(setf (aref a2 i k) (* (aref a0 i j) (aref a1 j k)))‘
when a0, a1 are the input arrays and a2 is the output array.

For example, ‘(einsum ’(ij jk) a b)‘ is equivalent to:

“‘commonlisp
(dotimes (i <max> <output>)
(dotimes (j <max>)
(dotimes (k <max>)
(setf (aref <output> i j k) (* (aref a i j) (aref b j k))))))
“‘

# Performance

If ‘SUBSCRIPTS‘ is a constant, the compiler macro
builds an iterator function and make them inlined. Otherwise,
a new function is made in each call to einsum, resulting in a large bottleneck.
(It could be memoized in the future.)

The nesting order of the loops are automatically decided based on the specs.
The order affects the memory access pattern and therefore the performance due to
the access locality. For example, when writing a GEMM which accesses three matrices
by ‘(setf (aref output i j) (* (aref a i k) (aref b k j)))‘,
it is well known that ikj-loop is the fastest among other loops, e.g. ijk-loop.
EINSUM reorders the indices so that it maximizes the cache locality.

Package

numcl.exported.

Source

3einsum.lisp.

Function: empty (shape &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: empty-like (array &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: exp (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: expand-dims (a axes)

axes: an int or a list of ints

Package

numcl.exported.

Source

2alias.lisp.

Function: exponential (scale &optional shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: expt (base power)
Package

numcl.exported.

Source

5numeric.lisp.

Function: eye (n &key m k type)

Returns a matrix whose k-th diagnonal filled with 1.
N,M specifies the shape of the return array. K will adjust the sub-diagonal – positive K moves it upward.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: f (dfnum dfden &optional shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: fceiling (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: ffloor (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: flatten (a)
Package

numcl.exported.

Source

2alias.lisp.

Function: floor (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: fround (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: ftruncate (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: full (shape value &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: full-like (array value &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: gamma (k &optional theta shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: histogram (array &key low high split)

Returns a fixnum vector representing a histogram of values. The interval between LOW and HIGH are split by STEP value. All values less than LOW are put in the 0-th bucket;
All values greater than equal to HIGH are put in the last bucket.

Package

numcl.exported.

Source

5reduce.lisp.

Function: imagpart (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: inner (a b &optional result)

Inner product of two vectors.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: integer-length (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: isqrt (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: kron (a b &optional result)

Compute the kronecker product of two vectors.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: length (array)
Package

numcl.exported.

Source

2alias.lisp.

Function: linspace (start stop &key num endpoint type)
Package

numcl.exported.

Source

3arange.lisp.

Function: log (x)

Logarithmic function.
Unlike Common Lisp LOG, it assumes that the input is a positive real, in favor of efficiency. Another reason is that most Common Lisp implementations do not have specialized arrays for positive-only / negative-only floats, thus the runtime type inference cannot deduce whether the resulting array element type have to be a complex or a real.

Package

numcl.exported.

Source

5numeric.lisp.

Function: log2 (x)

Logarithm of base 2.

Package

numcl.exported.

Source

5numeric.lisp.

Function: logand (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logandc1 (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logandc2 (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logc (x)

Logarithmic function.
This function behaves exactly like Common Lisp LOG.
Unless it can be proven from the input array element type, such as the input being
a specialized array of unsigned-int, it takes a conservative approach, i.e., it returns arrays specialized to the complex numbers.

Package

numcl.exported.

Source

5numeric.lisp.

Function: logcount (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logeqv (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logior (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: lognand (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: lognor (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: lognot (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logorc1 (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logorc2 (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: logxor (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: map (result-type function &rest sequences)
Package

numcl.exported.

Source

5numeric.lisp.

Function: map-array (function &rest sequences)
Package

numcl.exported.

Source

5numeric.lisp.

Function: map-array-into (result-sequence function &rest sequences)
Package

numcl.exported.

Source

5numeric.lisp.

Function: map-into (result-sequence function &rest sequences)
Package

numcl.exported.

Source

5numeric.lisp.

Function: matmul (a b &optional result)

Matrix product of two arrays.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: matmul* (&rest args)

Takes an arbitrary number of matrices and performs multiplication, optimizing the order using the shape information and the associativity to minimize the size of the intermediate matrix.

Package

numcl.exported.

Source

4linear-algebra3.lisp.

Function: max (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: mean (array &key axes)
Package

numcl.exported.

Source

5reduce.lisp.

Function: min (&rest args)
Package

numcl.exported.

Source

5numeric.lisp.

Function: mod (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: multinomial (n pvals &optional shape)

pvals is a sequence of probabilities summing up to 1.

Package

numcl.exported.

Source

5random.lisp.

Function: negative-binomial (n p &optional shape)
Package

numcl.exported.

Source

5random.lisp.

Function: nonzero (array)

collect multidimentional indices where the element is nonzero

Package

numcl.exported.

Source

5where.lisp.

Function: normal (&optional mean var shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: numcl-array-p (array)

Returns true when ARRAY satisfies the NUMCL assumption, that is, an array displaced to a non-displaced 1D array.

Package

numcl.exported.

Source

1type.lisp.

Function: numcl-version ()

Returns a string that represents the version of NUMCL currently installed.

Package

numcl.exported.

Source

1version.lisp.

Function: numerator (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: ones (shape &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: ones-like (array &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: outer (a b &optional result)

Compute the outer product of two vectors.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: phase (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: poisson (&optional lambda shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: prod (array &rest args &key axes type)
Package

numcl.exported.

Source

5reduce.lisp.

Function: rank (array)
Package

numcl.exported.

Source

2alias.lisp.

Function: realpart (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: reduce-array (fn array &key axes type initial-element)
Package

numcl.exported.

Source

5reduce.lisp.

Function: rem (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: reshape (a shape)

Reshape the array while sharing the backing 1D array.
-1 implies that the axis size is deduced from the other axes. At most one axis is allowed to be -1.
T implies that the axis size is preserved. It can be used as many times, but only at the right/leftmost axes.

Example of reshaping (3 8 5):

valid:

(6 -1 10) = (6 2 10)
(t 2 2 2 t) = (3 2 2 2 5)
(3 t t) = (3 8 5)
(2 -1 2 2 t) = (2 3 2 2 5)

invalid:

(2 t 2 2 t)

Package

numcl.exported.

Source

2alias.lisp.

Function: round (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: shape (array)
Package

numcl.exported.

Source

2alias.lisp.

Function: shuffle (array-or-sequence &key start end)

This code extends alexandria:shuffle.
It additionally accepts arrays and shuffles the elements according to the first axis, viewing the remaining axes as one "element".

Original documentation:

Returns a random permutation of SEQUENCE bounded by START and END.
Original sequence may be destructively modified, and (if it contains
CONS or lists themselv) share storage with the original one.
Signals an error if SEQUENCE is not a proper sequence.

Package

numcl.exported.

Source

5random.lisp.

Function: signum (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: sin (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: sinh (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: size (array)
Package

numcl.exported.

Source

2alias.lisp.

Function: sqrt (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: square (x)

Square function f(x)= x * x.

Package

numcl.exported.

Source

5numeric.lisp.

Function: squeeze (a)
Package

numcl.exported.

Source

2alias.lisp.

Function: stack (arrays &key axis out)
Package

numcl.exported.

Source

4concatenate.lisp.

Function: standard-deviation (array &key axes)
Package

numcl.exported.

Source

5reduce.lisp.

Function: stdev (array &key axes)
Package

numcl.exported.

Source

5reduce.lisp.

Function: sum (array &rest args &key axes type)
Package

numcl.exported.

Source

5reduce.lisp.

Function: take (array indices)

Collect the elements using a list of multidimentional indices (in a format returned by WHERE).

Package

numcl.exported.

Source

5where.lisp.

Function: tan (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: tanh (x)
Package

numcl.exported.

Source

5numeric.lisp.

Function: to-simple-array (array)

Returns a simple array of the equivalent contents.

Package

numcl.exported.

Source

2alias.lisp.

Function: transpose (matrix &optional result)

Reverses the axes of an array.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: tri (n &key m k type)

Returns a triangle matrix whose lower diagnonal (including the diagonal) filled with 1.
N,M specifies the shape of the return array. K will adjust the sub-diagonal – positive K fills more 1s.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: tril (matrix &optional k)

Returns the copy of matrix with elements above the k-th diagonal zeroed. Positive K fills less 0s.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: triu (matrix &optional k)

Returns the copy of matrix with elements below the k-th diagonal zeroed. Positive K fills more 0s.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: truncate (number &optional divisor)
Package

numcl.exported.

Source

5numeric.lisp.

Function: uniform (&optional low high shape type)
Package

numcl.exported.

Source

5random.lisp.

Function: unstack (array &key axis)
Package

numcl.exported.

Source

4concatenate.lisp.

Function: vander (v &key n increasing)

Returns a matrix where M[i,j] == V[i]^(N-j) when increasing is false (default), and M[i,j] == V[i]^j when increasing is true.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: var (array &key axes)
Package

numcl.exported.

Source

5reduce.lisp.

Function: variance (array &key axes)
Package

numcl.exported.

Source

5reduce.lisp.

Function: vdot (a b &optional result)

Dot product of two vectors. For complex values, the first value is conjugated.

Package

numcl.exported.

Source

4linear-algebra2.lisp.

Function: where (array fn)

Returns a list of list of indices of the elements which satisfies the predicate FN. The first list contains the indices for the 1st dimension,
the second list contains the indices for the 2nd dimension, and so on.

Package

numcl.exported.

Source

5where.lisp.

Function: zeros (shape &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.

Function: zeros-like (array &key type)

Equivalent of the same function in numpy. Note the default ‘type‘ difference.

+ ‘empty‘ : does not explicitly fill the array. In an unsafe compiler setting, junk value may appear.
+ ‘full‘ : fill the array with a certain value.
+ ‘zeros‘, ‘ones‘ : fill the array with zeros / ones. ‘type‘ affects the actual value being filled.
+ ‘X-like‘ : similar to above functions, but takes another array and returns the array of the same shape.

Package

numcl.exported.

Source

3zeros.lisp.


6.1.4 Generic functions

Generic Reader: invalid-array-index-error-axis (condition)
Generic Writer: (setf invalid-array-index-error-axis) (condition)
Package

numcl.exported.

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

2aref.lisp.

Target Slot

axis.

Generic Reader: invalid-array-index-error-shape (condition)
Generic Writer: (setf invalid-array-index-error-shape) (condition)
Package

numcl.exported.

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

2aref.lisp.

Target Slot

shape.

Generic Reader: invalid-array-index-error-subscripts (condition)
Generic Writer: (setf invalid-array-index-error-subscripts) (condition)
Package

numcl.exported.

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

2aref.lisp.

Target Slot

subscripts.


Previous: , Up: Public Interface   [Contents][Index]

6.1.6 Types

Type: numcl-array (&optional element-type dimensions)

Type specifier for the arrays satifying the NUMCL assumption, that is, an array displaced to a non-displaced 1D array.

Package

numcl.exported.

Source

1type.lisp.


6.2 Internals


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

6.2.1 Constants

Constant: *numcl-default-float-format*

The default format for numcl arrays. Bignums and ratios are coerced into this type during computation.

Package

numcl.impl.

Source

1constants.lisp.

Constant: +quater+
Package

numcl.impl.

Source

2typeinfer.lisp.


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

6.2.2 Special variables

Special Variable: *compiler*
Package

numcl.impl.

Source

3einsum.lisp.

Special Variable: *inferer-doc-table*
Package

numcl.impl.

Source

2typeinfer.lisp.

Special Variable: *inferer-table*
Package

numcl.impl.

Source

2typeinfer.lisp.

Special Variable: *initialized-idxs*
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Special Variable: *memoized-einsum-function-cache*
Package

numcl.impl.

Source

3einsum.lisp.

Special Variable: *used-evars*
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Special Variable: +zeros-doc+
Package

numcl.impl.

Source

3zeros.lisp.


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

6.2.3 Symbol macros

Symbol Macro: %float%
Package

numcl.impl.

Source

1type.lisp.

Symbol Macro: *aref-documentation*
Package

numcl.impl.

Source

1docstrings.lisp.

Symbol Macro: *asarray-documentation*
Package

numcl.impl.

Source

1docstrings.lisp.

Symbol Macro: *einsum-documentation*
Package

numcl.impl.

Source

1docstrings.lisp.


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

6.2.4 Macros

Macro: %when-function-is-global (&body body)

Internal use only! assumes a fixed set of variable names

Package

numcl.impl.

Source

5numeric.lisp.

Macro: compile-time-type-of (variable)
Package

numcl.impl.

Source

1type.lisp.

Macro: define-foldable-version (symbol)

This macro defines a constant-foldable variant of the standard functions, such
as list or a vector. The functions in 1constantfolded.lisp mainly consists of sequense functions.

Standard functions, e.g. list, require that a new object (a list) is created every time. However, there are many cases in numcl that it is preferable to constant-fold them
assuming that the result value is only used as a compile-time constant.

These are typically the functions that are declared flushable but not foldable in SBCL.
We do not include copier functions.

New functions are named with an additional C in the beginning. For example,
CLIST is a constant-foldable version of LIST.

We thank Baggers’ TAMEI library for the reference database.

Package

numcl.impl.

Source

1constantfolded.lisp.

Macro: define-simple-mapper (numcl-fn cl-fn &optional docstring)
Package

numcl.impl.

Source

5numeric.lisp.

Macro: do (bindings (end-test-form &body result-form) &body body)

A DO wrapper that recognizes DERIVE declaration.

Package

numcl.impl.

Source

0specialops.lisp.

Macro: do* (bindings (end-test-form &body result-form) &body body)

A DO* wrapper that recognizes DERIVE declaration.

Package

numcl.impl.

Source

0specialops.lisp.

Macro: in-current-package (&body body)

Bind *package* to the load-time-value of *package*.
Used frequently for controlling the default package for the reader.

Package

numcl.impl.

Source

1util.lisp.

Macro: inline-except-toplevel ((&key) &body defun-form)

Takes a DEFUN form, then return a PROGN containing two versions of the defun form:
One is the original form, and another, which have the same definition (arguments and body) but has the name prefixed with ‘inlinable-‘. This inlinable- version is declared inline. Furthermore, it defines the compiler-macro for the original function
which expands to the inlinable version when ‘*compile-file-pathanme*‘ is set in the compile time. This way it prevents inlining in the REPL.

This macro is important for certain functions (e.g. MATMUL) that contain delayed compilation using specialized-function, mainly EINSUM.
We want those functions to be inline-expanded (to expose EINSUM) which is later fused with other EINSUMs. However, when the function is used on the toplevel form (e.g. REPL)
without this macro, it always expands to EINSUM and thus always creates a new function table.

Package

numcl.impl.

Source

1util.lisp.

Macro: let (bindings &body body)

A LET wrapper that recognizes DERIVE declaration.

Package

numcl.impl.

Source

0specialops.lisp.

Macro: let* (bindings &body body)

A LET wrapper that recognizes DERIVE declaration.

Package

numcl.impl.

Source

0specialops.lisp.

Macro: locally (&body body)

A LET wrapper that recognizes DERIVE declaration.

Package

numcl.impl.

Source

0specialops.lisp.

Macro: printing (&body body)

debugging function – A progn that prints each form in the body

Package

numcl.impl.

Source

1util.lisp.

Macro: without-* (&body body)

Internal macro

Package

numcl.impl.

Source

1type.lisp.


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

6.2.5 Compiler macros

Compiler Macro: %arange-infer-type (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: %coerce (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: bind-to-float-type (&rest args)

Performs constant-folding for commutative and associative functions. Following optimization is performed:

(+ a 2 3 b 1) –> (+ (+ 2 3 1) a b) –> (+ 6 a b)

Package

numcl.impl.

Alias for

foldable-commutative-associative-fn.

Compiler Macro: cacons (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cadjoin (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cappend (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-and (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-andc1 (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-andc2 (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-eqv (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-ior (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-nand (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-nor (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-not (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-orc1 (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-orc2 (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cbit-xor (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cconcatenate (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: ccons (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cintersection (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cldiff (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: clist (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: clist* (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmake-array (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmake-list (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmake-sequence (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmake-string (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmap (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmapcar (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cmaplist (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cpairlis (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: creduce (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cremove (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cremove-duplicates (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cremove-if (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cremove-if-not (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: creverse (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cset-difference (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cset-exclusive-or (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring-capitalize (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring-downcase (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring-left-trim (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring-right-trim (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring-trim (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cstring-upcase (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csublis (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubseq (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubst (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubst-if (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubst-if-not (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubstitute (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubstitute-if (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: csubstitute-if-not (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cunion (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: cvector (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: float-contagion (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: float-substitution (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: float-to-integer-p (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: intersection-to-float-type (&rest args)

Performs constant-folding for commutative and associative functions. Following optimization is performed:

(+ a 2 3 b 1) –> (+ (+ 2 3 1) a b) –> (+ 6 a b)

Package

numcl.impl.

Alias for

foldable-commutative-associative-fn.

Compiler Macro: most-negative-value (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: most-positive-value (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: one-value (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.

Compiler Macro: union-to-float-type (&rest args)

Performs constant-folding for commutative and associative functions. Following optimization is performed:

(+ a 2 3 b 1) –> (+ (+ 2 3 1) a b) –> (+ 6 a b)

Package

numcl.impl.

Alias for

foldable-commutative-associative-fn.

Compiler Macro: zero-value (&rest args)

Performs a simple constant-folding. Constantfold when all arguments are constants.

Package

numcl.impl.

Alias for

foldable-fn.


6.2.6 Ordinary functions

Function: $ (i)

Variable for the input array element

Package

numcl.impl.

Source

3einsum.lisp.

Function: %%arange (start stop step type)
Package

numcl.impl.

Source

3arange.lisp.

Function: %%expand-decls (decl env)
Package

numcl.impl.

Source

0specialops.lisp.

Function: %add-two-cases (first second)

Compares two cases of what previous thing returns and returns the best one.

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: %arange (start stop step type)
Package

numcl.impl.

Source

3arange.lisp.

Function: %arange-infer-type (start stop step)
Package

numcl.impl.

Source

3arange.lisp.

Function: %aref (array subscripts)
Package

numcl.impl.

Source

2aref.lisp.

Function: %array-index-from-row-major-index/vector (array row-major-index &optional result)

Takes a multidimentional array and a row-major-index. Returns a vector containing the normal index.

Package

numcl.impl.

Source

5where.lisp.

Function: %aset-fill (newvar array subscripts)
Package

numcl.impl.

Source

2aref.lisp.

Function: %aset-replace (newvar shape array subscripts)
Package

numcl.impl.

Source

2aref.lisp.

Function: %build-tree (dimensions)

Builds an order tree of multiplications, dynamically solving it for all ranges.

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: %check-two-matrices (first second)

first and second are cons of a form (height width) in this case.
The function returns the dimensions of resulting thing and the number of multiplications requred. I work under assertion, that those matrices are actually multipliable => (= (cdr first) (car second)).

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: %coerce (object type)

COERCE that additionally converts NUMBER into INTEGER by rounding, and NUMBER to (un/signed-byte N) by modular arithmetic.

Package

numcl.impl.

Source

1type.lisp.

Function: %dimension-step-size (spec array-index out-p)
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Function: %displace-at (array i)

Displace to the i-th element subarray in the first axis

Package

numcl.impl.

Source

2aref.lisp.

Function: %displace-range (array from to)

Displace to the subarray between FROM-th and TO-th element subarray in the first axis

Package

numcl.impl.

Source

2aref.lisp.

Function: %einsum-broadcast (iter-specs ev)
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Function: %einsum-early-binding (rest ev)
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Function: %einsum-leaf (ev)
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Function: %einsum-loop (iter-specs ev)
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Function: %einsum-normalize-subscripts (subscripts)

Normalizes the input to the einsum.
It first ’explodes’ each spec into the list form.
It then generates the default output form, if missing.

It then translates the index symbols into a number
based on the order of appearance; This should make
the specs with the different symbols into the canonical form,
e.g. ‘(ij jk -> ik)‘ and ‘(ik kj -> ij)‘ both results in something equivalent to
‘((0 1) (1 2) -> (0 2))‘.

The subscripts are converted into numbers in order to cache the resulting compiled function when einsum is called with a dynamically generated subscript.

It then inserts the default transforms, if missing.

The value returned is a plist of :i-specs, :transforms, :o-specs.
For example, ‘(einsum-normalize-subscripts ’(ik kj -> ij))‘ returns

“‘lisp
(:i-specs ((0 1) (1 2))
:transforms ((+ @1 (* $1 $2)))
:o-specs ((0 2)))
“‘

Broadcasting can be specified by a hyphen. For example, ’(-k -k -> -k)
is equivalent to numpy’s ellipses ’...k,...k->...k’ .
In the returned list, indices corresponding to the broadcasted axes are -1.

Package

numcl.impl.

Source

3einsum.lisp.

Function: %einsum-static (iter-specs ev)
Package

numcl.impl.

Source

4einsum-backends/common-lisp.lisp.

Function: %expand-decls (decls env)
Package

numcl.impl.

Source

0specialops.lisp.

Function: %index->matrix (operation indices matrices)

Tree of indexes -> tree of multiplications

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: %interpret-type (form)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: %interval-/= (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-< (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-<= (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-= (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-> (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval->= (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-add (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-ceiling (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-div (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-divlike (fn x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-fceiling (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-ffloor (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-floor (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-fround (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-ftruncate (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-max (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-min (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-mul (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-round (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-sub (x y)
Package

numcl.impl.

Source

1type.lisp.

Function: %interval-truncate (number divisor)
Package

numcl.impl.

Source

1type.lisp.

Function: %log2 (x)
Package

numcl.impl.

Source

5numeric.lisp.

Function: %log2-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: %logr (x)
Package

numcl.impl.

Source

5numeric.lisp.

Function: %make-array (shape &key element-type displaced-to displaced-index-offset initial-element)

The base function for creating a new array satisfying NUMCL-ARRAY-P. (See also: Type NUMCL-ARRAY.)

This function instantiates a fresh 1D array and returns another array
displaced to it with the specified shape. The 1D array is returned as the
secondary value.

The justification for this scheme is that some implementations (esp. SBCL)
require an indirection for accessing the array element (e.g. through
array-header in SBCL) even for a simple multi-dimentional array and thus using a
displacing array has essentially no performance penalty over using a simple
multi-dimentional array.

We also ensure that the length of the base arrays are the multiples of 8.
This ensures that the program can safely iterate over that extended region
with a future support for SIMD operations in mind.

When DISPLACED-TO is given, it should be a numcl array
and the returned array is displaced to its 1D backing array
with the same offsets as the DISPLACED-TO.

When DISPLACED-INDEX-OFFSET is also given, the actual offset is
the specified offset plus the original offset in DISPLACED-TO.

When DISPLACED-TO and ELEMENT-TYPE are given, the upgraded-array-element-type of ELEMENT-TYPE should be TYPE= to the actual array element type of DISPLACED-TO.

When DISPLACED-TO is given and ELEMENT-TYPE is not given,
ELEMENT-TYPE is simply the actual array element type of DISPLACED-TO.

Package

numcl.impl.

Source

1instantiate.lisp.

Function: %map-array-with-type (type function &rest sequences)
Package

numcl.impl.

Source

5numeric.lisp.

Function: %nested-coerce-and-insert (base-array contents newtype level)
Package

numcl.impl.

Source

3array.lisp.

Function: %normalize-subscript (subscript dim)

Returns a subscript object.

Package

numcl.impl.

Source

2aref.lisp.

Function: %ok-to-use-fn-specialized (function env)
Package

numcl.impl.

Source

5numeric.lisp.

Function: %output-generator (o-specs o-avars i-specs i-avars transforms)
Package

numcl.impl.

Source

3einsum.lisp.

Function: %output-result-shapes-match-p (o-broadcast-shapes plan)
Package

numcl.impl.

Source

3einsum.lisp.

Function: %reduce-array-result-type (array fn)
Package

numcl.impl.

Source

5reduce.lisp.

Function: %reduce-lambda (rvar avar fnvar current-axis dims sum-axes loop-index sum-index)
Package

numcl.impl.

Source

5reduce.lisp.

Function: %square (x)
Package

numcl.impl.

Source

5numeric.lisp.

Function: %straight-forward-check (sizes)

Naive atomic multiplications check for comparison

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: & (i)

Variable for the iteration count

Package

numcl.impl.

Source

3einsum.lisp.

Function: /=/2 (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: /=/bit (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: 1+-inferer (typespec)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: </2 (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: </bit (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: <=/2 (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: <=/bit (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: =/2 (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: =/bit (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: >/2 (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: >/bit (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: >=/2 (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: >=/bit (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: ? (i)

Variable for the iteration limit

Package

numcl.impl.

Source

3einsum.lisp.

Function: @ (i)

Variable for the output array element

Package

numcl.impl.

Source

3einsum.lisp.

Function: abs-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: acos-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: acosh-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: add-to-float-type (&rest typespecs)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: array-dimension* (array axes)

An extension of array-dimension that can handle multiple axes. — WIP

Package

numcl.impl.

Source

5reduce.lisp.

Function: asin-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: asinh-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: atan-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: atanh-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: base-array-p (array)

Returns true when ARRAY is a base array of numcl array.

Package

numcl.impl.

Source

1type.lisp.

Function: bind-to-float-type (&rest typespecs)

Returns the upper/lower bound of the number type specifiers.

Package

numcl.impl.

Source

1type.lisp.

Function: boolean-wrapper (x y more binary multiary)
Package

numcl.impl.

Source

5numeric.lisp.

Function: broadcast-p (x y)

Broadcasting the binary operation is allowed when
the axes in the right-aligned common subscripts of the arrays are same or either subscript is 1

Package

numcl.impl.

Source

5numeric.lisp.

Function: broadcast-result-shape (x y)
Package

numcl.impl.

Source

5numeric.lisp.

Function: cacons (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cadjoin (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cappend (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-and (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-andc1 (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-andc2 (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-eqv (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-ior (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-nand (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-nor (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-not (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-orc1 (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-orc2 (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cbit-xor (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cconcatenate (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: ccons (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: ceiling-inferer (x &optional y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: cintersection (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cldiff (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: clist (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: clist* (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmake-array (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmake-list (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmake-sequence (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmake-string (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmap (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmapcar (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cmaplist (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: complex-part-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: conjugate-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: copy-einsum-specs (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Function: copy-sub (instance)
Package

numcl.impl.

Source

2aref.lisp.

Function: cos-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: cosh-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: cpairlis (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: creduce (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cremove (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cremove-duplicates (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cremove-if (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cremove-if-not (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: creverse (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cset-difference (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cset-exclusive-or (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring-capitalize (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring-downcase (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring-left-trim (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring-right-trim (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring-trim (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cstring-upcase (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csublis (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubseq (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubst (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubst-if (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubst-if-not (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubstitute (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubstitute-if (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubstitute-if-not (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: csubtypep (x y)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cunion (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cupgraded-array-element-type (x)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cupgraded-complex-part-type (x)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: cvector (&rest args)
Package

numcl.impl.

Source

1constantfolded.lisp.

Function: derive-type-expander (variable type newform env)
Package

numcl.impl.

Source

0specialops.lisp.

Function: determine-array-spec (contents type)

Walk over the CONTENTS recursively and decides the output shape and the element type. When TYPE is non-nil, it overrides the type deduction.

Package

numcl.impl.

Source

3array.lisp.

Function: div-to-float-type (first &rest typespecs)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: einsum-lambda (einsum-specs)

Takes a normalized-subscripts and returns a lambda form that iterates over it.

Package

numcl.impl.

Source

3einsum.lisp.

Function: einsum-normalize-subscripts (subscripts)
Package

numcl.impl.

Source

3einsum.lisp.

Function: einsum-output-types (transforms i-evars o-evars &rest arrays)

Try to simulate the range for 10 iterations; Stop if it converges. Otherwise call float-substitution and simplify integers to fixnums.

Package

numcl.impl.

Source

3einsum.lisp.

Reader: einsum-specs-i-options (instance)
Writer: (setf einsum-specs-i-options) (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Target Slot

i-options.

Reader: einsum-specs-i-specs (instance)
Writer: (setf einsum-specs-i-specs) (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Target Slot

i-specs.

Reader: einsum-specs-iter-specs (instance)
Writer: (setf einsum-specs-iter-specs) (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Target Slot

iter-specs.

Reader: einsum-specs-o-options (instance)
Writer: (setf einsum-specs-o-options) (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Target Slot

o-options.

Reader: einsum-specs-o-specs (instance)
Writer: (setf einsum-specs-o-specs) (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Target Slot

o-specs.

Function: einsum-specs-p (object)
Package

numcl.impl.

Source

3einsum.lisp.

Reader: einsum-specs-transforms (instance)
Writer: (setf einsum-specs-transforms) (instance)
Package

numcl.impl.

Source

3einsum.lisp.

Target Slot

transforms.

Function: ensure-singleton (array-or-number)
Package

numcl.impl.

Source

2aref.lisp.

Function: exp-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: expt-inferer (base power)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: float-contagion (t1 t2 &key int-int-result)

Performs a float contagion.

It returns a type specifier that can be combined with intervals.
For example, when the contagion result is FIXNUM, it returns ’INTEGER instead.
Specifically, it returns one of ’integer, ’short-float, ... ’long-float, ’(complex integer), ’(complex short-float) ... ’(complex long-float) or nil (i.e. empty type).

The rule applied here is stricter than in CL.
All ratios are converted to *numcl-default-float-format*.
NUMCL is aware of BIGNUM, but never handles it.
When the result of numerical computation causes an overflow/underflow, it signals an error.

For the original float contagion rule, check out:
12.1.4 Floating-point Computations http://clhs.lisp.se/Body/12_ad.htm

The optional key argument :int-int-result can alter the behavior when the both inputs are integers. This is useful for specifying the appropriate default behavior for rational functions
(e.g. +: integer, integer -> integer) and irrational functions (e.g. /: integer, integer -> float).

Package

numcl.impl.

Source

1type.lisp.

Function: float-substitution (t1 &key int-result)

Performs a float substitution.

For the original float substitution rule, check out:
12.1.3.3 Rule of Float Substitutability http://clhs.lisp.se/Body/12_acc.htm

It returns a type specifier that can be combined with intervals.
For example, when the contagion result is FIXNUM, it returns ’INTEGER instead.
Specifically, it returns one of ’integer, ’short-float, ... ’long-float, ’(complex integer),
’(complex short-float) ... ’(complex long-float) or nil (i.e. empty type).

The optional key argument :int-result can alter the behavior when the input is an integer.
This is useful for specifying the appropriate default behavior for rational functions
(e.g. mod: integer -> integer) and irrational functions (e.g. exp: integer -> float).

If the argument is FLOAT (without precision), it returns *numcl-default-float-format*.
If the argument is a type specifier for a concrete float subtype, it returns its primary type (e.g. ’single-float).
If the argument is a type specifier for an integer subtype, it returns the value of an optional key argument int-result, defaulted to ’integer. If the argument is a type specifier for a real subtype, it returns *numcl-default-float-format*.
If the argument is a complex type, it applies itself to the complex element type.

If the argument is a compound type (OR/AND), it applies itself to each type.
For OR, it returns the OR of each result.
For AND, all result should be eq to each other, otherwise NIL.

If the argument is a NIL type (empty type), NIL is returned.

For an unsupported type, it signals an error.

Package

numcl.impl.

Source

1type.lisp.

Function: float-to-integer-p (newtype oldtype)
Package

numcl.impl.

Source

1type.lisp.

Function: floor-inferer (x &optional y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: funcall* (fn x &optional default)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: handle-sbcl-bug (fn x y)
Package

numcl.impl.

Source

1type.lisp.

Function: i-avar (i)

Variable for the input array

Package

numcl.impl.

Source

3einsum.lisp.

Function: i-avars (specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: i-evars (specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: i-idx (i)

Variable for the 1D index of input array

Package

numcl.impl.

Source

3einsum.lisp.

Function: i-idxs (specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: i-p (x)

dummy predicate for enabling the structure matching in trivia

Package

numcl.impl.

Source

3einsum.lisp.

Function: infer-logand (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-logandc1 (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-logandc2 (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-logeqv (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-logior (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-lognand (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-lognor (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-lognot (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-logorc1 (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-logorc2 (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-rational-arithmetic-result (interval-op typespecs int-int-result)

Convert a set of type specifiers under REAL, e.g. RATIO, INTEGERS, FLOATS, to the least specific FLOAT type when any one of them are not fixnums.

Package

numcl.impl.

Source

1type.lisp.

Function: infer-type (name &rest args)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: infer-type-from-content (x)
Package

numcl.impl.

Source

3array.lisp.

Function: infer-type-from-contents (contents)
Package

numcl.impl.

Source

3array.lisp.

Function: inferer-boundp (symbol)

Automatically defined boolean function.

Package

numcl.impl.

Source

2typeinfer.lisp.

Function: inlinable-diag (a &optional result)

Return the diagonal element of a matrix as a vector

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-eye (n &key m k type)

Returns a matrix whose k-th diagnonal filled with 1.
N,M specifies the shape of the return array. K will adjust the sub-diagonal – positive K moves it upward.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-inner (a b &optional result)

Inner product of two vectors.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-kron (a b &optional result)

Compute the kronecker product of two vectors.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-matmul (a b &optional result)

Matrix product of two arrays.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-outer (a b &optional result)

Compute the outer product of two vectors.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-transpose (matrix &optional result)

Reverses the axes of an array.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-tri (n &key m k type)

Returns a triangle matrix whose lower diagnonal (including the diagonal) filled with 1.
N,M specifies the shape of the return array. K will adjust the sub-diagonal – positive K fills more 1s.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-tril (matrix &optional k)

Returns the copy of matrix with elements above the k-th diagonal zeroed. Positive K fills less 0s.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-triu (matrix &optional k)

Returns the copy of matrix with elements below the k-th diagonal zeroed. Positive K fills more 0s.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-vander (v &key n increasing)

Returns a matrix where M[i,j] == V[i]^(N-j) when increasing is false (default), and M[i,j] == V[i]^j when increasing is true.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: inlinable-vdot (a b &optional result)

Dot product of two vectors. For complex values, the first value is conjugated.

Package

numcl.impl.

Source

4linear-algebra2.lisp.

Function: interpret-type (form)

Form is a cons tree in which: form : (inferer args*)
arg : type | form | singleton singleton : number

Package

numcl.impl.

Source

2typeinfer.lisp.

Function: intersection-to-float-type (&rest typespecs)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-< (l1 h1 l2 h2)

Sort types accorting to the interval-designators. Provides a full ordering

Package

numcl.impl.

Source

1type.lisp.

Function: interval-add (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-ceiling (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-coerce (value type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-connected-p (l1 h1 l2 h2)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-div (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-divlike (fn l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-fceiling (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-ffloor (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-floor (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-fround (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-ftruncate (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-intersection (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-max (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-min (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-mul (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-postprocess-high (x)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-postprocess-low (x)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-preprocess-high (x)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-preprocess-low (x)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-round (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-sub (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-truncate (l1 h1 l2 h2 &key divisor-type)
Package

numcl.impl.

Source

1type.lisp.

Function: interval-union (l1 h1 l2 h2 &key)
Package

numcl.impl.

Source

1type.lisp.

Function: isqrt-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: log-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: logr-inferer (x)

Inferer for the logarithm in positive inputs

Package

numcl.impl.

Source

2typeinfer.lisp.

Function: make-einsum-specs (&key iter-specs transforms i-specs i-options o-specs o-options)
Package

numcl.impl.

Source

3einsum.lisp.

Function: make-version-string ()
Package

numcl.impl.

Source

1version.lisp.

Function: map-specs (fn specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: matmul*-naive (&rest args)

Takes an arbitrary number of matrices and performs multiplication.

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: matmul*-test ()
Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: matmul*-thrashdin (&rest args)

Takes an arbitrary number of matrices and performs multiplication, optimizing the order using the shape information and the associativity to minimize the size of the intermediate matrix.

Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: matrix-chain-order (dims n)
Package

numcl.impl.

Source

4linear-algebra3.lisp.

Function: max-to-float-type (&rest typespecs)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: memoized-einsum-function (normalized-subscripts)
Package

numcl.impl.

Source

3einsum.lisp.

Function: min-to-float-type (&rest typespecs)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: most-negative-value (type)
Package

numcl.impl.

Source

1constants.lisp.

Function: most-positive-value (type)
Package

numcl.impl.

Source

1constants.lisp.

Function: mul-to-float-type (&rest typespecs)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: nan-result-negative-lb (x)
Package

numcl.impl.

Source

1type.lisp.

Function: nan-result-negative-ub (x)
Package

numcl.impl.

Source

1type.lisp.

Function: nan-result-positive-lb (x)
Package

numcl.impl.

Source

1type.lisp.

Function: nan-result-positive-ub (x)
Package

numcl.impl.

Source

1type.lisp.

Function: normalize-index (index dimension)
Package

numcl.impl.

Source

3einsum.lisp.

Function: normalize-subscripts (subscripts shape)

Normalizes the input for %aref.

- corresponds to numpy’s elipses ‘...‘, and it should appear only once. t corresponds to the unspecified end in numpy’s ‘:‘ .

Package

numcl.impl.

Source

2aref.lisp.

Function: o-avar (i)

Variable for the output array

Package

numcl.impl.

Source

3einsum.lisp.

Function: o-avars (specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: o-evars (specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: o-idx (i)

Variable for the 1D index of output array

Package

numcl.impl.

Source

3einsum.lisp.

Function: o-idxs (specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: o-p (x)

dummy predicate for enabling the structure matching in trivia

Package

numcl.impl.

Source

3einsum.lisp.

Function: one-value (type)
Package

numcl.impl.

Source

1constants.lisp.

Function: plan-broadcast (shapes)

Store (precompute) the broadcast information in a matrix of size (2, N+1, M),
where N is the number of arrays (lengths of shapes) and
M is the maximum rank of the dimensions being broadcasted.

(0, 0, j) contains the dimension of the output arrays for axis j.
(0, i+1, j) contains the dimension of the i-th input array for axis j.
(1, 0, j) contains the step size of the output arrays for axis j.
(1, i+1, j) contains the step size of the i-th input array for axis j.

The step size for axis j is the product of the dimensions after j-th axes for that array.

This part of the code is run in the runtime, not in the compile time,
because it handles the runtime information of the size of the input arrays.

Package

numcl.impl.

Source

3einsum.lisp.

Function: postprocess (interval)
Package

numcl.impl.

Source

1type.lisp.

Function: range-width (array axis start end step)
Package

numcl.impl.

Source

3einsum.lisp.

Function: reduce-lambda (rank axes)
Package

numcl.impl.

Source

5reduce.lisp.

Function: rem-inferer (x y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: result-shape (subscripts)
Package

numcl.impl.

Source

2aref.lisp.

Function: round-inferer (x &optional y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: safe-float-infinity-p (x)
Package

numcl.impl.

Source

1type.lisp.

Function: safe-float-nan-p (x)
Package

numcl.impl.

Source

1type.lisp.

Function: safe-string= (a b)
Package

numcl.impl.

Source

3einsum.lisp.

Function: sb (n num)

Truncate NUM as (signed-byte N) integer, preserving the sign

Package

numcl.impl.

Source

1type.lisp.

Function: set-type-inferer (name fname)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: shape-resolver (vars specs options &optional out-p)

Returns a list whose first value is a binding form for LET.
The rest of the elements are declaration and assertion forms for the body of let.

out-p: Produces the binding for output arrays.

Package

numcl.impl.

Source

3einsum.lisp.

Function: signed-zero-lb (x other)
Package

numcl.impl.

Source

1type.lisp.

Function: signed-zero-ub (x other)
Package

numcl.impl.

Source

1type.lisp.

Function: simplify-or-types (types)
Package

numcl.impl.

Source

1type.lisp.

Function: sin-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: sinh-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: sort-locality (indices subscripts)

In each iteration, greedily select the earliest index.
However, it penalize removing the index from the same set of subscripts that
the past indices are removed from.
This makes it easier to implement the block-matrix algorithms for improved cache locality.

Package

numcl.impl.

Source

3einsum.lisp.

Function: spec-depends-on (spec iter-specs)
Package

numcl.impl.

Source

3einsum.lisp.

Function: sqrt-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: strict-type-of (x)

stricter version of type-of, which does not simplify the type – e.g., (type-of 5) is (integer 5 5), not fixnum.

Package

numcl.impl.

Source

1type.lisp.

Function: sub (start stop step width full contiguous singleton)
Package

numcl.impl.

Source

2aref.lisp.

Reader: sub-contiguous (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

contiguous.

Reader: sub-full (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

full.

Function: sub-p (object)
Package

numcl.impl.

Source

2aref.lisp.

Reader: sub-singleton (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

singleton.

Reader: sub-start (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

start.

Reader: sub-step (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

step.

Reader: sub-stop (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

stop.

Function: sub-to-float-type (first &rest typespecs)
Package

numcl.impl.

Source

2typeinfer.lisp.

Reader: sub-width (instance)
Package

numcl.impl.

Source

2aref.lisp.

Target Slot

width.

Function: symbol-inferer (symbol &optional default)

Automatically defined getter function. When DEFAULT is supplied, the value is set automatically.

Package

numcl.impl.

Source

2typeinfer.lisp.

Function: (setf symbol-inferer) (symbol)

Automatically defined setter function.

Package

numcl.impl.

Source

2typeinfer.lisp.

Function: tan-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: tanh-inferer (x)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: truncate-inferer (x &optional y)
Package

numcl.impl.

Source

2typeinfer.lisp.

Function: type-connected-p (t1 t2)
Package

numcl.impl.

Source

1type.lisp.

Function: type-interval-< (t1 t2)
Package

numcl.impl.

Source

1type.lisp.

Function: typexpand (type &optional env)
Package

numcl.impl.

Source

1type.lisp.

Function: ub (n num)

Truncate NUM as (unsigned-byte N) integer, ignoring the sign

Package

numcl.impl.

Source

1type.lisp.

Function: union-to-float-type (&rest typespecs)

Convert a set of type specifiers under REAL, e.g. RATIO, INTEGERS, FLOATS, to the least specific FLOAT type when any one of them are not fixnums.

When two interval designators are not connected, it returns OR types. If you want them to be merged as a single type, use bind-to-float-type.

Package

numcl.impl.

Source

1type.lisp.

Function: zero-value (type)
Package

numcl.impl.

Source

1constants.lisp.


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

6.2.7 Generic functions

Generic Function: einsum-body (*compiler* einsum-specs)

* ‘*compiler*‘ : Special variable (supposed to be a keyword) used for dispatching the compilation scheme.

* ‘einsum-specs‘ : einsum-specs structure.

Package

numcl.impl.

Source

3einsum.lisp.

Methods
Method: einsum-body ((*compiler* (eql :common-lisp)) ev)
Source

4einsum-backends/common-lisp.lisp.


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

6.2.8 Conditions

Condition: unbound-inferer
Package

numcl.impl.

Source

2typeinfer.lisp.

Direct superclasses

unbound-variable.


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

6.2.9 Structures

Structure: einsum-specs

A temporary structure holding the information for the einsum compiler.
* ‘iter-specs‘ : A list of integers that defines the nested loops.
For example, (0 1 2) for the ijk loop in gemm.

* ‘i-specs‘, ‘o-specs‘ : A list of lists of integers that specifies the indices for each input/output array. Each list should be a subset of iter-specs.
For example, ((0 1) (1 2) (0 2)) for the ijk loop in gemm.

* ‘transforms‘ : A list of forms. One form is for each output array. Each form is evaluated in each loop and the value is assigned to the array element.

Package

numcl.impl.

Source

3einsum.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: iter-specs
Readers

einsum-specs-iter-specs.

Writers

(setf einsum-specs-iter-specs).

Slot: transforms
Readers

einsum-specs-transforms.

Writers

(setf einsum-specs-transforms).

Slot: i-specs
Readers

einsum-specs-i-specs.

Writers

(setf einsum-specs-i-specs).

Slot: i-options
Readers

einsum-specs-i-options.

Writers

(setf einsum-specs-i-options).

Slot: o-specs
Readers

einsum-specs-o-specs.

Writers

(setf einsum-specs-o-specs).

Slot: o-options
Readers

einsum-specs-o-options.

Writers

(setf einsum-specs-o-options).

Structure: sub

A structure that represents the range of iteration.
FULL When true, the entire elements in the axis is covered CONTIGUOUS When true, there are no gap in the range of iteration SINGLETON Differentiates the index (2 3) (== python [2:3]) and 2

Package

numcl.impl.

Source

2aref.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: start
Type

fixnum

Initform

0

Readers

sub-start.

Writers

This slot is read-only.

Slot: stop
Type

fixnum

Initform

0

Readers

sub-stop.

Writers

This slot is read-only.

Slot: step
Package

common-lisp.

Type

fixnum

Initform

0

Readers

sub-step.

Writers

This slot is read-only.

Slot: width
Type

fixnum

Initform

0

Readers

sub-width.

Writers

This slot is read-only.

Slot: full
Package

numcl.exported.

Type

boolean

Readers

sub-full.

Writers

This slot is read-only.

Slot: contiguous
Type

boolean

Readers

sub-contiguous.

Writers

This slot is read-only.

Slot: singleton
Type

boolean

Readers

sub-singleton.

Writers

This slot is read-only.


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

6.2.10 Types

Type: base-array (&optional element-type length)

Type specifier for the base, 1D arrays for the NUMCL arrays.

Package

numcl.impl.

Source

1type.lisp.

Type: i ()
Package

numcl.impl.

Source

3einsum.lisp.

Type: index ()
Package

numcl.impl.

Source

1type.lisp.

Type: inferer-type ()
Package

numcl.impl.

Source

2typeinfer.lisp.

Type: o ()
Package

numcl.impl.

Source

3einsum.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   $   %   &   (   *   +   -   /   1   <   =   >   ?   @  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   R   S   T   U   V   W   Z  
Index Entry  Section

$
$: Private ordinary functions

%
%%arange: Private ordinary functions
%%expand-decls: Private ordinary functions
%add-two-cases: Private ordinary functions
%arange: Private ordinary functions
%arange-infer-type: Private compiler macros
%arange-infer-type: Private ordinary functions
%aref: Private ordinary functions
%array-index-from-row-major-index/vector: Private ordinary functions
%aset-fill: Private ordinary functions
%aset-replace: Private ordinary functions
%build-tree: Private ordinary functions
%check-two-matrices: Private ordinary functions
%coerce: Private compiler macros
%coerce: Private ordinary functions
%dimension-step-size: Private ordinary functions
%displace-at: Private ordinary functions
%displace-range: Private ordinary functions
%einsum-broadcast: Private ordinary functions
%einsum-early-binding: Private ordinary functions
%einsum-leaf: Private ordinary functions
%einsum-loop: Private ordinary functions
%einsum-normalize-subscripts: Private ordinary functions
%einsum-static: Private ordinary functions
%expand-decls: Private ordinary functions
%index->matrix: Private ordinary functions
%interpret-type: Private ordinary functions
%interval-/=: Private ordinary functions
%interval-<: Private ordinary functions
%interval-<=: Private ordinary functions
%interval-=: Private ordinary functions
%interval->: Private ordinary functions
%interval->=: Private ordinary functions
%interval-add: Private ordinary functions
%interval-ceiling: Private ordinary functions
%interval-div: Private ordinary functions
%interval-divlike: Private ordinary functions
%interval-fceiling: Private ordinary functions
%interval-ffloor: Private ordinary functions
%interval-floor: Private ordinary functions
%interval-fround: Private ordinary functions
%interval-ftruncate: Private ordinary functions
%interval-max: Private ordinary functions
%interval-min: Private ordinary functions
%interval-mul: Private ordinary functions
%interval-round: Private ordinary functions
%interval-sub: Private ordinary functions
%interval-truncate: Private ordinary functions
%log2: Private ordinary functions
%log2-inferer: Private ordinary functions
%logr: Private ordinary functions
%make-array: Private ordinary functions
%map-array-with-type: Private ordinary functions
%nested-coerce-and-insert: Private ordinary functions
%normalize-subscript: Private ordinary functions
%ok-to-use-fn-specialized: Private ordinary functions
%output-generator: Private ordinary functions
%output-result-shapes-match-p: Private ordinary functions
%reduce-array-result-type: Private ordinary functions
%reduce-lambda: Private ordinary functions
%square: Private ordinary functions
%straight-forward-check: Private ordinary functions
%when-function-is-global: Private macros

&
&: Private ordinary functions

(
(setf aref): Public ordinary functions
(setf einsum-specs-i-options): Private ordinary functions
(setf einsum-specs-i-specs): Private ordinary functions
(setf einsum-specs-iter-specs): Private ordinary functions
(setf einsum-specs-o-options): Private ordinary functions
(setf einsum-specs-o-specs): Private ordinary functions
(setf einsum-specs-transforms): Private ordinary functions
(setf invalid-array-index-error-axis): Public generic functions
(setf invalid-array-index-error-axis): Public generic functions
(setf invalid-array-index-error-shape): Public generic functions
(setf invalid-array-index-error-shape): Public generic functions
(setf invalid-array-index-error-subscripts): Public generic functions
(setf invalid-array-index-error-subscripts): Public generic functions
(setf symbol-inferer): Private ordinary functions

*
*: Public ordinary functions

+
+: Public ordinary functions

-
-: Public ordinary functions

/
/: Public ordinary functions
/=: Public ordinary functions
/=/2: Private ordinary functions
/=/bit: Private ordinary functions

1
1+: Public ordinary functions
1+-inferer: Private ordinary functions
1-: Public ordinary functions

<
<: Public ordinary functions
</2: Private ordinary functions
</bit: Private ordinary functions
<=: Public ordinary functions
<=/2: Private ordinary functions
<=/bit: Private ordinary functions

=
=: Public ordinary functions
=/2: Private ordinary functions
=/bit: Private ordinary functions

>
>: Public ordinary functions
>/2: Private ordinary functions
>/bit: Private ordinary functions
>=: Public ordinary functions
>=/2: Private ordinary functions
>=/bit: Private ordinary functions

?
?: Private ordinary functions

@
@: Private ordinary functions

A
abs: Public ordinary functions
abs-inferer: Private ordinary functions
acos: Public ordinary functions
acos-inferer: Private ordinary functions
acosh: Public ordinary functions
acosh-inferer: Private ordinary functions
add-to-float-type: Private ordinary functions
amax: Public ordinary functions
amin: Public ordinary functions
arange: Public compiler macros
arange: Public ordinary functions
aref: Public ordinary functions
argwhere: Public ordinary functions
array-dimension*: Private ordinary functions
array-index-from-row-major-index: Public ordinary functions
asarray: Public ordinary functions
asin: Public ordinary functions
asin-inferer: Private ordinary functions
asinh: Public ordinary functions
asinh-inferer: Private ordinary functions
astype: Public ordinary functions
atan: Public ordinary functions
atan-inferer: Private ordinary functions
atanh: Public ordinary functions
atanh-inferer: Private ordinary functions
avg: Public ordinary functions

B
base-array-p: Private ordinary functions
bernoulli: Public ordinary functions
bernoulli-like: Public ordinary functions
beta: Public ordinary functions
bind-to-float-type: Private compiler macros
bind-to-float-type: Private ordinary functions
binomial: Public ordinary functions
boolean-wrapper: Private ordinary functions
broadcast: Public compiler macros
broadcast: Public ordinary functions
broadcast-p: Private ordinary functions
broadcast-result-shape: Private ordinary functions

C
cacons: Private compiler macros
cacons: Private ordinary functions
cadjoin: Private compiler macros
cadjoin: Private ordinary functions
cappend: Private compiler macros
cappend: Private ordinary functions
cbit-and: Private compiler macros
cbit-and: Private ordinary functions
cbit-andc1: Private compiler macros
cbit-andc1: Private ordinary functions
cbit-andc2: Private compiler macros
cbit-andc2: Private ordinary functions
cbit-eqv: Private compiler macros
cbit-eqv: Private ordinary functions
cbit-ior: Private compiler macros
cbit-ior: Private ordinary functions
cbit-nand: Private compiler macros
cbit-nand: Private ordinary functions
cbit-nor: Private compiler macros
cbit-nor: Private ordinary functions
cbit-not: Private compiler macros
cbit-not: Private ordinary functions
cbit-orc1: Private compiler macros
cbit-orc1: Private ordinary functions
cbit-orc2: Private compiler macros
cbit-orc2: Private ordinary functions
cbit-xor: Private compiler macros
cbit-xor: Private ordinary functions
cconcatenate: Private compiler macros
cconcatenate: Private ordinary functions
ccons: Private compiler macros
ccons: Private ordinary functions
ceiling: Public ordinary functions
ceiling-inferer: Private ordinary functions
cintersection: Private compiler macros
cintersection: Private ordinary functions
cis: Public ordinary functions
cldiff: Private compiler macros
cldiff: Private ordinary functions
clip: Public ordinary functions
clist: Private compiler macros
clist: Private ordinary functions
clist*: Private compiler macros
clist*: Private ordinary functions
cmake-array: Private compiler macros
cmake-array: Private ordinary functions
cmake-list: Private compiler macros
cmake-list: Private ordinary functions
cmake-sequence: Private compiler macros
cmake-sequence: Private ordinary functions
cmake-string: Private compiler macros
cmake-string: Private ordinary functions
cmap: Private compiler macros
cmap: Private ordinary functions
cmapcar: Private compiler macros
cmapcar: Private ordinary functions
cmaplist: Private compiler macros
cmaplist: Private ordinary functions
compile-time-type-of: Private macros
Compiler Macro, %arange-infer-type: Private compiler macros
Compiler Macro, %coerce: Private compiler macros
Compiler Macro, arange: Public compiler macros
Compiler Macro, bind-to-float-type: Private compiler macros
Compiler Macro, broadcast: Public compiler macros
Compiler Macro, cacons: Private compiler macros
Compiler Macro, cadjoin: Private compiler macros
Compiler Macro, cappend: Private compiler macros
Compiler Macro, cbit-and: Private compiler macros
Compiler Macro, cbit-andc1: Private compiler macros
Compiler Macro, cbit-andc2: Private compiler macros
Compiler Macro, cbit-eqv: Private compiler macros
Compiler Macro, cbit-ior: Private compiler macros
Compiler Macro, cbit-nand: Private compiler macros
Compiler Macro, cbit-nor: Private compiler macros
Compiler Macro, cbit-not: Private compiler macros
Compiler Macro, cbit-orc1: Private compiler macros
Compiler Macro, cbit-orc2: Private compiler macros
Compiler Macro, cbit-xor: Private compiler macros
Compiler Macro, cconcatenate: Private compiler macros
Compiler Macro, ccons: Private compiler macros
Compiler Macro, cintersection: Private compiler macros
Compiler Macro, cldiff: Private compiler macros
Compiler Macro, clist: Private compiler macros
Compiler Macro, clist*: Private compiler macros
Compiler Macro, cmake-array: Private compiler macros
Compiler Macro, cmake-list: Private compiler macros
Compiler Macro, cmake-sequence: Private compiler macros
Compiler Macro, cmake-string: Private compiler macros
Compiler Macro, cmap: Private compiler macros
Compiler Macro, cmapcar: Private compiler macros
Compiler Macro, cmaplist: Private compiler macros
Compiler Macro, cpairlis: Private compiler macros
Compiler Macro, creduce: Private compiler macros
Compiler Macro, cremove: Private compiler macros
Compiler Macro, cremove-duplicates: Private compiler macros
Compiler Macro, cremove-if: Private compiler macros
Compiler Macro, cremove-if-not: Private compiler macros
Compiler Macro, creverse: Private compiler macros
Compiler Macro, cset-difference: Private compiler macros
Compiler Macro, cset-exclusive-or: Private compiler macros
Compiler Macro, cstring: Private compiler macros
Compiler Macro, cstring-capitalize: Private compiler macros
Compiler Macro, cstring-downcase: Private compiler macros
Compiler Macro, cstring-left-trim: Private compiler macros
Compiler Macro, cstring-right-trim: Private compiler macros
Compiler Macro, cstring-trim: Private compiler macros
Compiler Macro, cstring-upcase: Private compiler macros
Compiler Macro, csublis: Private compiler macros
Compiler Macro, csubseq: Private compiler macros
Compiler Macro, csubst: Private compiler macros
Compiler Macro, csubst-if: Private compiler macros
Compiler Macro, csubst-if-not: Private compiler macros
Compiler Macro, csubstitute: Private compiler macros
Compiler Macro, csubstitute-if: Private compiler macros
Compiler Macro, csubstitute-if-not: Private compiler macros
Compiler Macro, cunion: Private compiler macros
Compiler Macro, cvector: Private compiler macros
Compiler Macro, diag: Public compiler macros
Compiler Macro, einsum: Public compiler macros
Compiler Macro, eye: Public compiler macros
Compiler Macro, float-contagion: Private compiler macros
Compiler Macro, float-substitution: Private compiler macros
Compiler Macro, float-to-integer-p: Private compiler macros
Compiler Macro, inner: Public compiler macros
Compiler Macro, intersection-to-float-type: Private compiler macros
Compiler Macro, kron: Public compiler macros
Compiler Macro, map-array-into: Public compiler macros
Compiler Macro, matmul: Public compiler macros
Compiler Macro, matmul*: Public compiler macros
Compiler Macro, most-negative-value: Private compiler macros
Compiler Macro, most-positive-value: Private compiler macros
Compiler Macro, one-value: Private compiler macros
Compiler Macro, outer: Public compiler macros
Compiler Macro, transpose: Public compiler macros
Compiler Macro, tri: Public compiler macros
Compiler Macro, tril: Public compiler macros
Compiler Macro, triu: Public compiler macros
Compiler Macro, union-to-float-type: Private compiler macros
Compiler Macro, vander: Public compiler macros
Compiler Macro, vdot: Public compiler macros
Compiler Macro, zero-value: Private compiler macros
complex-part-inferer: Private ordinary functions
concatenate: Public ordinary functions
conjugate: Public ordinary functions
conjugate-inferer: Private ordinary functions
copy: Public ordinary functions
copy-einsum-specs: Private ordinary functions
copy-sub: Private ordinary functions
cos: Public ordinary functions
cos-inferer: Private ordinary functions
cosh: Public ordinary functions
cosh-inferer: Private ordinary functions
cpairlis: Private compiler macros
cpairlis: Private ordinary functions
creduce: Private compiler macros
creduce: Private ordinary functions
cremove: Private compiler macros
cremove: Private ordinary functions
cremove-duplicates: Private compiler macros
cremove-duplicates: Private ordinary functions
cremove-if: Private compiler macros
cremove-if: Private ordinary functions
cremove-if-not: Private compiler macros
cremove-if-not: Private ordinary functions
creverse: Private compiler macros
creverse: Private ordinary functions
cset-difference: Private compiler macros
cset-difference: Private ordinary functions
cset-exclusive-or: Private compiler macros
cset-exclusive-or: Private ordinary functions
cstring: Private compiler macros
cstring: Private ordinary functions
cstring-capitalize: Private compiler macros
cstring-capitalize: Private ordinary functions
cstring-downcase: Private compiler macros
cstring-downcase: Private ordinary functions
cstring-left-trim: Private compiler macros
cstring-left-trim: Private ordinary functions
cstring-right-trim: Private compiler macros
cstring-right-trim: Private ordinary functions
cstring-trim: Private compiler macros
cstring-trim: Private ordinary functions
cstring-upcase: Private compiler macros
cstring-upcase: Private ordinary functions
csublis: Private compiler macros
csublis: Private ordinary functions
csubseq: Private compiler macros
csubseq: Private ordinary functions
csubst: Private compiler macros
csubst: Private ordinary functions
csubst-if: Private compiler macros
csubst-if: Private ordinary functions
csubst-if-not: Private compiler macros
csubst-if-not: Private ordinary functions
csubstitute: Private compiler macros
csubstitute: Private ordinary functions
csubstitute-if: Private compiler macros
csubstitute-if: Private ordinary functions
csubstitute-if-not: Private compiler macros
csubstitute-if-not: Private ordinary functions
csubtypep: Private ordinary functions
cunion: Private compiler macros
cunion: Private ordinary functions
cupgraded-array-element-type: Private ordinary functions
cupgraded-complex-part-type: Private ordinary functions
cvector: Private compiler macros
cvector: Private ordinary functions

D
define-foldable-version: Private macros
define-simple-mapper: Private macros
denominator: Public ordinary functions
derive-type-expander: Private ordinary functions
determine-array-spec: Private ordinary functions
diag: Public compiler macros
diag: Public ordinary functions
div-to-float-type: Private ordinary functions
do: Private macros
do*: Private macros
dtype: Public ordinary functions

E
einsum: Public compiler macros
einsum: Public ordinary functions
einsum-body: Private generic functions
einsum-body: Private generic functions
einsum-lambda: Private ordinary functions
einsum-normalize-subscripts: Private ordinary functions
einsum-output-types: Private ordinary functions
einsum-specs-i-options: Private ordinary functions
einsum-specs-i-specs: Private ordinary functions
einsum-specs-iter-specs: Private ordinary functions
einsum-specs-o-options: Private ordinary functions
einsum-specs-o-specs: Private ordinary functions
einsum-specs-p: Private ordinary functions
einsum-specs-transforms: Private ordinary functions
empty: Public ordinary functions
empty-like: Public ordinary functions
ensure-singleton: Private ordinary functions
exp: Public ordinary functions
exp-inferer: Private ordinary functions
expand-dims: Public ordinary functions
exponential: Public ordinary functions
expt: Public ordinary functions
expt-inferer: Private ordinary functions
eye: Public compiler macros
eye: Public ordinary functions

F
f: Public ordinary functions
fceiling: Public ordinary functions
ffloor: Public ordinary functions
flatten: Public ordinary functions
float-contagion: Private compiler macros
float-contagion: Private ordinary functions
float-substitution: Private compiler macros
float-substitution: Private ordinary functions
float-to-integer-p: Private compiler macros
float-to-integer-p: Private ordinary functions
floor: Public ordinary functions
floor-inferer: Private ordinary functions
fround: Public ordinary functions
ftruncate: Public ordinary functions
full: Public ordinary functions
full-like: Public ordinary functions
funcall*: Private ordinary functions
Function, $: Private ordinary functions
Function, %%arange: Private ordinary functions
Function, %%expand-decls: Private ordinary functions
Function, %add-two-cases: Private ordinary functions
Function, %arange: Private ordinary functions
Function, %arange-infer-type: Private ordinary functions
Function, %aref: Private ordinary functions
Function, %array-index-from-row-major-index/vector: Private ordinary functions
Function, %aset-fill: Private ordinary functions
Function, %aset-replace: Private ordinary functions
Function, %build-tree: Private ordinary functions
Function, %check-two-matrices: Private ordinary functions
Function, %coerce: Private ordinary functions
Function, %dimension-step-size: Private ordinary functions
Function, %displace-at: Private ordinary functions
Function, %displace-range: Private ordinary functions
Function, %einsum-broadcast: Private ordinary functions
Function, %einsum-early-binding: Private ordinary functions
Function, %einsum-leaf: Private ordinary functions
Function, %einsum-loop: Private ordinary functions
Function, %einsum-normalize-subscripts: Private ordinary functions
Function, %einsum-static: Private ordinary functions
Function, %expand-decls: Private ordinary functions
Function, %index->matrix: Private ordinary functions
Function, %interpret-type: Private ordinary functions
Function, %interval-/=: Private ordinary functions
Function, %interval-<: Private ordinary functions
Function, %interval-<=: Private ordinary functions
Function, %interval-=: Private ordinary functions
Function, %interval->: Private ordinary functions
Function, %interval->=: Private ordinary functions
Function, %interval-add: Private ordinary functions
Function, %interval-ceiling: Private ordinary functions
Function, %interval-div: Private ordinary functions
Function, %interval-divlike: Private ordinary functions
Function, %interval-fceiling: Private ordinary functions
Function, %interval-ffloor: Private ordinary functions
Function, %interval-floor: Private ordinary functions
Function, %interval-fround: Private ordinary functions
Function, %interval-ftruncate: Private ordinary functions
Function, %interval-max: Private ordinary functions
Function, %interval-min: Private ordinary functions
Function, %interval-mul: Private ordinary functions
Function, %interval-round: Private ordinary functions
Function, %interval-sub: Private ordinary functions
Function, %interval-truncate: Private ordinary functions
Function, %log2: Private ordinary functions
Function, %log2-inferer: Private ordinary functions
Function, %logr: Private ordinary functions
Function, %make-array: Private ordinary functions
Function, %map-array-with-type: Private ordinary functions
Function, %nested-coerce-and-insert: Private ordinary functions
Function, %normalize-subscript: Private ordinary functions
Function, %ok-to-use-fn-specialized: Private ordinary functions
Function, %output-generator: Private ordinary functions
Function, %output-result-shapes-match-p: Private ordinary functions
Function, %reduce-array-result-type: Private ordinary functions
Function, %reduce-lambda: Private ordinary functions
Function, %square: Private ordinary functions
Function, %straight-forward-check: Private ordinary functions
Function, &: Private ordinary functions
Function, (setf aref): Public ordinary functions
Function, (setf einsum-specs-i-options): Private ordinary functions
Function, (setf einsum-specs-i-specs): Private ordinary functions
Function, (setf einsum-specs-iter-specs): Private ordinary functions
Function, (setf einsum-specs-o-options): Private ordinary functions
Function, (setf einsum-specs-o-specs): Private ordinary functions
Function, (setf einsum-specs-transforms): Private ordinary functions
Function, (setf symbol-inferer): Private ordinary functions
Function, *: Public ordinary functions
Function, +: Public ordinary functions
Function, -: Public ordinary functions
Function, /: Public ordinary functions
Function, /=: Public ordinary functions
Function, /=/2: Private ordinary functions
Function, /=/bit: Private ordinary functions
Function, 1+: Public ordinary functions
Function, 1+-inferer: Private ordinary functions
Function, 1-: Public ordinary functions
Function, <: Public ordinary functions
Function, </2: Private ordinary functions
Function, </bit: Private ordinary functions
Function, <=: Public ordinary functions
Function, <=/2: Private ordinary functions
Function, <=/bit: Private ordinary functions
Function, =: Public ordinary functions
Function, =/2: Private ordinary functions
Function, =/bit: Private ordinary functions
Function, >: Public ordinary functions
Function, >/2: Private ordinary functions
Function, >/bit: Private ordinary functions
Function, >=: Public ordinary functions
Function, >=/2: Private ordinary functions
Function, >=/bit: Private ordinary functions
Function, ?: Private ordinary functions
Function, @: Private ordinary functions
Function, abs: Public ordinary functions
Function, abs-inferer: Private ordinary functions
Function, acos: Public ordinary functions
Function, acos-inferer: Private ordinary functions
Function, acosh: Public ordinary functions
Function, acosh-inferer: Private ordinary functions
Function, add-to-float-type: Private ordinary functions
Function, amax: Public ordinary functions
Function, amin: Public ordinary functions
Function, arange: Public ordinary functions
Function, aref: Public ordinary functions
Function, argwhere: Public ordinary functions
Function, array-dimension*: Private ordinary functions
Function, array-index-from-row-major-index: Public ordinary functions
Function, asarray: Public ordinary functions
Function, asin: Public ordinary functions
Function, asin-inferer: Private ordinary functions
Function, asinh: Public ordinary functions
Function, asinh-inferer: Private ordinary functions
Function, astype: Public ordinary functions
Function, atan: Public ordinary functions
Function, atan-inferer: Private ordinary functions
Function, atanh: Public ordinary functions
Function, atanh-inferer: Private ordinary functions
Function, avg: Public ordinary functions
Function, base-array-p: Private ordinary functions
Function, bernoulli: Public ordinary functions
Function, bernoulli-like: Public ordinary functions
Function, beta: Public ordinary functions
Function, bind-to-float-type: Private ordinary functions
Function, binomial: Public ordinary functions
Function, boolean-wrapper: Private ordinary functions
Function, broadcast: Public ordinary functions
Function, broadcast-p: Private ordinary functions
Function, broadcast-result-shape: Private ordinary functions
Function, cacons: Private ordinary functions
Function, cadjoin: Private ordinary functions
Function, cappend: Private ordinary functions
Function, cbit-and: Private ordinary functions
Function, cbit-andc1: Private ordinary functions
Function, cbit-andc2: Private ordinary functions
Function, cbit-eqv: Private ordinary functions
Function, cbit-ior: Private ordinary functions
Function, cbit-nand: Private ordinary functions
Function, cbit-nor: Private ordinary functions
Function, cbit-not: Private ordinary functions
Function, cbit-orc1: Private ordinary functions
Function, cbit-orc2: Private ordinary functions
Function, cbit-xor: Private ordinary functions
Function, cconcatenate: Private ordinary functions
Function, ccons: Private ordinary functions
Function, ceiling: Public ordinary functions
Function, ceiling-inferer: Private ordinary functions
Function, cintersection: Private ordinary functions
Function, cis: Public ordinary functions
Function, cldiff: Private ordinary functions
Function, clip: Public ordinary functions
Function, clist: Private ordinary functions
Function, clist*: Private ordinary functions
Function, cmake-array: Private ordinary functions
Function, cmake-list: Private ordinary functions
Function, cmake-sequence: Private ordinary functions
Function, cmake-string: Private ordinary functions
Function, cmap: Private ordinary functions
Function, cmapcar: Private ordinary functions
Function, cmaplist: Private ordinary functions
Function, complex-part-inferer: Private ordinary functions
Function, concatenate: Public ordinary functions
Function, conjugate: Public ordinary functions
Function, conjugate-inferer: Private ordinary functions
Function, copy: Public ordinary functions
Function, copy-einsum-specs: Private ordinary functions
Function, copy-sub: Private ordinary functions
Function, cos: Public ordinary functions
Function, cos-inferer: Private ordinary functions
Function, cosh: Public ordinary functions
Function, cosh-inferer: Private ordinary functions
Function, cpairlis: Private ordinary functions
Function, creduce: Private ordinary functions
Function, cremove: Private ordinary functions
Function, cremove-duplicates: Private ordinary functions
Function, cremove-if: Private ordinary functions
Function, cremove-if-not: Private ordinary functions
Function, creverse: Private ordinary functions
Function, cset-difference: Private ordinary functions
Function, cset-exclusive-or: Private ordinary functions
Function, cstring: Private ordinary functions
Function, cstring-capitalize: Private ordinary functions
Function, cstring-downcase: Private ordinary functions
Function, cstring-left-trim: Private ordinary functions
Function, cstring-right-trim: Private ordinary functions
Function, cstring-trim: Private ordinary functions
Function, cstring-upcase: Private ordinary functions
Function, csublis: Private ordinary functions
Function, csubseq: Private ordinary functions
Function, csubst: Private ordinary functions
Function, csubst-if: Private ordinary functions
Function, csubst-if-not: Private ordinary functions
Function, csubstitute: Private ordinary functions
Function, csubstitute-if: Private ordinary functions
Function, csubstitute-if-not: Private ordinary functions
Function, csubtypep: Private ordinary functions
Function, cunion: Private ordinary functions
Function, cupgraded-array-element-type: Private ordinary functions
Function, cupgraded-complex-part-type: Private ordinary functions
Function, cvector: Private ordinary functions
Function, denominator: Public ordinary functions
Function, derive-type-expander: Private ordinary functions
Function, determine-array-spec: Private ordinary functions
Function, diag: Public ordinary functions
Function, div-to-float-type: Private ordinary functions
Function, dtype: Public ordinary functions
Function, einsum: Public ordinary functions
Function, einsum-lambda: Private ordinary functions
Function, einsum-normalize-subscripts: Private ordinary functions
Function, einsum-output-types: Private ordinary functions
Function, einsum-specs-i-options: Private ordinary functions
Function, einsum-specs-i-specs: Private ordinary functions
Function, einsum-specs-iter-specs: Private ordinary functions
Function, einsum-specs-o-options: Private ordinary functions
Function, einsum-specs-o-specs: Private ordinary functions
Function, einsum-specs-p: Private ordinary functions
Function, einsum-specs-transforms: Private ordinary functions
Function, empty: Public ordinary functions
Function, empty-like: Public ordinary functions
Function, ensure-singleton: Private ordinary functions
Function, exp: Public ordinary functions
Function, exp-inferer: Private ordinary functions
Function, expand-dims: Public ordinary functions
Function, exponential: Public ordinary functions
Function, expt: Public ordinary functions
Function, expt-inferer: Private ordinary functions
Function, eye: Public ordinary functions
Function, f: Public ordinary functions
Function, fceiling: Public ordinary functions
Function, ffloor: Public ordinary functions
Function, flatten: Public ordinary functions
Function, float-contagion: Private ordinary functions
Function, float-substitution: Private ordinary functions
Function, float-to-integer-p: Private ordinary functions
Function, floor: Public ordinary functions
Function, floor-inferer: Private ordinary functions
Function, fround: Public ordinary functions
Function, ftruncate: Public ordinary functions
Function, full: Public ordinary functions
Function, full-like: Public ordinary functions
Function, funcall*: Private ordinary functions
Function, gamma: Public ordinary functions
Function, handle-sbcl-bug: Private ordinary functions
Function, histogram: Public ordinary functions
Function, i-avar: Private ordinary functions
Function, i-avars: Private ordinary functions
Function, i-evars: Private ordinary functions
Function, i-idx: Private ordinary functions
Function, i-idxs: Private ordinary functions
Function, i-p: Private ordinary functions
Function, imagpart: Public ordinary functions
Function, infer-logand: Private ordinary functions
Function, infer-logandc1: Private ordinary functions
Function, infer-logandc2: Private ordinary functions
Function, infer-logeqv: Private ordinary functions
Function, infer-logior: Private ordinary functions
Function, infer-lognand: Private ordinary functions
Function, infer-lognor: Private ordinary functions
Function, infer-lognot: Private ordinary functions
Function, infer-logorc1: Private ordinary functions
Function, infer-logorc2: Private ordinary functions
Function, infer-rational-arithmetic-result: Private ordinary functions
Function, infer-type: Private ordinary functions
Function, infer-type-from-content: Private ordinary functions
Function, infer-type-from-contents: Private ordinary functions
Function, inferer-boundp: Private ordinary functions
Function, inlinable-diag: Private ordinary functions
Function, inlinable-eye: Private ordinary functions
Function, inlinable-inner: Private ordinary functions
Function, inlinable-kron: Private ordinary functions
Function, inlinable-matmul: Private ordinary functions
Function, inlinable-outer: Private ordinary functions
Function, inlinable-transpose: Private ordinary functions
Function, inlinable-tri: Private ordinary functions
Function, inlinable-tril: Private ordinary functions
Function, inlinable-triu: Private ordinary functions
Function, inlinable-vander: Private ordinary functions
Function, inlinable-vdot: Private ordinary functions
Function, inner: Public ordinary functions
Function, integer-length: Public ordinary functions
Function, interpret-type: Private ordinary functions
Function, intersection-to-float-type: Private ordinary functions
Function, interval-<: Private ordinary functions
Function, interval-add: Private ordinary functions
Function, interval-ceiling: Private ordinary functions
Function, interval-coerce: Private ordinary functions
Function, interval-connected-p: Private ordinary functions
Function, interval-div: Private ordinary functions
Function, interval-divlike: Private ordinary functions
Function, interval-fceiling: Private ordinary functions
Function, interval-ffloor: Private ordinary functions
Function, interval-floor: Private ordinary functions
Function, interval-fround: Private ordinary functions
Function, interval-ftruncate: Private ordinary functions
Function, interval-intersection: Private ordinary functions
Function, interval-max: Private ordinary functions
Function, interval-min: Private ordinary functions
Function, interval-mul: Private ordinary functions
Function, interval-postprocess-high: Private ordinary functions
Function, interval-postprocess-low: Private ordinary functions
Function, interval-preprocess-high: Private ordinary functions
Function, interval-preprocess-low: Private ordinary functions
Function, interval-round: Private ordinary functions
Function, interval-sub: Private ordinary functions
Function, interval-truncate: Private ordinary functions
Function, interval-union: Private ordinary functions
Function, isqrt: Public ordinary functions
Function, isqrt-inferer: Private ordinary functions
Function, kron: Public ordinary functions
Function, length: Public ordinary functions
Function, linspace: Public ordinary functions
Function, log: Public ordinary functions
Function, log-inferer: Private ordinary functions
Function, log2: Public ordinary functions
Function, logand: Public ordinary functions
Function, logandc1: Public ordinary functions
Function, logandc2: Public ordinary functions
Function, logc: Public ordinary functions
Function, logcount: Public ordinary functions
Function, logeqv: Public ordinary functions
Function, logior: Public ordinary functions
Function, lognand: Public ordinary functions
Function, lognor: Public ordinary functions
Function, lognot: Public ordinary functions
Function, logorc1: Public ordinary functions
Function, logorc2: Public ordinary functions
Function, logr-inferer: Private ordinary functions
Function, logxor: Public ordinary functions
Function, make-einsum-specs: Private ordinary functions
Function, make-version-string: Private ordinary functions
Function, map: Public ordinary functions
Function, map-array: Public ordinary functions
Function, map-array-into: Public ordinary functions
Function, map-into: Public ordinary functions
Function, map-specs: Private ordinary functions
Function, matmul: Public ordinary functions
Function, matmul*: Public ordinary functions
Function, matmul*-naive: Private ordinary functions
Function, matmul*-test: Private ordinary functions
Function, matmul*-thrashdin: Private ordinary functions
Function, matrix-chain-order: Private ordinary functions
Function, max: Public ordinary functions
Function, max-to-float-type: Private ordinary functions
Function, mean: Public ordinary functions
Function, memoized-einsum-function: Private ordinary functions
Function, min: Public ordinary functions
Function, min-to-float-type: Private ordinary functions
Function, mod: Public ordinary functions
Function, most-negative-value: Private ordinary functions
Function, most-positive-value: Private ordinary functions
Function, mul-to-float-type: Private ordinary functions
Function, multinomial: Public ordinary functions
Function, nan-result-negative-lb: Private ordinary functions
Function, nan-result-negative-ub: Private ordinary functions
Function, nan-result-positive-lb: Private ordinary functions
Function, nan-result-positive-ub: Private ordinary functions
Function, negative-binomial: Public ordinary functions
Function, nonzero: Public ordinary functions
Function, normal: Public ordinary functions
Function, normalize-index: Private ordinary functions
Function, normalize-subscripts: Private ordinary functions
Function, numcl-array-p: Public ordinary functions
Function, numcl-version: Public ordinary functions
Function, numerator: Public ordinary functions
Function, o-avar: Private ordinary functions
Function, o-avars: Private ordinary functions
Function, o-evars: Private ordinary functions
Function, o-idx: Private ordinary functions
Function, o-idxs: Private ordinary functions
Function, o-p: Private ordinary functions
Function, one-value: Private ordinary functions
Function, ones: Public ordinary functions
Function, ones-like: Public ordinary functions
Function, outer: Public ordinary functions
Function, phase: Public ordinary functions
Function, plan-broadcast: Private ordinary functions
Function, poisson: Public ordinary functions
Function, postprocess: Private ordinary functions
Function, prod: Public ordinary functions
Function, range-width: Private ordinary functions
Function, rank: Public ordinary functions
Function, realpart: Public ordinary functions
Function, reduce-array: Public ordinary functions
Function, reduce-lambda: Private ordinary functions
Function, rem: Public ordinary functions
Function, rem-inferer: Private ordinary functions
Function, reshape: Public ordinary functions
Function, result-shape: Private ordinary functions
Function, round: Public ordinary functions
Function, round-inferer: Private ordinary functions
Function, safe-float-infinity-p: Private ordinary functions
Function, safe-float-nan-p: Private ordinary functions
Function, safe-string=: Private ordinary functions
Function, sb: Private ordinary functions
Function, set-type-inferer: Private ordinary functions
Function, shape: Public ordinary functions
Function, shape-resolver: Private ordinary functions
Function, shuffle: Public ordinary functions
Function, signed-zero-lb: Private ordinary functions
Function, signed-zero-ub: Private ordinary functions
Function, signum: Public ordinary functions
Function, simplify-or-types: Private ordinary functions
Function, sin: Public ordinary functions
Function, sin-inferer: Private ordinary functions
Function, sinh: Public ordinary functions
Function, sinh-inferer: Private ordinary functions
Function, size: Public ordinary functions
Function, sort-locality: Private ordinary functions
Function, spec-depends-on: Private ordinary functions
Function, sqrt: Public ordinary functions
Function, sqrt-inferer: Private ordinary functions
Function, square: Public ordinary functions
Function, squeeze: Public ordinary functions
Function, stack: Public ordinary functions
Function, standard-deviation: Public ordinary functions
Function, stdev: Public ordinary functions
Function, strict-type-of: Private ordinary functions
Function, sub: Private ordinary functions
Function, sub-contiguous: Private ordinary functions
Function, sub-full: Private ordinary functions
Function, sub-p: Private ordinary functions
Function, sub-singleton: Private ordinary functions
Function, sub-start: Private ordinary functions
Function, sub-step: Private ordinary functions
Function, sub-stop: Private ordinary functions
Function, sub-to-float-type: Private ordinary functions
Function, sub-width: Private ordinary functions
Function, sum: Public ordinary functions
Function, symbol-inferer: Private ordinary functions
Function, take: Public ordinary functions
Function, tan: Public ordinary functions
Function, tan-inferer: Private ordinary functions
Function, tanh: Public ordinary functions
Function, tanh-inferer: Private ordinary functions
Function, to-simple-array: Public ordinary functions
Function, transpose: Public ordinary functions
Function, tri: Public ordinary functions
Function, tril: Public ordinary functions
Function, triu: Public ordinary functions
Function, truncate: Public ordinary functions
Function, truncate-inferer: Private ordinary functions
Function, type-connected-p: Private ordinary functions
Function, type-interval-<: Private ordinary functions
Function, typexpand: Private ordinary functions
Function, ub: Private ordinary functions
Function, uniform: Public ordinary functions
Function, union-to-float-type: Private ordinary functions
Function, unstack: Public ordinary functions
Function, vander: Public ordinary functions
Function, var: Public ordinary functions
Function, variance: Public ordinary functions
Function, vdot: Public ordinary functions
Function, where: Public ordinary functions
Function, zero-value: Private ordinary functions
Function, zeros: Public ordinary functions
Function, zeros-like: Public ordinary functions

G
gamma: Public ordinary functions
Generic Function, (setf invalid-array-index-error-axis): Public generic functions
Generic Function, (setf invalid-array-index-error-shape): Public generic functions
Generic Function, (setf invalid-array-index-error-subscripts): Public generic functions
Generic Function, einsum-body: Private generic functions
Generic Function, invalid-array-index-error-axis: Public generic functions
Generic Function, invalid-array-index-error-shape: Public generic functions
Generic Function, invalid-array-index-error-subscripts: Public generic functions

H
handle-sbcl-bug: Private ordinary functions
histogram: Public ordinary functions

I
i-avar: Private ordinary functions
i-avars: Private ordinary functions
i-evars: Private ordinary functions
i-idx: Private ordinary functions
i-idxs: Private ordinary functions
i-p: Private ordinary functions
imagpart: Public ordinary functions
in-current-package: Private macros
infer-logand: Private ordinary functions
infer-logandc1: Private ordinary functions
infer-logandc2: Private ordinary functions
infer-logeqv: Private ordinary functions
infer-logior: Private ordinary functions
infer-lognand: Private ordinary functions
infer-lognor: Private ordinary functions
infer-lognot: Private ordinary functions
infer-logorc1: Private ordinary functions
infer-logorc2: Private ordinary functions
infer-rational-arithmetic-result: Private ordinary functions
infer-type: Private ordinary functions
infer-type-from-content: Private ordinary functions
infer-type-from-contents: Private ordinary functions
inferer-boundp: Private ordinary functions
inlinable-diag: Private ordinary functions
inlinable-eye: Private ordinary functions
inlinable-inner: Private ordinary functions
inlinable-kron: Private ordinary functions
inlinable-matmul: Private ordinary functions
inlinable-outer: Private ordinary functions
inlinable-transpose: Private ordinary functions
inlinable-tri: Private ordinary functions
inlinable-tril: Private ordinary functions
inlinable-triu: Private ordinary functions
inlinable-vander: Private ordinary functions
inlinable-vdot: Private ordinary functions
inline-except-toplevel: Private macros
inner: Public compiler macros
inner: Public ordinary functions
integer-length: Public ordinary functions
interpret-type: Private ordinary functions
intersection-to-float-type: Private compiler macros
intersection-to-float-type: Private ordinary functions
interval-<: Private ordinary functions
interval-add: Private ordinary functions
interval-ceiling: Private ordinary functions
interval-coerce: Private ordinary functions
interval-connected-p: Private ordinary functions
interval-div: Private ordinary functions
interval-divlike: Private ordinary functions
interval-fceiling: Private ordinary functions
interval-ffloor: Private ordinary functions
interval-floor: Private ordinary functions
interval-fround: Private ordinary functions
interval-ftruncate: Private ordinary functions
interval-intersection: Private ordinary functions
interval-max: Private ordinary functions
interval-min: Private ordinary functions
interval-mul: Private ordinary functions
interval-postprocess-high: Private ordinary functions
interval-postprocess-low: Private ordinary functions
interval-preprocess-high: Private ordinary functions
interval-preprocess-low: Private ordinary functions
interval-round: Private ordinary functions
interval-sub: Private ordinary functions
interval-truncate: Private ordinary functions
interval-union: Private ordinary functions
invalid-array-index-error-axis: Public generic functions
invalid-array-index-error-axis: Public generic functions
invalid-array-index-error-shape: Public generic functions
invalid-array-index-error-shape: Public generic functions
invalid-array-index-error-subscripts: Public generic functions
invalid-array-index-error-subscripts: Public generic functions
isqrt: Public ordinary functions
isqrt-inferer: Private ordinary functions

K
kron: Public compiler macros
kron: Public ordinary functions

L
length: Public ordinary functions
let: Private macros
let*: Private macros
linspace: Public ordinary functions
locally: Private macros
log: Public ordinary functions
log-inferer: Private ordinary functions
log2: Public ordinary functions
logand: Public ordinary functions
logandc1: Public ordinary functions
logandc2: Public ordinary functions
logc: Public ordinary functions
logcount: Public ordinary functions
logeqv: Public ordinary functions
logior: Public ordinary functions
lognand: Public ordinary functions
lognor: Public ordinary functions
lognot: Public ordinary functions
logorc1: Public ordinary functions
logorc2: Public ordinary functions
logr-inferer: Private ordinary functions
logxor: Public ordinary functions

M
Macro, %when-function-is-global: Private macros
Macro, compile-time-type-of: Private macros
Macro, define-foldable-version: Private macros
Macro, define-simple-mapper: Private macros
Macro, do: Private macros
Macro, do*: Private macros
Macro, in-current-package: Private macros
Macro, inline-except-toplevel: Private macros
Macro, let: Private macros
Macro, let*: Private macros
Macro, locally: Private macros
Macro, printing: Private macros
Macro, without-*: Private macros
make-einsum-specs: Private ordinary functions
make-version-string: Private ordinary functions
map: Public ordinary functions
map-array: Public ordinary functions
map-array-into: Public compiler macros
map-array-into: Public ordinary functions
map-into: Public ordinary functions
map-specs: Private ordinary functions
matmul: Public compiler macros
matmul: Public ordinary functions
matmul*: Public compiler macros
matmul*: Public ordinary functions
matmul*-naive: Private ordinary functions
matmul*-test: Private ordinary functions
matmul*-thrashdin: Private ordinary functions
matrix-chain-order: Private ordinary functions
max: Public ordinary functions
max-to-float-type: Private ordinary functions
mean: Public ordinary functions
memoized-einsum-function: Private ordinary functions
Method, (setf invalid-array-index-error-axis): Public generic functions
Method, (setf invalid-array-index-error-shape): Public generic functions
Method, (setf invalid-array-index-error-subscripts): Public generic functions
Method, einsum-body: Private generic functions
Method, invalid-array-index-error-axis: Public generic functions
Method, invalid-array-index-error-shape: Public generic functions
Method, invalid-array-index-error-subscripts: Public generic functions
min: Public ordinary functions
min-to-float-type: Private ordinary functions
mod: Public ordinary functions
most-negative-value: Private compiler macros
most-negative-value: Private ordinary functions
most-positive-value: Private compiler macros
most-positive-value: Private ordinary functions
mul-to-float-type: Private ordinary functions
multinomial: Public ordinary functions

N
nan-result-negative-lb: Private ordinary functions
nan-result-negative-ub: Private ordinary functions
nan-result-positive-lb: Private ordinary functions
nan-result-positive-ub: Private ordinary functions
negative-binomial: Public ordinary functions
nonzero: Public ordinary functions
normal: Public ordinary functions
normalize-index: Private ordinary functions
normalize-subscripts: Private ordinary functions
numcl-array-p: Public ordinary functions
numcl-version: Public ordinary functions
numerator: Public ordinary functions

O
o-avar: Private ordinary functions
o-avars: Private ordinary functions
o-evars: Private ordinary functions
o-idx: Private ordinary functions
o-idxs: Private ordinary functions
o-p: Private ordinary functions
one-value: Private compiler macros
one-value: Private ordinary functions
ones: Public ordinary functions
ones-like: Public ordinary functions
outer: Public compiler macros
outer: Public ordinary functions

P
phase: Public ordinary functions
plan-broadcast: Private ordinary functions
poisson: Public ordinary functions
postprocess: Private ordinary functions
printing: Private macros
prod: Public ordinary functions

R
range-width: Private ordinary functions
rank: Public ordinary functions
realpart: Public ordinary functions
reduce-array: Public ordinary functions
reduce-lambda: Private ordinary functions
rem: Public ordinary functions
rem-inferer: Private ordinary functions
reshape: Public ordinary functions
result-shape: Private ordinary functions
round: Public ordinary functions
round-inferer: Private ordinary functions

S
safe-float-infinity-p: Private ordinary functions
safe-float-nan-p: Private ordinary functions
safe-string=: Private ordinary functions
sb: Private ordinary functions
set-type-inferer: Private ordinary functions
shape: Public ordinary functions
shape-resolver: Private ordinary functions
shuffle: Public ordinary functions
signed-zero-lb: Private ordinary functions
signed-zero-ub: Private ordinary functions
signum: Public ordinary functions
simplify-or-types: Private ordinary functions
sin: Public ordinary functions
sin-inferer: Private ordinary functions
sinh: Public ordinary functions
sinh-inferer: Private ordinary functions
size: Public ordinary functions
sort-locality: Private ordinary functions
spec-depends-on: Private ordinary functions
sqrt: Public ordinary functions
sqrt-inferer: Private ordinary functions
square: Public ordinary functions
squeeze: Public ordinary functions
stack: Public ordinary functions
standard-deviation: Public ordinary functions
stdev: Public ordinary functions
strict-type-of: Private ordinary functions
sub: Private ordinary functions
sub-contiguous: Private ordinary functions
sub-full: Private ordinary functions
sub-p: Private ordinary functions
sub-singleton: Private ordinary functions
sub-start: Private ordinary functions
sub-step: Private ordinary functions
sub-stop: Private ordinary functions
sub-to-float-type: Private ordinary functions
sub-width: Private ordinary functions
sum: Public ordinary functions
symbol-inferer: Private ordinary functions

T
take: Public ordinary functions
tan: Public ordinary functions
tan-inferer: Private ordinary functions
tanh: Public ordinary functions
tanh-inferer: Private ordinary functions
to-simple-array: Public ordinary functions
transpose: Public compiler macros
transpose: Public ordinary functions
tri: Public compiler macros
tri: Public ordinary functions
tril: Public compiler macros
tril: Public ordinary functions
triu: Public compiler macros
triu: Public ordinary functions
truncate: Public ordinary functions
truncate-inferer: Private ordinary functions
type-connected-p: Private ordinary functions
type-interval-<: Private ordinary functions
typexpand: Private ordinary functions

U
ub: Private ordinary functions
uniform: Public ordinary functions
union-to-float-type: Private compiler macros
union-to-float-type: Private ordinary functions
unstack: Public ordinary functions

V
vander: Public compiler macros
vander: Public ordinary functions
var: Public ordinary functions
variance: Public ordinary functions
vdot: Public compiler macros
vdot: Public ordinary functions

W
where: Public ordinary functions
without-*: Private macros

Z
zero-value: Private compiler macros
zero-value: Private ordinary functions
zeros: Public ordinary functions
zeros-like: Public ordinary functions

Jump to:   $   %   &   (   *   +   -   /   1   <   =   >   ?   @  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   R   S   T   U   V   W   Z  

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

A.3 Variables

Jump to:   %   *   +   /  
A   C   F   I   O   S   T   W  
Index Entry  Section

%
%float%: Private symbol macros

*
*: Public symbol macros
**: Public symbol macros
***: Public symbol macros
*aref-documentation*: Private symbol macros
*asarray-documentation*: Private symbol macros
*compiler*: Private special variables
*einsum-documentation*: Private symbol macros
*inferer-doc-table*: Private special variables
*inferer-table*: Private special variables
*initialized-idxs*: Private special variables
*memoized-einsum-function-cache*: Private special variables
*numcl-default-float-format*: Private constants
*used-evars*: Private special variables

+
+: Public symbol macros
++: Public symbol macros
+++: Public symbol macros
+quater+: Private constants
+zeros-doc+: Private special variables

/
/: Public symbol macros
//: Public symbol macros
///: Public symbol macros

A
axis: Public conditions

C
Constant, *numcl-default-float-format*: Private constants
Constant, +quater+: Private constants
contiguous: Private structures

F
full: Private structures

I
i-options: Private structures
i-specs: Private structures
iter-specs: Private structures

O
o-options: Private structures
o-specs: Private structures

S
shape: Public conditions
singleton: Private structures
Slot, axis: Public conditions
Slot, contiguous: Private structures
Slot, full: Private structures
Slot, i-options: Private structures
Slot, i-specs: Private structures
Slot, iter-specs: Private structures
Slot, o-options: Private structures
Slot, o-specs: Private structures
Slot, shape: Public conditions
Slot, singleton: Private structures
Slot, start: Private structures
Slot, step: Private structures
Slot, stop: Private structures
Slot, subscripts: Public conditions
Slot, transforms: Private structures
Slot, width: Private structures
Special Variable, *compiler*: Private special variables
Special Variable, *inferer-doc-table*: Private special variables
Special Variable, *inferer-table*: Private special variables
Special Variable, *initialized-idxs*: Private special variables
Special Variable, *memoized-einsum-function-cache*: Private special variables
Special Variable, *used-evars*: Private special variables
Special Variable, +zeros-doc+: Private special variables
start: Private structures
step: Private structures
stop: Private structures
subscripts: Public conditions
Symbol Macro, %float%: Private symbol macros
Symbol Macro, *: Public symbol macros
Symbol Macro, **: Public symbol macros
Symbol Macro, ***: Public symbol macros
Symbol Macro, *aref-documentation*: Private symbol macros
Symbol Macro, *asarray-documentation*: Private symbol macros
Symbol Macro, *einsum-documentation*: Private symbol macros
Symbol Macro, +: Public symbol macros
Symbol Macro, ++: Public symbol macros
Symbol Macro, +++: Public symbol macros
Symbol Macro, /: Public symbol macros
Symbol Macro, //: Public symbol macros
Symbol Macro, ///: Public symbol macros

T
transforms: Private structures

W
width: Private structures

Jump to:   %   *   +   /  
A   C   F   I   O   S   T   W  

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

A.4 Data types

Jump to:   0   1   2   3   4   5  
B   C   E   F   I   M   N   O   P   S   T   U  
Index Entry  Section

0
0package.lisp: The numcl/src/0package․lisp file
0specialops.lisp: The numcl/src/0specialops․lisp file

1
1constantfolded.lisp: The numcl/src/1constantfolded․lisp file
1constants.lisp: The numcl/src/1constants․lisp file
1docstrings.lisp: The numcl/src/1docstrings․lisp file
1instantiate.lisp: The numcl/src/1instantiate․lisp file
1type.lisp: The numcl/src/1type․lisp file
1util.lisp: The numcl/src/1util․lisp file
1version.lisp: The numcl/src/1version․lisp file

2
2alias.lisp: The numcl/src/2alias․lisp file
2aref.lisp: The numcl/src/2aref․lisp file
2typeinfer.lisp: The numcl/src/2typeinfer․lisp file

3
3arange.lisp: The numcl/src/3arange․lisp file
3array.lisp: The numcl/src/3array․lisp file
3copy.lisp: The numcl/src/3copy․lisp file
3einsum.lisp: The numcl/src/3einsum․lisp file
3zeros.lisp: The numcl/src/3zeros․lisp file

4
4concatenate.lisp: The numcl/src/4concatenate․lisp file
4einsum-backends/common-lisp.lisp: The numcl/src/4einsum-backends/common-lisp․lisp file
4linear-algebra2.lisp: The numcl/src/4linear-algebra2․lisp file
4linear-algebra3.lisp: The numcl/src/4linear-algebra3․lisp file

5
5numeric.lisp: The numcl/src/5numeric․lisp file
5random.lisp: The numcl/src/5random․lisp file
5reduce.lisp: The numcl/src/5reduce․lisp file
5where.lisp: The numcl/src/5where․lisp file

B
base-array: Private types

C
Condition, invalid-array-index-error: Public conditions
Condition, unbound-inferer: Private conditions

E
einsum-specs: Private structures

F
File, 0package.lisp: The numcl/src/0package․lisp file
File, 0specialops.lisp: The numcl/src/0specialops․lisp file
File, 1constantfolded.lisp: The numcl/src/1constantfolded․lisp file
File, 1constants.lisp: The numcl/src/1constants․lisp file
File, 1docstrings.lisp: The numcl/src/1docstrings․lisp file
File, 1instantiate.lisp: The numcl/src/1instantiate․lisp file
File, 1type.lisp: The numcl/src/1type․lisp file
File, 1util.lisp: The numcl/src/1util․lisp file
File, 1version.lisp: The numcl/src/1version․lisp file
File, 2alias.lisp: The numcl/src/2alias․lisp file
File, 2aref.lisp: The numcl/src/2aref․lisp file
File, 2typeinfer.lisp: The numcl/src/2typeinfer․lisp file
File, 3arange.lisp: The numcl/src/3arange․lisp file
File, 3array.lisp: The numcl/src/3array․lisp file
File, 3copy.lisp: The numcl/src/3copy․lisp file
File, 3einsum.lisp: The numcl/src/3einsum․lisp file
File, 3zeros.lisp: The numcl/src/3zeros․lisp file
File, 4concatenate.lisp: The numcl/src/4concatenate․lisp file
File, 4einsum-backends/common-lisp.lisp: The numcl/src/4einsum-backends/common-lisp․lisp file
File, 4linear-algebra2.lisp: The numcl/src/4linear-algebra2․lisp file
File, 4linear-algebra3.lisp: The numcl/src/4linear-algebra3․lisp file
File, 5numeric.lisp: The numcl/src/5numeric․lisp file
File, 5random.lisp: The numcl/src/5random․lisp file
File, 5reduce.lisp: The numcl/src/5reduce․lisp file
File, 5where.lisp: The numcl/src/5where․lisp file
File, numcl.asd: The numcl/numcl․asd file

I
i: Private types
index: Private types
inferer-type: Private types
invalid-array-index-error: Public conditions

M
Module, src: The numcl/src module

N
numcl: The numcl system
numcl: The numcl package
numcl-array: Public types
numcl.asd: The numcl/numcl․asd file
numcl.exported: The numcl․exported package
numcl.impl: The numcl․impl package

O
o: Private types

P
Package, numcl: The numcl package
Package, numcl.exported: The numcl․exported package
Package, numcl.impl: The numcl․impl package

S
src: The numcl/src module
Structure, einsum-specs: Private structures
Structure, sub: Private structures
sub: Private structures
System, numcl: The numcl system

T
Type, base-array: Private types
Type, i: Private types
Type, index: Private types
Type, inferer-type: Private types
Type, numcl-array: Public types
Type, o: Private types

U
unbound-inferer: Private conditions

Jump to:   0   1   2   3   4   5  
B   C   E   F   I   M   N   O   P   S   T   U