This is the mgl-mat Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:07:14 2024 GMT+0.
mgl-mat/mgl-mat.asd
mgl-mat/src/package.lisp
mgl-mat/src/cube.lisp
mgl-mat/src/util.lisp
mgl-mat/src/blas.lisp
mgl-mat/src/blas-functions.lisp
mgl-mat/src/cublas-grovel.lisp
mgl-mat/src/cublas.lisp
mgl-mat/src/cublas-functions.lisp
mgl-mat/src/foreign.lisp
mgl-mat/src/cuda-early.lisp
mgl-mat/src/cuda-kernel.lisp
mgl-mat/src/lisp-kernel.lisp
mgl-mat/src/curand.lisp
mgl-mat/src/cuda-late.lisp
mgl-mat/src/vec.lisp
mgl-mat/src/mat.lisp
mgl-mat/src/convolve.lisp
mgl-mat/src/max-pool.lisp
mgl-mat/src/doc.lisp
The main system appears first, followed by any subsystem dependency.
mgl-mat
MAT is library for working with multi-dimensional
arrays which supports efficient interfacing to foreign and CUDA
code. BLAS and CUBLAS bindings are available.
Gábor Melis <mega@retes.hu>
(GIT https://github.com/melisgl/mgl-mat.git)
MIT, see COPYING.
0.1.0
alexandria
(system).
bordeaux-threads
(system).
cffi
(system).
cffi-grovel
(system).
cl-cuda
(system).
num-utils
(system).
flexi-streams
(system).
ieee-floats
(system).
lla
(system).
mgl-pax
(system).
static-vectors
(system).
trivial-garbage
(system).
src
(module).
Modules are listed depth-first from the system components tree.
mgl-mat/src
mgl-mat
(system).
package.lisp
(file).
cube.lisp
(file).
util.lisp
(file).
blas.lisp
(file).
blas-functions.lisp
(file).
cublas-grovel.lisp
(file).
cublas.lisp
(file).
cublas-functions.lisp
(file).
foreign.lisp
(file).
cuda-early.lisp
(file).
cuda-kernel.lisp
(file).
lisp-kernel.lisp
(file).
curand.lisp
(file).
cuda-late.lisp
(file).
vec.lisp
(file).
mat.lisp
(file).
convolve.lisp
(file).
max-pool.lisp
(file).
doc.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
mgl-mat/mgl-mat.asd
mgl-mat/src/package.lisp
mgl-mat/src/cube.lisp
mgl-mat/src/util.lisp
mgl-mat/src/blas.lisp
mgl-mat/src/blas-functions.lisp
mgl-mat/src/cublas-grovel.lisp
mgl-mat/src/cublas.lisp
mgl-mat/src/cublas-functions.lisp
mgl-mat/src/foreign.lisp
mgl-mat/src/cuda-early.lisp
mgl-mat/src/cuda-kernel.lisp
mgl-mat/src/lisp-kernel.lisp
mgl-mat/src/curand.lisp
mgl-mat/src/cuda-late.lisp
mgl-mat/src/vec.lisp
mgl-mat/src/mat.lisp
mgl-mat/src/convolve.lisp
mgl-mat/src/max-pool.lisp
mgl-mat/src/doc.lisp
mgl-mat/src/cube.lisp
package.lisp
(file).
src
(module).
*default-synchronization*
(special variable).
*let-input-through-p*
(special variable).
*let-output-through-p*
(special variable).
*maybe-synchronize-cube*
(special variable).
add-facet-reference-by-name
(function).
call-with-facet*
(generic function).
check-no-watchers
(function).
check-no-writers
(function).
copy-facet*
(generic function).
count-barred-facets
(function).
cube
(class).
define-facet-name
(macro).
destroy-cube
(function).
destroy-facet
(function).
destroy-facet*
(generic function).
direction
(type).
facet
(structure).
facet-description
(reader).
(setf facet-description)
(writer).
facet-direction
(reader).
(setf facet-direction)
(writer).
facet-n-watchers
(reader).
(setf facet-n-watchers)
(writer).
facet-name
(reader).
(setf facet-name)
(writer).
facet-up-to-date-p
(reader).
(setf facet-up-to-date-p)
(writer).
facet-up-to-date-p*
(generic function).
facet-value
(reader).
(setf facet-value)
(writer).
facet-watcher-threads
(reader).
(setf facet-watcher-threads)
(writer).
facets
(function).
find-facet
(function).
make-facet*
(generic function).
remove-facet-reference
(function).
remove-facet-reference-by-name
(function).
select-copy-source-for-facet*
(generic function).
synchronization
(reader method).
(setf synchronization)
(writer method).
unwatch-facet
(generic function).
watch-facet
(generic function).
with-facet
(macro).
with-facet-barrier
(macro).
with-facets
(macro).
%facets
(reader method).
*facet-barriers*
(special variable).
@cube-basics
(special variable).
@cube-default-call-with-facet*
(special variable).
@cube-facet-barrier
(special variable).
@cube-facet-extension-api
(special variable).
@cube-facets
(special variable).
@cube-introduction
(special variable).
@cube-lifetime
(special variable).
@cube-links
(special variable).
@cube-manual
(special variable).
@cube-synchronization
(special variable).
add-facet
(function).
cleanup-cube
(function).
cleanup-facets
(function).
compare-and-swap
(macro).
copy-facet
(function).
copy-facet-barrier
(function).
copy-references
(function).
deregister-cube-facet
(function).
ensure-cube-finalized
(function).
ensure-facet
(function).
expand-with-facets
(function).
facet-barred-p
(function).
facet-barrier
(structure).
facet-barrier-cube-type
(reader).
(setf facet-barrier-cube-type)
(writer).
facet-barrier-cubes-to-barred-facets
(reader).
(setf facet-barrier-cubes-to-barred-facets)
(writer).
facet-barrier-destroys
(reader).
(setf facet-barrier-destroys)
(writer).
facet-barrier-ensures
(reader).
(setf facet-barrier-ensures)
(writer).
facet-barrier-p
(function).
facet-name-dref
(class).
facet-p
(function).
facet-references
(reader).
(setf facet-references)
(writer).
find-up-to-date-facet
(function).
get-permission-to-destroy
(function).
has-finalizer-p
(reader method).
(setf has-finalizer-p)
(writer method).
has-watchers-p
(function).
has-writers-p
(function).
incf-references
(function).
lock
(reader method).
(setf lock)
(writer method).
make-facet
(function).
make-facet-barrier
(function).
make-references
(function).
references
(structure).
references-list
(reader).
(setf references-list)
(writer).
references-n
(reader).
(setf references-n)
(writer).
references-p
(function).
register-cube-facet
(function).
synchronize-cube-p
(function).
with-cube-locked
(macro).
without-interrupts
(macro).
mgl-mat/src/util.lisp
cube.lisp
(file).
src
(module).
*default-mat-ctype*
(special variable).
*supported-ctypes*
(special variable).
coerce-to-ctype
(function).
ctype
(type).
*lisp-foreign-cuda-lla-types*
(special variable).
*mat-param-type*
(special variable).
*no-array-bounds-check*
(special variable).
*thread-cache-lock*
(special variable).
*thread-caches*
(special variable).
@mat-ctypes
(special variable).
append-to-symbol
(function).
base-pointer
(reader method).
borrow-thread-cached-object
(function).
clip
(function).
convert-param-type
(function).
convert-param-types
(function).
ctype->cuda
(function).
ctype->lisp
(function).
ctype->lla
(function).
ctype->lla-internal
(function).
ctype-blas-prefix
(function).
ctype-size
(function).
double-float-vector
(type).
ensure-pointer-param
(function).
facet-vars
(function).
index
(type).
lisp->ctype
(function).
map-tree
(function).
mat-param-p
(function).
memcpy
(function).
non-mat-output-param-p
(function).
offset
(reader method).
offset-pointer
(generic function).
offset-pointer
(class).
param-direction
(function).
param-name
(function).
param-type
(function).
pointer-n-bytes
(reader method).
read-as-bytes
(function).
read-double-float-vector
(function).
read-double-float-vector/generic
(function).
read-single-float-vector
(function).
read-single-float-vector/generic
(function).
return-thread-cached-object
(function).
round-up
(function).
single-float-vector
(type).
sync->fd
(function).
sync<-fd
(function).
the!
(macro).
with-thread-cached-object
(macro).
with-zero-on-underflow
(macro).
write-as-bytes
(function).
write-double-float-vector
(function).
write-double-float-vector/generic
(function).
write-single-float-vector
(function).
write-single-float-vector/generic
(function).
mgl-mat/src/blas.lisp
util.lisp
(file).
src
(module).
blas-call-form
(function).
blas-call-form*
(function).
blas-foreign-function-name
(function).
blas-funcall-form
(function).
blas-function-name
(function).
blas-function-name*
(macro).
call-blas-function
(macro).
define-blas-function
(macro).
mgl-mat/src/blas-functions.lisp
blas.lisp
(file).
src
(module).
blas-asum
(function).
blas-axpy
(function).
blas-copy
(function).
blas-dasum
(function).
blas-daxpy
(function).
blas-dcopy
(function).
blas-ddot
(function).
blas-dgemm
(function).
blas-dnrm2
(function).
blas-dot
(function).
blas-dscal
(function).
blas-gemm
(function).
blas-nrm2
(function).
blas-sasum
(function).
blas-saxpy
(function).
blas-scal
(function).
blas-scopy
(function).
blas-sdot
(function).
blas-sgemm
(function).
blas-snrm2
(function).
blas-sscal
(function).
mgl-mat/src/cublas-grovel.lisp
:cuda-sdk
blas-functions.lisp
(file).
src
(module).
mgl-mat/src/cublas.lisp
cublas-grovel.lisp
(file).
blas-functions.lisp
(file).
src
(module).
*cublas-handle*
(special variable).
cublas-create
(function).
cublas-destroy
(function).
cublas-error
(condition).
cublas-error-function-name
(reader method).
cublas-error-status
(reader method).
cublas-get-version
(function).
with-cublas-handle
(macro).
%cublas-destroy
(function).
%cublas-get-version
(function).
@mat-cublas
(special variable).
call-cublas-function
(macro).
check-cuda-sdk
(function).
cublas-call-form
(function).
cublas-call-form*
(function).
cublas-foreign-function-name
(function).
cublas-funcall-form
(function).
cublas-function-name
(function).
cublas-function-name*
(macro).
define-auxiliary-cublas-function
(macro).
define-cublas-function
(macro).
mgl-mat/src/cublas-functions.lisp
cublas.lisp
(file).
src
(module).
cublas-asum
(function).
cublas-axpy
(function).
cublas-copy
(function).
cublas-dasum
(function).
cublas-daxpy
(function).
cublas-dcopy
(function).
cublas-ddot
(function).
cublas-dgemm
(function).
cublas-dnrm2
(function).
cublas-dot
(function).
cublas-dscal
(function).
cublas-gemm
(function).
cublas-nrm2
(function).
cublas-sasum
(function).
cublas-saxpy
(function).
cublas-scal
(function).
cublas-scopy
(function).
cublas-sdot
(function).
cublas-sgemm
(function).
cublas-snrm2
(function).
cublas-sscal
(function).
mgl-mat/src/foreign.lisp
cublas-functions.lisp
(file).
src
(module).
*foreign-array-strategy*
(special variable).
foreign-array
(class).
foreign-array-strategy
(type).
foreign-room
(function).
pinning-supported-p
(function).
*foreign-pool*
(special variable).
@mat-foreign
(special variable).
alloc-static-vector
(function).
cuda-pool
(reader method).
(setf cuda-pool)
(writer method).
foreign-pool
(class).
free-static-vector
(function).
lock
(reader method).
lock
(reader method).
(setf lock)
(writer method).
n-references
(reader method).
(setf n-references)
(writer method).
n-static-arrays
(reader method).
(setf n-static-arrays)
(writer method).
n-static-bytes-allocated
(reader method).
(setf n-static-bytes-allocated)
(writer method).
use-pinning-p
(function).
with-foreign-array-locked
(macro).
with-foreign-pool-locked
(macro).
mgl-mat/src/cuda-early.lisp
foreign.lisp
(file).
src
(module).
*cuda-enabled*
(special variable).
*syncing-cuda-facets-safe-p*
(special variable).
choose-1d-block-and-grid
(function).
choose-2d-block-and-grid
(function).
choose-3d-block-and-grid
(function).
cuda-array
(class).
cuda-host-array
(class).
cuda-out-of-memory
(condition).
use-cuda-p
(function).
with-syncing-cuda-facets
(macro).
*cuda-copy-stream*
(special variable).
*cuda-max-n-blocks*
(special variable).
*cuda-n-streaming-multiprocessors*
(special variable).
*cuda-pool*
(special variable).
*cuda-warp-size*
(special variable).
@mat-cuda
(special variable).
@mat-cuda-extensions
(special variable).
@mat-cuda-memory-management
(special variable).
add-host-array-to-be-unregistered
(function).
alloc-cuda-vector
(function).
alloc-cuda-vector-with-recovery
(function).
allocate-to-pool
(function).
copy-list-holder
(function).
cuda-pool
(reader method).
cuda-pool
(reader method).
(setf cuda-pool)
(writer method).
cuda-pool
(class).
cuda-vector
(class).
destroys
(reader method).
ensures
(reader method).
fake-writer
(function).
finish-syncing-cuda-facets
(function).
free-cuda-vector
(function).
free-some-reusables
(function).
host-arrays-to-be-unregistered
(reader method).
(setf host-arrays-to-be-unregistered)
(writer method).
list-holder
(structure).
list-holder-list
(reader).
(setf list-holder-list)
(writer).
list-holder-p
(function).
lock
(reader method).
make-list-holder
(function).
maybe-unregister-pointers
(function).
n-bytes
(reader method).
n-bytes-allocated
(reader method).
(setf n-bytes-allocated)
(writer method).
n-bytes-free
(reader method).
(setf n-bytes-free)
(writer method).
n-bytes-host-array-registered
(reader method).
(setf n-bytes-host-array-registered)
(writer method).
n-bytes-reusable
(reader method).
(setf n-bytes-reusable)
(writer method).
process-pool
(function).
reallocate-from-pool
(function).
register-cuda-host-array
(function).
remove-fake-writer
(function).
return-to-pool
(function).
reusables
(reader method).
(setf reusables)
(writer method).
start-syncing-cuda-facets
(function).
sync-token
(class).
try-to-free-cuda-memory-1
(function).
try-to-free-cuda-memory-2
(function).
try-to-free-cuda-memory-3
(function).
unregister-cuda-host-array
(function).
unregister-cuda-host-array-now
(function).
with-cuda-pool
(macro).
with-cuda-pool-locked
(macro).
mgl-mat/src/cuda-kernel.lisp
cuda-early.lisp
(file).
src
(module).
define-cuda-kernel
(macro).
call-cuda-kernel
(macro).
convert-to-cuda-code
(function).
cuda-code
(function).
cuda-kernel-name
(function).
param-to-cuda
(function).
mgl-mat/src/lisp-kernel.lisp
cuda-kernel.lisp
(file).
src
(module).
*default-lisp-kernel-declarations*
(special variable).
define-lisp-kernel
(macro).
@mat-lisp-extensions
(special variable).
call-lisp-kernel
(macro).
convert-to-lisp-code
(function).
lisp-code
(function).
lisp-kernel-name
(function).
params-to-type-declarations
(function).
mgl-mat/src/curand.lisp
lisp-kernel.lisp
(file).
src
(module).
*curand-state*
(special variable).
curand-xorwow-state
(class).
n-states
(reader method).
states
(reader method).
with-curand-state
(macro).
@mat-curand
(special variable).
copy-curand-state
(generic function).
copy-xorwow-states
(function).
curand-init-xorwow-simple
(function).
curand-normal
(generic function).
curand-normal-xorwow
(function).
curand-normal-xorwow-d
(function).
curand-normal-xorwow-s
(function).
curand-state
(class).
curand-uniform
(generic function).
curand-uniform-xorwow
(function).
curand-uniform-xorwow-d
(function).
curand-uniform-xorwow-s
(function).
destroy-curand-state
(generic function).
make-xorwow-state/simple
(function).
sanitize-n-random-states
(function).
mgl-mat/src/cuda-late.lisp
curand.lisp
(file).
src
(module).
*cuda-default-device-id*
(special variable).
*cuda-default-n-random-states*
(special variable).
*cuda-default-random-seed*
(special variable).
*n-memcpy-device-to-host*
(special variable).
*n-memcpy-host-to-device*
(special variable).
call-with-cuda
(function).
cuda-available-p
(function).
cuda-room
(function).
with-cuda*
(macro).
with-cuda-stream
(macro).
mgl-mat/src/vec.lisp
cuda-late.lisp
(file).
src
(module).
copy-facet*
(method).
copy-facet*
(method).
copy-facet*
(method).
copy-facet*
(method).
copy-facet*
(method).
copy-facet*
(method).
destroy-facet*
(method).
destroy-facet*
(method).
destroy-facet*
(method).
initialize-instance
(method).
make-facet*
(method).
make-facet*
(method).
make-facet*
(method).
print-object
(method).
*print-vec*
(special variable).
*print-vec-facets*
(special variable).
print-vec-facets
(function).
vec
(class).
vec-ctype
(reader method).
vec-facet-to-char
(function).
vec-initial-element
(reader method).
vec-n-bytes
(reader method).
vec-size
(reader method).
will-be-copied-over-p
(function).
mgl-mat/src/mat.lisp
vec.lisp
(file).
src
(module).
*default-mat-cuda-enabled*
(special variable).
*mat-headers*
(special variable).
*print-mat*
(special variable).
*print-mat-facets*
(special variable).
.*!
(function).
.+!
(function).
.<!
(function).
.cos!
(function).
.cosh!
(function).
.exp!
(function).
.expt!
(function).
.inv!
(function).
.log!
(function).
.logistic!
(function).
.max!
(function).
.min!
(function).
.sin!
(function).
.sinh!
(function).
.sqrt!
(function).
.square!
(function).
.tan!
(function).
.tanh!
(function).
add-sign!
(function).
adjust!
(function).
array-to-mat
(function).
asum
(function).
axpy!
(function).
call-with-facet*
(method).
call-with-facet*
(method).
call-with-facet*
(method).
call-with-facet*
(method).
call-with-facet*
(method).
copy!
(function).
copy-column
(function).
copy-facet*
(method).
copy-mat
(function).
copy-random-state
(generic function).
copy-row
(function).
cuda-enabled
(reader method).
(setf cuda-enabled)
(writer method).
destroy-facet*
(method).
destroy-facet*
(method).
destroy-facet*
(method).
destroy-facet*
(method).
destroy-facet*
(method).
displace
(function).
displace!
(function).
facet-up-to-date-p*
(method).
fill!
(function).
gaussian-random!
(function).
geem!
(function).
geerv!
(function).
gemm!
(function).
initialize-instance
(method).
invert
(function).
logdet
(function).
m*
(function).
m+
(function).
m-
(function).
m=
(function).
make-facet*
(method).
make-facet*
(method).
make-facet*
(method).
make-facet*
(method).
make-facet*
(method).
make-mat
(function).
map-concat
(function).
map-displacements
(function).
map-mats-into
(function).
mat
(class).
mat-as-scalar
(function).
mat-ctype
(reader method).
mat-dimension
(function).
mat-dimensions
(reader method).
mat-displacement
(reader method).
mat-initial-element
(reader method).
mat-max-size
(reader method).
mat-room
(function).
mat-row-major-index
(function).
mat-size
(reader method).
mat-to-array
(function).
mm*
(function).
(setf mref)
(setf expander).
mref
(function).
mv-gaussian-random
(function).
nrm2
(function).
orthogonal-random!
(function).
print-object
(method).
read-mat
(generic function).
replace!
(function).
reshape
(function).
reshape!
(function).
reshape-and-displace
(function).
reshape-and-displace!
(function).
reshape-to-row-matrix!
(function).
(setf row-major-mref)
(setf expander).
row-major-mref
(function).
scal!
(function).
scalar-as-mat
(function).
scale-columns!
(function).
scale-rows!
(function).
select-copy-source-for-facet*
(method).
stack
(function).
stack!
(function).
sum!
(function).
transpose
(function).
uniform-random!
(function).
watch-facet
(method).
with-mat-counters
(macro).
with-ones
(macro).
with-shape-and-displacement
(macro).
with-thread-cached-mat
(macro).
with-thread-cached-mats
(macro).
write-mat
(generic function).
*counters*
(special variable).
@mat-assembling
(special variable).
@mat-basics
(special variable).
@mat-blas
(special variable).
@mat-caching
(special variable).
@mat-debugging
(special variable).
@mat-destructive-api
(special variable).
@mat-extensions
(special variable).
@mat-facet-api
(special variable).
@mat-facets
(special variable).
@mat-installation
(special variable).
@mat-introduction
(special variable).
@mat-io
(special variable).
@mat-links
(special variable).
@mat-manual
(special variable).
@mat-mappings
(special variable).
@mat-non-destructive-api
(special variable).
@mat-printing
(special variable).
@mat-random
(special variable).
@mat-shaping
(special variable).
@mat-shaping-comparison-to-lisp
(special variable).
@mat-shaping-destructive
(special variable).
@mat-shaping-functional
(special variable).
@mat-tutorial
(special variable).
@mat-what-is-it
(special variable).
@mat-what-kind-of-matrices
(special variable).
common-mat-ctype
(function).
cuda-.+!
(function).
cuda-.+!-d
(function).
cuda-.+!-s
(function).
cuda-.cos!
(function).
cuda-.cos!-d
(function).
cuda-.cos!-s
(function).
cuda-.cosh!
(function).
cuda-.cosh!-d
(function).
cuda-.cosh!-s
(function).
cuda-.exp!
(function).
cuda-.exp!-d
(function).
cuda-.exp!-s
(function).
cuda-.expt!
(function).
cuda-.expt!-d
(function).
cuda-.expt!-s
(function).
cuda-.inv!
(function).
cuda-.inv!-d
(function).
cuda-.inv!-s
(function).
cuda-.log!
(function).
cuda-.log!-d
(function).
cuda-.log!-s
(function).
cuda-.logistic!
(function).
cuda-.logistic!-d
(function).
cuda-.logistic!-s
(function).
cuda-.max!
(function).
cuda-.max!-d
(function).
cuda-.max!-s
(function).
cuda-.min!
(function).
cuda-.min!-d
(function).
cuda-.min!-s
(function).
cuda-.sin!
(function).
cuda-.sin!-d
(function).
cuda-.sin!-s
(function).
cuda-.sinh!
(function).
cuda-.sinh!-d
(function).
cuda-.sinh!-s
(function).
cuda-.sqrt!
(function).
cuda-.sqrt!-d
(function).
cuda-.sqrt!-s
(function).
cuda-.square!
(function).
cuda-.square!-d
(function).
cuda-.square!-s
(function).
cuda-.tan!
(function).
cuda-.tan!-d
(function).
cuda-.tan!-s
(function).
cuda-.tanh!
(function).
cuda-.tanh!-d
(function).
cuda-.tanh!-s
(function).
cuda-add-sign!
(function).
cuda-add-sign!-d
(function).
cuda-add-sign!-s
(function).
cuda-fill!
(function).
cuda-fill!-2
(function).
cuda-fill!-d
(function).
cuda-fill!-s
(function).
cuda-geem!
(function).
cuda-geem!-d
(function).
cuda-geem!-s
(function).
cuda-geerv!
(function).
cuda-geerv!-d
(function).
cuda-geerv!-s
(function).
cuda-less-than!
(function).
cuda-less-than!-d
(function).
cuda-less-than!-s
(function).
cuda-scale-columns!
(function).
cuda-scale-columns!-d
(function).
cuda-scale-columns!-s
(function).
cuda-scale-rows!
(function).
cuda-scale-rows!-d
(function).
cuda-scale-rows!-s
(function).
cuda-setf-mref
(function).
cuda-setf-mref-d
(function).
cuda-setf-mref-s
(function).
define-elementwise-cuda-kernel
(macro).
define-elementwise-dispatcher
(macro).
define-elementwise-lisp-kernel
(macro).
dimensions-total-size
(function).
displacement-bytes
(function).
end-of-logdet-example
(special variable).
gaussian-random-1
(function).
lisp-.+!
(function).
lisp-.+!-d
(function).
lisp-.+!-s
(function).
lisp-.cos!
(function).
lisp-.cos!-d
(function).
lisp-.cos!-s
(function).
lisp-.cosh!
(function).
lisp-.cosh!-d
(function).
lisp-.cosh!-s
(function).
lisp-.exp!
(function).
lisp-.exp!-d
(function).
lisp-.exp!-s
(function).
lisp-.expt!
(function).
lisp-.expt!-d
(function).
lisp-.expt!-s
(function).
lisp-.inv!
(function).
lisp-.inv!-d
(function).
lisp-.inv!-s
(function).
lisp-.log!
(function).
lisp-.log!-d
(function).
lisp-.log!-s
(function).
lisp-.logistic!
(function).
lisp-.logistic!-d
(function).
lisp-.logistic!-s
(function).
lisp-.max!
(function).
lisp-.max!-d
(function).
lisp-.max!-s
(function).
lisp-.min!
(function).
lisp-.min!-d
(function).
lisp-.min!-s
(function).
lisp-.sin!
(function).
lisp-.sin!-d
(function).
lisp-.sin!-s
(function).
lisp-.sinh!
(function).
lisp-.sinh!-d
(function).
lisp-.sinh!-s
(function).
lisp-.sqrt!
(function).
lisp-.sqrt!-d
(function).
lisp-.sqrt!-s
(function).
lisp-.square!
(function).
lisp-.square!-d
(function).
lisp-.square!-s
(function).
lisp-.tan!
(function).
lisp-.tan!-d
(function).
lisp-.tan!-s
(function).
lisp-.tanh!
(function).
lisp-.tanh!-d
(function).
lisp-.tanh!-s
(function).
lisp-add-sign!
(function).
lisp-add-sign!-d
(function).
lisp-add-sign!-s
(function).
lisp-geem!
(function).
lisp-geem!-d
(function).
lisp-geem!-s
(function).
lisp-geerv!
(function).
lisp-geerv!-d
(function).
lisp-geerv!-s
(function).
lisp-less-than!
(function).
lisp-less-than!-d
(function).
lisp-less-than!-s
(function).
lisp-scale-columns!
(function).
lisp-scale-columns!-d
(function).
lisp-scale-columns!-s
(function).
lisp-scale-rows!
(function).
lisp-scale-rows!-d
(function).
lisp-scale-rows!-s
(function).
lisp-uniform-random
(function).
lisp-uniform-random-d
(function).
lisp-uniform-random-s
(function).
make-array-facet
(function).
mat-facet-to-char
(function).
maybe-rewire-to
(function).
note-allocation
(function).
print-mat-dimensions
(function).
print-mat-facets
(function).
read-mat-header
(function).
replace-vector
(function).
reshape-and-displace-facet*
(generic function).
set-mref
(function).
set-row-major-mref
(function).
vec
(reader method).
vec-facet
(function).
vec-facet-name
(function).
with-character-stream
(macro).
with-shape-and-displacement-restored
(macro).
write-mat-header
(function).
mgl-mat/src/convolve.lisp
mat.lisp
(file).
src
(module).
convolve!
(function).
derive-convolve!
(function).
check-dimensions
(function).
cuda-convolve-2d
(function).
cuda-convolve-2d-d
(function).
cuda-convolve-2d-s
(function).
cuda-derive-convolve-2d
(function).
cuda-derive-convolve-2d-d
(function).
cuda-derive-convolve-2d-s
(function).
lisp-convolve-2d
(function).
lisp-convolve-2d-d
(function).
lisp-convolve-2d-s
(function).
lisp-derive-convolve-2d
(function).
lisp-derive-convolve-2d-d
(function).
lisp-derive-convolve-2d-s
(function).
valid-multi-dimensional-index-p
(function).
mgl-mat/src/max-pool.lisp
convolve.lisp
(file).
src
(module).
derive-max-pool!
(function).
max-pool!
(function).
cuda-derive-max-pool-2d
(function).
cuda-derive-max-pool-2d-d
(function).
cuda-derive-max-pool-2d-s
(function).
cuda-max-pool-2d
(function).
cuda-max-pool-2d-d
(function).
cuda-max-pool-2d-s
(function).
lisp-derive-max-pool-2d
(function).
lisp-derive-max-pool-2d-d
(function).
lisp-derive-max-pool-2d-s
(function).
lisp-max-pool-2d
(function).
lisp-max-pool-2d-d
(function).
lisp-max-pool-2d-s
(function).
mgl-mat/src/doc.lisp
max-pool.lisp
(file).
src
(module).
pax-pages
(function).
pax-sections
(function).
Packages are listed by definition order.
mgl-cube
See MGL-CUBE::@CUBE-MANUAL.
common-lisp
.
mgl-pax
.
*default-synchronization*
(special variable).
*let-input-through-p*
(special variable).
*let-output-through-p*
(special variable).
*maybe-synchronize-cube*
(special variable).
add-facet-reference-by-name
(function).
call-with-facet*
(generic function).
check-no-watchers
(function).
check-no-writers
(function).
copy-facet*
(generic function).
count-barred-facets
(function).
cube
(class).
define-facet-name
(macro).
destroy-cube
(function).
destroy-facet
(function).
destroy-facet*
(generic function).
direction
(type).
facet
(structure).
facet-description
(reader).
(setf facet-description)
(writer).
facet-direction
(reader).
(setf facet-direction)
(writer).
facet-n-watchers
(reader).
(setf facet-n-watchers)
(writer).
facet-name
(reader).
(setf facet-name)
(writer).
facet-up-to-date-p
(reader).
(setf facet-up-to-date-p)
(writer).
facet-up-to-date-p*
(generic function).
facet-value
(reader).
(setf facet-value)
(writer).
facet-watcher-threads
(reader).
(setf facet-watcher-threads)
(writer).
facets
(function).
find-facet
(function).
make-facet*
(generic function).
remove-facet-reference
(function).
remove-facet-reference-by-name
(function).
select-copy-source-for-facet*
(generic function).
synchronization
(generic reader).
(setf synchronization)
(generic writer).
unwatch-facet
(generic function).
watch-facet
(generic function).
with-facet
(macro).
with-facet-barrier
(macro).
with-facets
(macro).
%facets
(generic reader).
*facet-barriers*
(special variable).
@cube-basics
(special variable).
@cube-default-call-with-facet*
(special variable).
@cube-facet-barrier
(special variable).
@cube-facet-extension-api
(special variable).
@cube-facets
(special variable).
@cube-introduction
(special variable).
@cube-lifetime
(special variable).
@cube-links
(special variable).
@cube-manual
(special variable).
@cube-synchronization
(special variable).
add-facet
(function).
cleanup-cube
(function).
cleanup-facets
(function).
compare-and-swap
(macro).
copy-facet
(function).
copy-facet-barrier
(function).
copy-references
(function).
deregister-cube-facet
(function).
ensure-cube-finalized
(function).
ensure-facet
(function).
expand-with-facets
(function).
facet-barred-p
(function).
facet-barrier
(structure).
facet-barrier-cube-type
(reader).
(setf facet-barrier-cube-type)
(writer).
facet-barrier-cubes-to-barred-facets
(reader).
(setf facet-barrier-cubes-to-barred-facets)
(writer).
facet-barrier-destroys
(reader).
(setf facet-barrier-destroys)
(writer).
facet-barrier-ensures
(reader).
(setf facet-barrier-ensures)
(writer).
facet-barrier-p
(function).
facet-name-dref
(class).
facet-p
(function).
facet-references
(reader).
(setf facet-references)
(writer).
find-up-to-date-facet
(function).
get-permission-to-destroy
(function).
has-finalizer-p
(generic reader).
(setf has-finalizer-p)
(generic writer).
has-watchers-p
(function).
has-writers-p
(function).
incf-references
(function).
lock
(generic reader).
(setf lock)
(generic writer).
make-facet
(function).
make-facet-barrier
(function).
make-references
(function).
references
(structure).
references-list
(reader).
(setf references-list)
(writer).
references-n
(reader).
(setf references-n)
(writer).
references-p
(function).
register-cube-facet
(function).
synchronize-cube-p
(function).
with-cube-locked
(macro).
without-interrupts
(macro).
mgl-mat
See MGL-MAT::@MAT-MANUAL.
cl-cuda
.
common-lisp
.
mgl-cube
.
mgl-pax
.
*cublas-handle*
(special variable).
*cuda-default-device-id*
(special variable).
*cuda-default-n-random-states*
(special variable).
*cuda-default-random-seed*
(special variable).
*cuda-enabled*
(special variable).
*curand-state*
(special variable).
*default-lisp-kernel-declarations*
(special variable).
*default-mat-ctype*
(special variable).
*default-mat-cuda-enabled*
(special variable).
*foreign-array-strategy*
(special variable).
*mat-headers*
(special variable).
*n-memcpy-device-to-host*
(special variable).
*n-memcpy-host-to-device*
(special variable).
*print-mat*
(special variable).
*print-mat-facets*
(special variable).
*supported-ctypes*
(special variable).
*syncing-cuda-facets-safe-p*
(special variable).
.*!
(function).
.+!
(function).
.<!
(function).
.cos!
(function).
.cosh!
(function).
.exp!
(function).
.expt!
(function).
.inv!
(function).
.log!
(function).
.logistic!
(function).
.max!
(function).
.min!
(function).
.sin!
(function).
.sinh!
(function).
.sqrt!
(function).
.square!
(function).
.tan!
(function).
.tanh!
(function).
add-sign!
(function).
adjust!
(function).
array-to-mat
(function).
asum
(function).
axpy!
(function).
call-with-cuda
(function).
choose-1d-block-and-grid
(function).
choose-2d-block-and-grid
(function).
choose-3d-block-and-grid
(function).
coerce-to-ctype
(function).
convolve!
(function).
copy!
(function).
copy-column
(function).
copy-mat
(function).
copy-random-state
(generic function).
copy-row
(function).
ctype
(type).
cublas-create
(function).
cublas-destroy
(function).
cublas-error
(condition).
cublas-error-function-name
(generic reader).
cublas-error-status
(generic reader).
cublas-get-version
(function).
cuda-array
(class).
cuda-available-p
(function).
cuda-enabled
(generic reader).
(setf cuda-enabled)
(generic writer).
cuda-host-array
(class).
cuda-out-of-memory
(condition).
cuda-room
(function).
curand-xorwow-state
(class).
define-cuda-kernel
(macro).
define-lisp-kernel
(macro).
derive-convolve!
(function).
derive-max-pool!
(function).
displace
(function).
displace!
(function).
fill!
(function).
foreign-array
(class).
foreign-array-strategy
(type).
foreign-room
(function).
gaussian-random!
(function).
geem!
(function).
geerv!
(function).
gemm!
(function).
invert
(function).
logdet
(function).
m*
(function).
m+
(function).
m-
(function).
m=
(function).
make-mat
(function).
map-concat
(function).
map-displacements
(function).
map-mats-into
(function).
mat
(class).
mat-as-scalar
(function).
mat-ctype
(generic reader).
mat-dimension
(function).
mat-dimensions
(generic reader).
mat-displacement
(generic reader).
mat-initial-element
(generic reader).
mat-max-size
(generic reader).
mat-room
(function).
mat-row-major-index
(function).
mat-size
(generic reader).
mat-to-array
(function).
max-pool!
(function).
mm*
(function).
(setf mref)
(setf expander).
mref
(function).
mv-gaussian-random
(function).
n-states
(generic reader).
nrm2
(function).
orthogonal-random!
(function).
pinning-supported-p
(function).
read-mat
(generic function).
replace!
(function).
reshape
(function).
reshape!
(function).
reshape-and-displace
(function).
reshape-and-displace!
(function).
reshape-to-row-matrix!
(function).
(setf row-major-mref)
(setf expander).
row-major-mref
(function).
scal!
(function).
scalar-as-mat
(function).
scale-columns!
(function).
scale-rows!
(function).
stack
(function).
stack!
(function).
states
(generic reader).
sum!
(function).
transpose
(function).
uniform-random!
(function).
use-cuda-p
(function).
with-cublas-handle
(macro).
with-cuda*
(macro).
with-curand-state
(macro).
with-mat-counters
(macro).
with-ones
(macro).
with-shape-and-displacement
(macro).
with-syncing-cuda-facets
(macro).
with-thread-cached-mat
(macro).
with-thread-cached-mats
(macro).
write-mat
(generic function).
%cublas-destroy
(function).
%cublas-get-version
(function).
*counters*
(special variable).
*cuda-copy-stream*
(special variable).
*cuda-max-n-blocks*
(special variable).
*cuda-n-streaming-multiprocessors*
(special variable).
*cuda-pool*
(special variable).
*cuda-warp-size*
(special variable).
*foreign-pool*
(special variable).
*lisp-foreign-cuda-lla-types*
(special variable).
*mat-param-type*
(special variable).
*no-array-bounds-check*
(special variable).
*print-vec*
(special variable).
*print-vec-facets*
(special variable).
*thread-cache-lock*
(special variable).
*thread-caches*
(special variable).
@mat-assembling
(special variable).
@mat-basics
(special variable).
@mat-blas
(special variable).
@mat-caching
(special variable).
@mat-ctypes
(special variable).
@mat-cublas
(special variable).
@mat-cuda
(special variable).
@mat-cuda-extensions
(special variable).
@mat-cuda-memory-management
(special variable).
@mat-curand
(special variable).
@mat-debugging
(special variable).
@mat-destructive-api
(special variable).
@mat-extensions
(special variable).
@mat-facet-api
(special variable).
@mat-facets
(special variable).
@mat-foreign
(special variable).
@mat-installation
(special variable).
@mat-introduction
(special variable).
@mat-io
(special variable).
@mat-links
(special variable).
@mat-lisp-extensions
(special variable).
@mat-manual
(special variable).
@mat-mappings
(special variable).
@mat-non-destructive-api
(special variable).
@mat-printing
(special variable).
@mat-random
(special variable).
@mat-shaping
(special variable).
@mat-shaping-comparison-to-lisp
(special variable).
@mat-shaping-destructive
(special variable).
@mat-shaping-functional
(special variable).
@mat-tutorial
(special variable).
@mat-what-is-it
(special variable).
@mat-what-kind-of-matrices
(special variable).
add-host-array-to-be-unregistered
(function).
alloc-cuda-vector
(function).
alloc-cuda-vector-with-recovery
(function).
alloc-static-vector
(function).
allocate-to-pool
(function).
append-to-symbol
(function).
base-pointer
(generic reader).
blas-asum
(function).
blas-axpy
(function).
blas-call-form
(function).
blas-call-form*
(function).
blas-copy
(function).
blas-dasum
(function).
blas-daxpy
(function).
blas-dcopy
(function).
blas-ddot
(function).
blas-dgemm
(function).
blas-dnrm2
(function).
blas-dot
(function).
blas-dscal
(function).
blas-foreign-function-name
(function).
blas-funcall-form
(function).
blas-function-name
(function).
blas-function-name*
(macro).
blas-gemm
(function).
blas-nrm2
(function).
blas-sasum
(function).
blas-saxpy
(function).
blas-scal
(function).
blas-scopy
(function).
blas-sdot
(function).
blas-sgemm
(function).
blas-snrm2
(function).
blas-sscal
(function).
borrow-thread-cached-object
(function).
call-blas-function
(macro).
call-cublas-function
(macro).
call-cuda-kernel
(macro).
call-lisp-kernel
(macro).
check-cuda-sdk
(function).
check-dimensions
(function).
clip
(function).
common-mat-ctype
(function).
convert-param-type
(function).
convert-param-types
(function).
convert-to-cuda-code
(function).
convert-to-lisp-code
(function).
copy-curand-state
(generic function).
copy-list-holder
(function).
copy-xorwow-states
(function).
ctype->cuda
(function).
ctype->lisp
(function).
ctype->lla
(function).
ctype->lla-internal
(function).
ctype-blas-prefix
(function).
ctype-size
(function).
cublas-asum
(function).
cublas-axpy
(function).
cublas-call-form
(function).
cublas-call-form*
(function).
cublas-copy
(function).
cublas-dasum
(function).
cublas-daxpy
(function).
cublas-dcopy
(function).
cublas-ddot
(function).
cublas-dgemm
(function).
cublas-dnrm2
(function).
cublas-dot
(function).
cublas-dscal
(function).
cublas-foreign-function-name
(function).
cublas-funcall-form
(function).
cublas-function-name
(function).
cublas-function-name*
(macro).
cublas-gemm
(function).
cublas-nrm2
(function).
cublas-sasum
(function).
cublas-saxpy
(function).
cublas-scal
(function).
cublas-scopy
(function).
cublas-sdot
(function).
cublas-sgemm
(function).
cublas-snrm2
(function).
cublas-sscal
(function).
cuda-.+!
(function).
cuda-.+!-d
(function).
cuda-.+!-s
(function).
cuda-.cos!
(function).
cuda-.cos!-d
(function).
cuda-.cos!-s
(function).
cuda-.cosh!
(function).
cuda-.cosh!-d
(function).
cuda-.cosh!-s
(function).
cuda-.exp!
(function).
cuda-.exp!-d
(function).
cuda-.exp!-s
(function).
cuda-.expt!
(function).
cuda-.expt!-d
(function).
cuda-.expt!-s
(function).
cuda-.inv!
(function).
cuda-.inv!-d
(function).
cuda-.inv!-s
(function).
cuda-.log!
(function).
cuda-.log!-d
(function).
cuda-.log!-s
(function).
cuda-.logistic!
(function).
cuda-.logistic!-d
(function).
cuda-.logistic!-s
(function).
cuda-.max!
(function).
cuda-.max!-d
(function).
cuda-.max!-s
(function).
cuda-.min!
(function).
cuda-.min!-d
(function).
cuda-.min!-s
(function).
cuda-.sin!
(function).
cuda-.sin!-d
(function).
cuda-.sin!-s
(function).
cuda-.sinh!
(function).
cuda-.sinh!-d
(function).
cuda-.sinh!-s
(function).
cuda-.sqrt!
(function).
cuda-.sqrt!-d
(function).
cuda-.sqrt!-s
(function).
cuda-.square!
(function).
cuda-.square!-d
(function).
cuda-.square!-s
(function).
cuda-.tan!
(function).
cuda-.tan!-d
(function).
cuda-.tan!-s
(function).
cuda-.tanh!
(function).
cuda-.tanh!-d
(function).
cuda-.tanh!-s
(function).
cuda-add-sign!
(function).
cuda-add-sign!-d
(function).
cuda-add-sign!-s
(function).
cuda-code
(function).
cuda-convolve-2d
(function).
cuda-convolve-2d-d
(function).
cuda-convolve-2d-s
(function).
cuda-derive-convolve-2d
(function).
cuda-derive-convolve-2d-d
(function).
cuda-derive-convolve-2d-s
(function).
cuda-derive-max-pool-2d
(function).
cuda-derive-max-pool-2d-d
(function).
cuda-derive-max-pool-2d-s
(function).
cuda-fill!
(function).
cuda-fill!-2
(function).
cuda-fill!-d
(function).
cuda-fill!-s
(function).
cuda-geem!
(function).
cuda-geem!-d
(function).
cuda-geem!-s
(function).
cuda-geerv!
(function).
cuda-geerv!-d
(function).
cuda-geerv!-s
(function).
cuda-kernel-name
(function).
cuda-less-than!
(function).
cuda-less-than!-d
(function).
cuda-less-than!-s
(function).
cuda-max-pool-2d
(function).
cuda-max-pool-2d-d
(function).
cuda-max-pool-2d-s
(function).
cuda-pool
(generic reader).
(setf cuda-pool)
(generic writer).
cuda-pool
(class).
cuda-scale-columns!
(function).
cuda-scale-columns!-d
(function).
cuda-scale-columns!-s
(function).
cuda-scale-rows!
(function).
cuda-scale-rows!-d
(function).
cuda-scale-rows!-s
(function).
cuda-setf-mref
(function).
cuda-setf-mref-d
(function).
cuda-setf-mref-s
(function).
cuda-vector
(class).
curand-init-xorwow-simple
(function).
curand-normal
(generic function).
curand-normal-xorwow
(function).
curand-normal-xorwow-d
(function).
curand-normal-xorwow-s
(function).
curand-state
(class).
curand-uniform
(generic function).
curand-uniform-xorwow
(function).
curand-uniform-xorwow-d
(function).
curand-uniform-xorwow-s
(function).
define-auxiliary-cublas-function
(macro).
define-blas-function
(macro).
define-cublas-function
(macro).
define-elementwise-cuda-kernel
(macro).
define-elementwise-dispatcher
(macro).
define-elementwise-lisp-kernel
(macro).
destroy-curand-state
(generic function).
destroys
(generic reader).
dimensions-total-size
(function).
displacement-bytes
(function).
double-float-vector
(type).
end-of-logdet-example
(special variable).
ensure-pointer-param
(function).
ensures
(generic reader).
facet-vars
(function).
fake-writer
(function).
finish-syncing-cuda-facets
(function).
foreign-pool
(class).
free-cuda-vector
(function).
free-some-reusables
(function).
free-static-vector
(function).
gaussian-random-1
(function).
host-arrays-to-be-unregistered
(generic reader).
(setf host-arrays-to-be-unregistered)
(generic writer).
index
(type).
lisp-.+!
(function).
lisp-.+!-d
(function).
lisp-.+!-s
(function).
lisp-.cos!
(function).
lisp-.cos!-d
(function).
lisp-.cos!-s
(function).
lisp-.cosh!
(function).
lisp-.cosh!-d
(function).
lisp-.cosh!-s
(function).
lisp-.exp!
(function).
lisp-.exp!-d
(function).
lisp-.exp!-s
(function).
lisp-.expt!
(function).
lisp-.expt!-d
(function).
lisp-.expt!-s
(function).
lisp-.inv!
(function).
lisp-.inv!-d
(function).
lisp-.inv!-s
(function).
lisp-.log!
(function).
lisp-.log!-d
(function).
lisp-.log!-s
(function).
lisp-.logistic!
(function).
lisp-.logistic!-d
(function).
lisp-.logistic!-s
(function).
lisp-.max!
(function).
lisp-.max!-d
(function).
lisp-.max!-s
(function).
lisp-.min!
(function).
lisp-.min!-d
(function).
lisp-.min!-s
(function).
lisp-.sin!
(function).
lisp-.sin!-d
(function).
lisp-.sin!-s
(function).
lisp-.sinh!
(function).
lisp-.sinh!-d
(function).
lisp-.sinh!-s
(function).
lisp-.sqrt!
(function).
lisp-.sqrt!-d
(function).
lisp-.sqrt!-s
(function).
lisp-.square!
(function).
lisp-.square!-d
(function).
lisp-.square!-s
(function).
lisp-.tan!
(function).
lisp-.tan!-d
(function).
lisp-.tan!-s
(function).
lisp-.tanh!
(function).
lisp-.tanh!-d
(function).
lisp-.tanh!-s
(function).
lisp->ctype
(function).
lisp-add-sign!
(function).
lisp-add-sign!-d
(function).
lisp-add-sign!-s
(function).
lisp-code
(function).
lisp-convolve-2d
(function).
lisp-convolve-2d-d
(function).
lisp-convolve-2d-s
(function).
lisp-derive-convolve-2d
(function).
lisp-derive-convolve-2d-d
(function).
lisp-derive-convolve-2d-s
(function).
lisp-derive-max-pool-2d
(function).
lisp-derive-max-pool-2d-d
(function).
lisp-derive-max-pool-2d-s
(function).
lisp-geem!
(function).
lisp-geem!-d
(function).
lisp-geem!-s
(function).
lisp-geerv!
(function).
lisp-geerv!-d
(function).
lisp-geerv!-s
(function).
lisp-kernel-name
(function).
lisp-less-than!
(function).
lisp-less-than!-d
(function).
lisp-less-than!-s
(function).
lisp-max-pool-2d
(function).
lisp-max-pool-2d-d
(function).
lisp-max-pool-2d-s
(function).
lisp-scale-columns!
(function).
lisp-scale-columns!-d
(function).
lisp-scale-columns!-s
(function).
lisp-scale-rows!
(function).
lisp-scale-rows!-d
(function).
lisp-scale-rows!-s
(function).
lisp-uniform-random
(function).
lisp-uniform-random-d
(function).
lisp-uniform-random-s
(function).
list-holder
(structure).
list-holder-list
(reader).
(setf list-holder-list)
(writer).
list-holder-p
(function).
lock
(generic reader).
(setf lock)
(generic writer).
make-array-facet
(function).
make-list-holder
(function).
make-xorwow-state/simple
(function).
map-tree
(function).
mat-facet-to-char
(function).
mat-param-p
(function).
maybe-rewire-to
(function).
maybe-unregister-pointers
(function).
memcpy
(function).
n-bytes
(generic reader).
n-bytes-allocated
(generic reader).
(setf n-bytes-allocated)
(generic writer).
n-bytes-free
(generic reader).
(setf n-bytes-free)
(generic writer).
n-bytes-host-array-registered
(generic reader).
(setf n-bytes-host-array-registered)
(generic writer).
n-bytes-reusable
(generic reader).
(setf n-bytes-reusable)
(generic writer).
n-references
(generic reader).
(setf n-references)
(generic writer).
n-static-arrays
(generic reader).
(setf n-static-arrays)
(generic writer).
n-static-bytes-allocated
(generic reader).
(setf n-static-bytes-allocated)
(generic writer).
non-mat-output-param-p
(function).
note-allocation
(function).
offset
(generic reader).
offset-pointer
(generic function).
offset-pointer
(class).
param-direction
(function).
param-name
(function).
param-to-cuda
(function).
param-type
(function).
params-to-type-declarations
(function).
pax-pages
(function).
pax-sections
(function).
pointer-n-bytes
(generic reader).
print-mat-dimensions
(function).
print-mat-facets
(function).
print-vec-facets
(function).
process-pool
(function).
read-as-bytes
(function).
read-double-float-vector
(function).
read-double-float-vector/generic
(function).
read-mat-header
(function).
read-single-float-vector
(function).
read-single-float-vector/generic
(function).
reallocate-from-pool
(function).
register-cuda-host-array
(function).
remove-fake-writer
(function).
replace-vector
(function).
reshape-and-displace-facet*
(generic function).
return-thread-cached-object
(function).
return-to-pool
(function).
reusables
(generic reader).
(setf reusables)
(generic writer).
round-up
(function).
sanitize-n-random-states
(function).
set-mref
(function).
set-row-major-mref
(function).
single-float-vector
(type).
start-syncing-cuda-facets
(function).
sync->fd
(function).
sync-token
(class).
sync<-fd
(function).
the!
(macro).
try-to-free-cuda-memory-1
(function).
try-to-free-cuda-memory-2
(function).
try-to-free-cuda-memory-3
(function).
unregister-cuda-host-array
(function).
unregister-cuda-host-array-now
(function).
use-pinning-p
(function).
valid-multi-dimensional-index-p
(function).
vec
(generic reader).
vec
(class).
vec-ctype
(generic reader).
vec-facet
(function).
vec-facet-name
(function).
vec-facet-to-char
(function).
vec-initial-element
(generic reader).
vec-n-bytes
(generic reader).
vec-size
(generic reader).
will-be-copied-over-p
(function).
with-character-stream
(macro).
with-cuda-pool
(macro).
with-cuda-pool-locked
(macro).
with-cuda-stream
(macro).
with-foreign-array-locked
(macro).
with-foreign-pool-locked
(macro).
with-shape-and-displacement-restored
(macro).
with-thread-cached-object
(macro).
with-zero-on-underflow
(macro).
write-as-bytes
(function).
write-double-float-vector
(function).
write-double-float-vector/generic
(function).
write-mat-header
(function).
write-single-float-vector
(function).
write-single-float-vector/generic
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The default value of WITH-CUDA*’s :DEVICE-ID argument.
The default value of WITH-CUDA*’s :N-RANDOM-STATES argument.
The default value of WITH-CUDA*’s :RANDOM-SEED argument.
Set or bind this to false to disable all use of cuda. If this is done from within WITH-CUDA*, then cuda becomes temporarily disabled. If this is done from outside WITH-CUDA*, then it changes the default values of the ENABLED argument of any future [WITH-CUDA*][]s which turns off cuda initialization entirely.
These declarations are added automatically to kernel functions.
By default MATs are created with this ctype. One of :FLOAT or :DOUBLE.
The default for [CUDA-ENABLED][(accessor mat)].
The default value for SYNCHRONIZATION of new cubes.
One of :PINNED, :STATIC and :CUDA-HOST (see type
FOREIGN-ARRAY-STRATEGY). This variable controls how foreign arrays
are handled and it can be changed at any time.
If it’s :PINNED (only supported if (PINNING-SUPPORTED-P), then no
separate storage is allocated for the foreign array. Instead, it
aliases the lisp array (via the BACKING-ARRAY facet).
If it’s :STATIC, then the lisp backing arrays are allocated
statically via the static-vectors library. On some implementations,
explicit freeing of static vectors is necessary, this is taken care
of by finalizers or can be controlled with WITH-FACET-BARRIER.
DESTROY-CUBE and DESTROY-FACET may also be of help.
:CUDA-HOST is the same as :STATIC, but any copies to/from the
GPU (i.e. the [CUDA-ARRAY][facet-name] facet) will be done via the
[CUDA-HOST-ARRAY][facet-name] facet whose memory pages will also be
locked and registered with ‘cuMemHostRegister‘ which allows quicker
and asynchronous copying to and from CUDA land.
The default is :PINNED if available, because it’s the most efficient. If pinning is not available, then it’s :STATIC.
If true, WITH-FACETS (more precisely, the default implementation of CALL-WITH-FACET*) with :DIRECTION :INPUT does not call CHECK-NO-WRITERS. This knob is intended to be bound locally for debugging purposes.
If true, WITH-FACETS (more precisely, the default implementation of CALL-WITH-FACET*) with :DIRECTION :IO or :OUTPUT does not call CHECK-NO-WATCHERS. This knob is intended to be bound locally for debugging purposes.
If true, a header with MAT-CTYPE and MAT-SIZE is written by WRITE-MAT before the contents and READ-MAT checks that these match the matrix into which it is reading.
Determines whether access the cube metadata is synchronized for cubes with SYNCHRONIZATION :MAYBE.
Incremented each time a device to host copy is performed. Bound to 0 by WITH-CUDA*. Useful for tracking down performance problems.
Incremented each time a host to device copy is performed. Bound to 0 by WITH-CUDA*. Useful for tracking down performance problems.
Controls whether the contents of a MAT object are printed as an array (subject to the standard printer control variables).
Controls whether a summary of existing and up-to-date facets is printed when a MAT object is printed. The summary that looks like ‘ABcfh‘ indicates that all five facets ([ARRAY][facet-name], [BACKING-ARRAY][facet-name], [CUDA-ARRAY][facet-name], [FOREIGN-ARRAY][facet-name], [CUDA-HOST-ARRAY][facet-name]) are present and the first two are up-to-date. A summary of a single #- indicates that there are no facets.
The default value of the SAFEP argument of WITH-SYNCING-CUDA-FACETS.
This is an extended CL-CUDA:DEFKERNEL macro. It knows how to deal
with MAT objects and can define the same function for multiple
CTYPES. Example:
“‘commonlisp
(define-cuda-kernel (cuda-.+!)
(void ((alpha float) (x :mat :input) (n int)))
(let ((stride (* block-dim-x grid-dim-x)))
(do ((i (+ (* block-dim-x block-idx-x) thread-idx-x)
(+ i stride)))
((>= i n))
(set (aref x i) (+ (aref x i) alpha)))))
“‘
The signature looks pretty much like in CL-CUDA:DEFKERNEL, but
parameters can take the form of ‘(<NAME> :MAT <DIRECTION>)‘ too, in
which case the appropriate CL-CUDA.DRIVER-API:CU-DEVICE-PTR is
passed to the kernel. ‘<DIRECTION>‘ is passed on to the WITH-FACET
that’s used to acquire the cuda array.
Both the signature and the body are written as if for single floats,
but one function is defined for each ctype in CTYPES by transforming
types, constants and code by substituting them with their ctype
equivalents. Currently this means that one needs to write only one
kernel for [FLOAT][dislocated] and DOUBLE.
Finally, a dispatcher function with NAME is defined which determines the ctype of the MAT objects passed for :MAT typed parameters. It’s an error if they are not of the same type. Scalars declared [FLOAT][dislocated] are coerced to that type and the appropriate kernel is called.
Just a macro to document that SYMBOL refers to a facet name (as in
the [FACET-NAME][locative]). This is totally confusing, so here is
an example of how \MGL-MAT (see MGL-MAT::@MAT-MANUAL) documents the
MGL-MAT:BACKING-ARRAY facet:
“‘commonlisp
(define-facet-name backing-array ()
"The corresponding facet is a one dimensional lisp array.")
“‘
Which makes it possible to refer to this definition (refer as in link and ‘M-.‘ to) MGL-MAT:BACKING-ARRAY facet-name. See MGL-PAX::@PAX-MANUAL for more.
This is very much like DEFINE-CUDA-KERNEL but for normal lisp code.
It knows how to deal with MAT objects and can define the same
function for multiple CTYPES. Example:
“‘commonlisp
(define-lisp-kernel (lisp-.+!)
((alpha single-float) (x :mat :input) (start-x index) (n index))
(loop for xi of-type index upfrom start-x
below (the! index (+ start-x n))
do (incf (aref x xi) alpha)))
“‘
Parameters are either of the form ‘(<NAME> <LISP-TYPE)‘
or ‘(<NAME> :MAT <DIRECTION>)‘. In the latter case, the appropriate
CFFI pointer is passed to the kernel. ‘<DIRECTION>‘ is passed on to
the WITH-FACET that’s used to acquire the foreign array. Note that
the return type is not declared.
Both the signature and the body are written as if for single floats,
but one function is defined for each ctype in CTYPES by transforming
types, constants and code by substituting them with their ctype
equivalents. Currently this means that one needs to write only one
kernel for SINGLE-FLOAT and DOUBLE-FLOAT. All such functions get the
declaration from *DEFAULT-LISP-KERNEL-DECLARATIONS*.
Finally, a dispatcher function with NAME is defined which determines the ctype of the MAT objects passed for :MAT typed parameters. It’s an error if they are not of the same type. Scalars declared SINGLE-FLOAT are coerced to that type and the appropriate kernel is called.
Initializes CUDA with with all bells and whistles before BODY and
deinitializes it after. Simply wrapping WITH-CUDA* around a piece
code is enough to make use of the first available CUDA device or
fall back on blas and lisp kernels if there is none.
If CUDA is already initialized, then it sets up a facet barrier
which destroys CUDA-ARRAY and CUDA-HOST-ARRAY facets after ensuring
that the [ARRAY][facet-name] facet is up-to-date.
Else, if CUDA is available and ENABLED, then in addition to the
facet barrier, a CUDA context is set up, *N-MEMCPY-HOST-TO-DEVICE*,
*N-MEMCPY-DEVICE-TO-HOST* are bound to zero, a cublas handle
created, and *CURAND-STATE* is bound to a CURAND-XORWOW-STATE with
N-RANDOM-STATES, seeded with RANDOM-SEED, and allocation of device
memory is limited to N-POOL-BYTES (NIL means no limit, see
@MAT-CUDA-MEMORY-MANAGEMENT).
Else - that is, if CUDA is not available, BODY is simply executed.
Find or create the facet with FACET-NAME in CUBE and bind VAR to
the representation of CUBE’s data provided by that facet. This
representation is called the facet’s _value_. The value is to be
treated as dynamic extent: it is not allowed to keep a reference to
it. For the description of the DIRECTION parameter, see the type
DIRECTION.
If TYPE is specified, then VAR is declared to be of that type.
When BODY exits, destroy facets which:
- are of cubes with CUBE-TYPE
- have a facet name among DESTROYS
- were created in the dynamic extent of BODY
Before destroying the facets, it is ensured that facets with names
among ENSURES are up-to-date. WITH-FACET-BARRIERs can be nested, in
case of multiple barriers matching the cube’s type and the created
facet’s name, the innermost one takes precedence.
The purpose of this macro is twofold. First, it makes it easy to temporarily work with a certain facet of many cubes without leaving newly created facets around. Second, it can be used to make sure that facets whose extent is tied to some dynamic boundary (such as the thread in which they were created) are destroyed.
A shorthand for writing nested WITH-FACET calls.
“‘
(with-facet (f1 (c1 ’name1 :direction :input))
(with-facet (f2 (c2 ’name2 :direction :output))
...))
“‘
is equivalent to:
“‘
(with-facets ((f1 (c1 ’name1 :direction :input))
(f2 (c2 ’name2 :direction :output)))
...)
“‘
Count all MAT allocations and also the number of bytes they may
require. _May require_ here really means an upper bound,
because ‘(MAKE-MAT (EXPT 2 60))‘ doesn’t actually uses memory until
one of its facets is accessed (don’t simply evaluate it though,
printing the result will access the [ARRAY][facet-name] facet if
*PRINT-MAT*). Also, while facets today all require the same number
of bytes, this may change in the future. This is a debugging tool,
don’t use it in production.
“‘cl-transcript
(with-mat-counters (:count count :n-bytes n-bytes)
(assert (= count 0))
(assert (= n-bytes 0))
(make-mat ’(2 3) :ctype :double)
(assert (= count 1))
(assert (= n-bytes (* 2 3 8)))
(with-mat-counters (:n-bytes n-bytes-1 :count count-1)
(make-mat ’7 :ctype :float)
(assert (= count-1 1))
(assert (= n-bytes-1 (* 7 4))))
(assert (= n-bytes (+ (* 2 3 8) (* 7 4))))
(assert (= count 2)))
“‘
Bind VAR to a matrix of DIMENSIONS whose every element is 1. The matrix is cached for efficiency.
Reshape and displace MAT if DIMENSIONS and/or DISPLACEMENT is given and restore the original shape and displacement after BODY is executed. If neither is specificed, then nothing will be changed, but BODY is still allowed to alter the shape and displacement.
Update CUDA facets in a possibly asynchronous way while BODY
executes. Behind the scenes, a separate CUDA stream is used to copy
between registered host memory and device memory. When
WITH-SYNCING-CUDA-FACETS finishes either by returning normally or by
a performing a non-local-exit the following are true:
- All ‘MAT‘s in MATS-TO-CUDA have an up-to-date
[CUDA-ARRAY][facet-name] facet.
- All ‘MAT‘s in MATS-TO-CUDA-HOST have an up-to-date
[CUDA-HOST-ARRAY][facet-name] facet and no
[CUDA-ARRAY][facet-name].
It is an error if the same matrix appears in both MATS-TO-CUDA and
MATS-TO-CUDA-HOST, but the same matrix may appear any number of
times in one of them.
If SAFEP is true, then the all matrices in either of the two lists are effectively locked for output until WITH-SYNCING-CUDA-FACETS finishes. With SAFE NIL, unsafe accesses to facets of these matrices are not detected, but the whole operation has a bit less overhead.
Bind VAR to a matrix of DIMENSIONS, CTYPE, etc. Cache this matrix,
and possibly reuse it later by reshaping it. When BODY exits the
cached object is updated with the binding of VAR which BODY may
change.
There is a separate cache for each thread and each ‘PLACE‘ (under EQ). Since every cache holds exactly one MAT per CTYPE, nested WITH-THREAD-CACHED-MAT often want to use different ‘PLACE‘s. By convention, these places are called ‘:SCRATCH-1‘, ‘:SCRATCH-2‘, etc.
A shorthand for writing nested WITH-THREAD-CACHED-MAT calls.
“‘
(with-thread-cached-mat (a ...)
(with-thread-cached-mat (b ...)
...))
“‘
is equivalent to:
“‘
(with-thread-cached-mat ((a ...)
(b ...))
...)
“‘
row-major-mref
(function).
set-row-major-mref
(function).
Add the scalar ALPHA to each element of X destructively modifying X. Return X.
For each element of X and Y set Y to 1 if the element in Y is greater than the element in X, and to 0 otherwise. Return Y.
Apply COS elementwise to X in a destructive manner. Return X.
Apply COSH elementwise to X in a destructive manner. Return X.
Apply EXP elementwise to X in a destructive manner. Return X.
Raise matrix X to POWER in an elementwise manner. Return X. Note that CUDA and non-CUDA implementations may disagree on the treatment of NaNs, infinities and complex results. In particular, the lisp implementation always computes the REALPART of the results while CUDA’s pow() returns NaNs instead of complex numbers.
Set X to its elementwise inverse ‘(/ 1 X)‘. Return X.
Set X to its elementwise natural logarithm. Return X.
Destructively apply the logistic function to X in an elementwise manner. Return X.
Set each element of X to ALPHA if it’s less than ALPHA. Return X.
Set each element of X to ALPHA if it’s greater than ALPHA. Return X.
Apply SIN elementwise to X in a destructive manner. Return X.
Apply SINH elementwise to X in a destructive manner. Return X.
Set X to its elementwise square root. Return X.
Set X to its elementwise square. Return X.
Apply TAN elementwise to X in a destructive manner. Return X.
Apply TANH elementwise to X in a destructive manner. Return X.
Make sure FACET-NAME exists on CUBE and increment its reference count. Return the FACET behind FACET-NAME.
Add the elementwise sign (-1, 0 or 1 for negative, zero and positive numbers respectively) of A times ALPHA to BETA * B. Return B.
Like RESHAPE-AND-DISPLACE! but creates a new matrix if MAT isn’t large enough. If a new matrix is created, the contents are not copied over and the old matrix is destroyed with DESTROY-CUBE if DESTROY-OLD-P.
Create a MAT that’s equivalent to ARRAY. Displacement of the
created array will be 0 and the size will be equal to
ARRAY-TOTAL-SIZE. If CTYPE is non-nil, then it will be the ctype of
the new matrix. Else ARRAY’s type is converted to a ctype. If there
is no corresponding ctype, then *DEFAULT-MAT-CTYPE* is used.
Elements of ARRAY are coerced to CTYPE.
Also see MGL-CUBE::@CUBE-SYNCHRONIZATION.
Return the l1 norm of X, that is, sum of the absolute values of its elements.
Set Y to ALPHA * X + Y. Return Y.
Like WITH-CUDA*, but takes a no argument function instead of the macro’s BODY.
Signal an error if CUBE has facets (with names other than FACET-NAME) being regardless of the direction.
Signal an error if CUBE has facets (with names other than FACET-NAME) being written (i.e. direction is :IO or :OUTPUT).
Return two values, one suitable as the :BLOCK-DIM, the other as the :GRID-DIM argument for a cuda kernel call where both are one-dimensional (only the first element may be different from 1).
The number of threads in a block is a multiple of *CUDA-WARP-SIZE*.
The number of blocks is between 1 and and *CUDA-MAX-N-BLOCKS*. This
means that the kernel must be able handle any number of elements in
each thread. For example, a strided kernel that adds a constant to
each element of a length N vector looks like this:
“‘
(let ((stride (* block-dim-x grid-dim-x)))
(do ((i (+ (* block-dim-x block-idx-x) thread-idx-x)
(+ i stride)))
((>= i n))
(set (aref x i) (+ (aref x i) alpha))))
“‘
It is often the most efficient to have MAX-N-WARPS-PER-BLOCK around 4. Note that the maximum number of threads per block is limited by hardware (512 for compute capability < 2.0, 1024 for later versions), so *CUDA-MAX-N-BLOCKS* times MAX-N-WARPS-PER-BLOCK must not exceed that limit.
Return two values, one suitable as the :BLOCK-DIM, the other as
the :GRID-DIM argument for a cuda kernel call where both are
two-dimensional (only the first two elements may be different from
1).
The number of threads in a block is a multiple of *CUDA-WARP-SIZE*.
The number of blocks is between 1 and and *CUDA-MAX-N-BLOCKS*.
Currently - but this may change - the BLOCK-DIM-X is always
*CUDA-WARP-SIZE* and GRID-DIM-X is always 1.
This means that the kernel must be able handle any number of elements in each thread. For example, a strided kernel that adds a constant to each element of a HEIGHT*WIDTH matrix looks like this:
“‘
(let ((id-x (+ (* block-dim-x block-idx-x) thread-idx-x))
(id-y (+ (* block-dim-y block-idx-y) thread-idx-y))
(stride-x (* block-dim-x grid-dim-x))
(stride-y (* block-dim-y grid-dim-y)))
(do ((row id-y (+ row stride-y)))
((>= row height))
(let ((i (* row width)))
(do ((column id-x (+ column stride-x)))
((>= column width))
(set (aref x i) (+ (aref x i) alpha))
(incf i stride-x)))))
“‘
Return two values, one suitable as the :BLOCK-DIM, the other as
the :GRID-DIM argument for a cuda kernel call where both are
two-dimensional (only the first two elements may be different from
1).
The number of threads in a block is a multiple of *CUDA-WARP-SIZE*.
The number of blocks is between 1 and and *CUDA-MAX-N-BLOCKS*.
Currently - but this may change - the BLOCK-DIM-X is always
*CUDA-WARP-SIZE* and GRID-DIM-X is always 1.
This means that the kernel must be able handle any number of
elements in each thread. For example, a strided kernel that adds a
constant to each element of a THICKNESS * HEIGHT * WIDTH 3d array
looks like this:
“‘
(let ((id-x (+ (* block-dim-x block-idx-x) thread-idx-x))
(id-y (+ (* block-dim-y block-idx-y) thread-idx-y))
(id-z (+ (* block-dim-z block-idx-z) thread-idx-z))
(stride-x (* block-dim-x grid-dim-x))
(stride-y (* block-dim-y grid-dim-y))
(stride-z (* block-dim-z grid-dim-z)))
(do ((plane id-z (+ plane stride-z)))
((>= plane thickness))
(do ((row id-y (+ row stride-y)))
((>= row height))
(let ((i (* (+ (* plane height) row)
width)))
(do ((column id-x (+ column stride-x)))
((>= column width))
(set (aref x i) (+ (aref x i) alpha))
(incf i stride-x))))))
“‘
Coerce the scalar X to the lisp type corresponding to CTYPE.
Y = Y + conv(X, W) and return Y. If BATCHED, then the first
dimension of X and Y is the number of elements in the batch (B),
else B is assumed to be 1. The rest of the dimensions encode the
input (X) and output (Y) N dimensional feature maps. START, STRIDE
and ANCHOR are lists of length N. START is the multi-dimensional
index of the first element of the input feature map (for each
element in the batch) for which the convolution must be computed.
Then (ELT STRIDE (- N 1)) is added to the last element of START and
so on until (ARRAY-DIMENSION X 1) is reached. Then the last element
of START is reset, (ELT STRIDE (- N 2)) is added to the first but
last element of START and we scan the last dimension again. Take a
2d example, START is (0 0), STRIDE is (1 2), and X is a B*2x7
matrix.
W is:
1 2 1
2 4 2
1 2 1
and ANCHOR is (1 1) which refers to the element of W whose value is
4. This anchor point of W is placed over elements of X whose multi
dimensional index is in numbers in this figure (only one element in
the batch is shown):
0,0 . 0,2 . 0,4 . 0,6
1,0 . 1,2 . 1,4 . 1,6
When applying W at position P of X, the convolution is the sum of
the products of overlapping elements of X and W when W’s ANCHOR is
placed at P. Elements of W over the edges of X are multiplied with 0
so are effectively ignored. The order of application of W to
positions defined by START, STRIDE and ANCHOR is undefined.
Y must be a B*2x4 (or 2x4 if not BATCHED) matrix in this example, just large enough to hold the results of the convolutions.
Return COLUMN of A as a new 1d matrix.
Return a copy of the active portion with regards to displacement and shape of A.
Count facets with FACET-NAME of cubes of TYPE which will be destroyed by a facet barrier.
Check that a cuda context is already in initialized in the current thread or a device with DEVICE-ID is available.
When CUDA is in use (see USE-CUDA-P), print a summary of memory
usage in the current CUDA context to STREAM. If VERBOSE, make the
output human easily readable, else try to present it in a very
concise way. Sample output with VERBOSE:
“‘
CUDA memory usage:
device arrays: 450 (used bytes: 3,386,295,808, pooled bytes: 1,816,657,920)
host arrays: 14640 (used bytes: 17,380,147,200)
host->device copies: 154,102,488, device->host copies: 117,136,434
“‘
The same data presented with VERBOSE false:
“‘
d: 450 (3,386,295,808 + 1,816,657,920), h: 14640 (17,380,147,200)
h->d: 154,102,488, d->h: 117,136,434
“‘
Add the dF/dX to XD and and dF/dW to WD where YD is dF/dY for some function F where Y is the result of convolution with the same arguments.
Add the dF/dX to XD and and dF/dW to WD where YD is dF/dY for some function F where Y is the result of MAX-POOL! with the same arguments.
Destroy all facets of CUBE with DESTROY-FACET.
Free resources associated with the facet with FACET-NAME and remove it from FACETS of CUBE.
Return a new matrix that aliases MAT’s storage at offset DISPLACEMENT. DISPLACEMENT 0 is equivalent to the start of the storage of MAT regardless of MAT’s displacement. The returned matrix has the same dimensions as MAT.
Like RESHAPE-AND-DISPLACE! but only alters the displacement.
Returned by MAKE-FACET* as its second value, this is an arbitrary object in which additional information can be stored.
The direction of the last WITH-FACET on this facet.
The number of active ‘WITH-FACET‘s. Updated by WATCH-FACET and UNWATCH-FACET.
A symbol that uniquely identifies the facet within a cube.
Whether the cube has changed since this facet has been last updated. See FACET-UP-TO-DATE-P*.
This is what’s normally exposed by WITH-FACET.
The threads (one for each watcher) that have active ‘WITH-FACET‘s.
Fill matrix X with ALPHA. Return X.
Return the facet of CUBE for the facet with FACET-NAME or NIL if no such facet exists.
Print a summary of foreign memory usage to STREAM. If VERBOSE, make
the output human easily readable, else try to present it in a very
concise way. Sample output with VERBOSE:
“‘
Foreign memory usage:
foreign arrays: 450 (used bytes: 3,386,295,808)
“‘
The same data presented with VERBOSE false:
“‘
f: 450 (3,386,295,808)
“‘
Fill MAT with independent normally distributed random numbers with MEAN and STDDEV.
Like GEMM!, but multiplication is elementwise. This is not a standard BLAS routine.
GEneric Elementwise Row - Vector multiplication. ‘B = beta * B + alpha a .* X*‘ where ‘X*‘ is a matrix of the same shape as A whose every row is X. Perform elementwise multiplication on each row of A with the vector X and add the scaled result to the corresponding row of B. Return B. This is not a standard BLAS routine.
Basically C = ALPHA * A’ * B’ + BETA * C. A’ is A or its transpose
depending on TRANSPOSE-A?. B’ is B or its transpose depending on
TRANSPOSE-B?. Returns C.
A’ is an MxK matrix. B’ is a KxN matrix. C is an MxN matrix.
LDA is the width of the matrix A (not of A’). If A is not transposed,
then K <= LDA, if it’s transposed then M <= LDA.
LDB is the width of the matrix B (not of B’). If B is not transposed,
then N <= LDB, if it’s transposed then K <= LDB.
In the example below M=3, N=2, K=5, LDA=6, LDB=3, LDC=4. The cells
marked with + do not feature in the calculation.
N
–+
–+
K -B+
–+
–+
+++
K
—–+ –++
M –A–+ -C++
—–+ –++
++++++ ++++
Logarithm of the determinant of MAT. Return -1, 1 or 0 (or equivalent) to correct for the sign, as the second value.
Compute op(A) * op(B). Where op is either the identity or the transpose operation depending on TRANSPOSE-A? and TRANSPOSE-B?.
Check whether A and B, which must be matrices of the same size, are elementwise equal.
Return a new MAT object. If INITIAL-CONTENTS is given then the
matrix contents are initialized with REPLACE!. See class MAT for the
description of the rest of the parameters. This is exactly
what (MAKE-INSTANCE ’MAT ...) does except DIMENSIONS is not a
keyword argument so that MAKE-MAT looks more like MAKE-ARRAY. The
semantics of SYNCHRONIZATION are desribed in the
MGL-CUBE::@CUBE-SYNCHRONIZATION section.
If specified, DISPLACED-TO must be a MAT object large enough (in the sense of its MAT-SIZE), to hold DISPLACEMENT plus ‘(REDUCE #’* DIMENSIONS)‘ elements. Just like with MAKE-ARRAY, INITIAL-ELEMENT and INITIAL-CONTENTS must not be supplied together with DISPLACED-TO. See @MAT-SHAPING for more.
Call FN with each element of MATS and MAT temporarily reshaped to
the dimensions of the current element of MATS and return MAT. For
the next element the displacement is increased so that there is no
overlap.
MATS is keyed by KEY just like the CL sequence functions. Normally,
FN is called with the matrix returned by KEY. However, if
PASS-RAW-P, then the matrix returned by KEY is only used to
calculate dimensions and the element of MATS that was passed to KEY
is passed to FN, too.
“‘
(map-concat #’copy! (list (make-mat 2) (make-mat 4 :initial-element 1))
(make-mat ’(2 3)))
==> #<MAT 2x3 AB #2A((0.0d0 0.0d0 1.0d0) (1.0d0 1.0d0 1.0d0))>
“‘
Call FN with MAT reshaped to DIMENSIONS, first displaced by
DISPLACEMENT-START that’s incremented by DISPLACEMENT-STEP each
iteration while there are enough elements left for DIMENSIONS at the
current displacement. Returns MAT.
“‘commonlisp
(let ((mat (make-mat 14 :initial-contents ’(-1 0 1 2 3
4 5 6 7
8 9 10 11 12))))
(reshape-and-displace! mat ’(4 3) 1)
(map-displacements #’print mat 4))
..
.. #<MAT 1+4+9 B #(0.0d0 1.0d0 2.0d0 3.0d0)>
.. #<MAT 5+4+5 B #(4.0d0 5.0d0 6.0d0 7.0d0)>
.. #<MAT 9+4+1 B #(8.0d0 9.0d0 10.0d0 11.0d0)>
“‘
Like CL:MAP-INTO but for MAT objects. Destructively modifies RESULT-MAT to contain the results of applying FN to each element in the argument MATS in turn.
Return the first element of A. A must be of size 1.
Return the dimension along AXIS-NUMBER. Similar to ARRAY-DIMENSION.
Calls FOREIGN-ROOM and CUDA-ROOM.
Like ARRAY-ROW-MAJOR-INDEX for arrays.
Convenience function to multiply several matrices.
(mm* a b c) => a * b * c
Like AREF for arrays. Don’t use this if you care about performance at all. SETFable. When set, the value is coerced to the ctype of MAT with COERCE-TO-CTYPE. Note that currently MREF always operates on the BACKING-ARRAY facet so it can trigger copying of facets. When it’s SETF’ed, however, it will update the CUDA-ARRAY if cuda is enabled and it is up-to-date or there are no facets at all.
Return a column vector of samples from the multivariate normal distribution defined by MEANS (Nx1) and COVARIANCES (NxN). No CUDA implementation.
Return the l2 norm of X, which is the square root of the sum of the squares of its elements.
Fill the matrix M with random values in such a way that ‘M^T * M‘ is the identity matrix (or something close if M is wide). Return M.
Return true iff the lisp implementation efficiently supports pinning lisp arrays. Pinning ensures that the garbage collector doesn’t move the array in memory. Currently this is only supported on SBCL gencgc platforms.
Decrement the reference count of FACET. It is an error if the facet is already destroyed or if the reference count becomes negative. This function has the same purpose as REMOVE-FACET-REFERENCE-BY-NAME, but by having a single FACET argument, it’s more suited for use in finalizers because it does not keep the whole CUBE alive.
Decrement the reference count of the facet with FACET-NAME of CUBE. It is an error if the facet does not exists or if the reference count becomes negative.
Replace the contents of MAT with the elements of SEQ-OF-SEQS.
SEQ-OF-SEQS is a nested sequence of sequences similar to the
INITIAL-CONTENTS argument of MAKE-ARRAY. The total number of
elements must match the size of MAT. Returns MAT.
SEQ-OF-SEQS may contain multi-dimensional arrays as _leafs_, so the
following is legal:
“‘common-lisp
(replace! (make-mat ’(1 2 3)) ’(#2A((1 2 3) (4 5 6))))
==> #<MAT 1x2x3 AB #3A(((1.0d0 2.0d0 3.0d0) (4.0d0 5.0d0 6.0d0)))>
“‘
Return a new matrix of DIMENSIONS whose displacement is the same as the displacement of MAT.
Like RESHAPE-AND-DISPLACE! but only alters the dimensions.
Return a new matrix of DIMENSIONS that aliases MAT’s storage at offset DISPLACEMENT. DISPLACEMENT 0 is equivalent to the start of the storage of MAT regardless of MAT’s displacement.
Change the visible (or active) portion of MAT by altering its
displacement offset and dimensions. Future operations will only
affect this visible portion as if the rest of the elements were not
there. Return MAT.
DISPLACEMENT + the new size must not exceed MAT-MAX-SIZE. Furthermore, there must be no facets being viewed (with WITH-FACETS) when calling this function as the identity of the facets is not stable.
Reshape the 2d MAT to make only a single ROW visible. This is made possible by the row-major layout, hence no column counterpart. Return MAT.
Like ROW-MAJOR-AREF for arrays. Don’t use this if you care about performance at all. SETFable. When set, the value is coerced to the ctype of MAT with COERCE-TO-CTYPE. Note that currently ROW-MAJOR-MREF always operates on the BACKING-ARRAY facet so it can trigger copying of facets. When it’s SETF’ed, however, it will update the CUDA-ARRAY if cuda is enabled and it is up-to-date or there are no facets at all.
Set X to ALPHA * X. Return X.
Return a matrix of one dimension and one element: X. CTYPE, the type of the matrix, defaults to the ctype corresponding to the type of X.
Set RESULT to ‘A*DIAG(SCALES)‘ and return it. ‘A‘ is an ‘MxN‘ matrix, SCALES is treated as a length ‘N‘ vector.
Set RESULT to ‘DIAG(SCALES)*A‘ and return it. ‘A‘ is an ‘MxN‘ matrix, SCALES is treated as a length ‘M‘ vector.
Like STACK! but return a new MAT of CTYPE.
“‘commonlisp
(stack 1 (list (make-mat ’(3 2) :initial-element 0)
(make-mat ’(3 1) :initial-element 1)))
==> #<MAT 3x3 B #2A((0.0d0 0.0d0 1.0d0)
–> (0.0d0 0.0d0 1.0d0)
–> (0.0d0 0.0d0 1.0d0))>
“‘
Stack MATS along AXIS into MAT and return MAT. If AXIS is 0, place MATS into MAT below each other starting from the top. If AXIS is 1, place MATS side by side starting from the left. Higher AXIS are also supported. All dimensions except for AXIS must be the same for all MATS.
Sum matrix X along AXIS and add ALPHA * SUMS to BETA * Y destructively modifying Y. Return Y. On a 2d matrix (nothing else is supported currently), if AXIS is 0, then columns are summed, if AXIS is 1 then rows are summed.
Fill MAT with random numbers sampled uniformly from the [0,LIMIT) interval of MAT’s type.
Return true if cuda is enabled (*CUDA-ENABLED*), it’s initialized and all MATS have [CUDA-ENABLED][(accessor mat)]. Operations of matrices use this to decide whether to go for the CUDA implementation or BLAS/Lisp. It’s provided for implementing new operations.
Call FN with an up-to-date FACET-VALUE that belongs
to FACET-NAME of CUBE. WITH-FACET is directly implemented in terms
of this function. See @CUBE-DEFAULT-CALL-WITH-FACET* for the gory
details.
Specializations will most likely want to call the default implementation (with CALL-NEXT-METHOD) but with a lambda that transforms FACET-VALUE before passing it on to FN.
mat
) (facet-name (eql mgl-mat:cuda-host-array)
) direction fn) ¶Copy the CUBE’s data from FROM-FACET with
FROM-FACET-NAME to TO-FACET with TO-FACET-NAME. Called by
WITH-FACET (or more directly WATCH-FACET) when necessary. FROM-FACET
is what SELECT-COPY-SOURCE-FOR-FACET* returned.
vec
) (from-name (eql mgl-mat::cuda-vector)
) cuda-vector-facet (to-name (eql mgl-mat::lisp-vector)
) lisp-vector-facet) ¶vec
) (from-name (eql mgl-mat::lisp-vector)
) lisp-vector-facet (to-name (eql mgl-mat::cuda-vector)
) cuda-vector-facet) ¶vec
) (from-name (eql mgl-mat::cuda-vector)
) cuda-vector-facet (to-name (eql static-vectors:static-vector)
) static-vector-facet) ¶vec
) (from-name (eql static-vectors:static-vector)
) static-vector-facet (to-name (eql mgl-mat::cuda-vector)
) cuda-vector-facet) ¶Return a copy of STATE be it a lisp or cuda random state.
curand-state
)) ¶random-state
)) ¶cublas-error
)) ¶cublas-error
)) ¶mat
)) ¶mat
)) ¶The control provided by *CUDA-ENABLED* can be too
coarse. This flag provides a per-object mechanism to turn cuda
off. If it is set to NIL, then any operation that pays attention
to this flag will not create or access the CUDA-ARRAY facet.
Implementationally speaking, this is easily accomplished by using
USE-CUDA-P.
Free the resources associated with FACET with
FACET-NAME. The cube this facet belongs to is not among the
parameters because this method can be called from a finalizer on the
cube (so we can’t have a reference to the cube portably) which also
means that it may run in an unpredictable thread.
Check if FACET with FACET-NAME has been updated
since the latest change to CUBE (that is, since the access to other
facets with DIRECTION of :IO or :OUTPUT). The default method simply
calls FACET-UP-TO-DATE-P on FACET.
One reason to specialize this is when some facets actually share common storage, so updating one make the other up-to-date as well.
Called by WITH-FACET (or more directly WATCH-FACET)
when there is no facet with FACET-NAME. As the first value, return a
new object capable of storing CUBE’s data in the facet with
FACET-NAME. As the second value, return a facet description which
will be available as FACET-DESCRIPTION. As the third value, return a
generalized boolean indicating whether this facet must be explicitly
destroyed (in which case a finalizer will be added to CUBE).
curand-xorwow-state
)) ¶automatically generated reader method
Destructively modify the visible portion (with
regards to displacement and shape) of MAT by reading MAT-SIZE number
of elements from binary STREAM. Return MAT. Also see
*MAT-HEADERS*.
Called when TO-FACET with TO-NAME is about to be
updated by copying data from an up-to-date facet. Return the
facet (or its name) from which data shall be copied. Note that if
the returned facet is not FACET-UP-TO-DATE-P*, then it will be
updated first and another SELECT-COPY-SOURCE-FOR-FACET* will take
place, so be careful not to get into endless recursion. The default
method simply returns the first up-to-date facet.
curand-xorwow-state
)) ¶automatically generated reader method
cube
)) ¶cube
)) ¶By default, setup and teardown of facets by
WITH-FACET is performed in a thread safe way. Corrupting internal
data structures of cubes is not fun, but in the name of
performance, synchronization can be turned off either dynamically
or on a per instance basis.
If T, then access to cube metadata is always synchronized. If NIL, then never. If :MAYBE, then whether access is synchronized is determined by *MAYBE-SYNCHRONIZE-CUBE* that’s true by default.
The default is the value of *DEFAULT-SYNCHRONIZATION*
that’s :MAYBE by default.
Note that the body of a WITH-FACET is never synchronized with anyone, apart from the implicit reader/writer conflict (see DIRECTION).
This is what the default CALL-WITH-FACET* method,
in terms of which WITH-FACET is implemented, calls last. The default
method takes care of taking down facets. External resource managers
may want to hook into this to handle unused facets.
This is what the default CALL-WITH-FACET* method,
in terms of which WITH-FACET is implemented, calls first. The
default method takes care of creating facets, copying and tracking
up-to-dateness.
Calls CHECK-NO-WRITERS (unless *LET-INPUT-THROUGH-P*) and
CHECK-NO-WATCHERS (unless *LET-OUTPUT-THROUGH-P*) depending on
DIRECTION to detect situations with a writer being concurrent to
readers/writers because that would screw up the tracking of
up-to-dateness.
The default implementation should suffice most of the time.
\MGL-MAT specializes it to override the DIRECTION arg, if
it’s :OUTPUT but not all elements are visible due to reshaping, so
that invisible elements are still copied over.
Write MAT to binary STREAM in portable binary
format. Return MAT. Displacement and size are taken into account,
only visible elements are written. Also see *MAT-HEADERS*.
mat
) &key ctype initial-element initial-contents displaced-to max-size &allow-other-keys) ¶If an allocation request cannot be
satisfied (either because of N-POOL-BYTES or physical device memory
limits being reached), then CUDA-OUT-OF-MEMORY is signalled.
storage-condition
.
A cube has facets, as we discussed in @CUBE-BASICS. Facets holds
the data in a particular representation, this is called the _value_
of the facet. A facet holds one such value and some metadata
pertaining to it: its FACET-NAME, whether it’s
up-to-date (FACET-UP-TO-DATE-P), etc. FACET objects are never seen
when simply using a cube, they are for implementing the
@CUBE-FACET-EXTENSION-API.
structure-object
.
symbol
0
mgl-cube:direction
(mgl-cube::make-references)
A datacube that has various representations of the
same stuff. These representations go by the name ‘facet’. Clients
must use WITH-FACET to acquire a dynamic extent reference to a
facet. With the information provided in the DIRECTION argument of
WITH-FACET, the cube keeps track of which facets are up-to-date and
copies data between them as necessary.
The cube is an abstract class, it does not provide useful behavior
in itself. One must subclass it and implement the
@CUBE-FACET-EXTENSION-API.
Also see @CUBE-LIFETIME and @CUBE-FACET-BARRIER.
By default, setup and teardown of facets by
WITH-FACET is performed in a thread safe way. Corrupting internal
data structures of cubes is not fun, but in the name of
performance, synchronization can be turned off either dynamically
or on a per instance basis.
If T, then access to cube metadata is always synchronized. If NIL, then never. If :MAYBE, then whether access is synchronized is determined by *MAYBE-SYNCHRONIZE-CUBE* that’s true by default.
The default is the value of *DEFAULT-SYNCHRONIZATION*
that’s :MAYBE by default.
Note that the body of a WITH-FACET is never synchronized with anyone, apart from the implicit reader/writer conflict (see DIRECTION).
(member nil :maybe t)
mgl-cube:*default-synchronization*
:synchronization
mgl-mat::*cuda-pool*
[FOREIGN-ARRAY][class] wraps a foreign pointer (in
the sense of CFFI:POINTERP). That is, both OFFSET-POINTER and
BASE-POINTER return a foreign pointer. There are no other public
operations that work with [FOREIGN-ARRAY][class] objects, their sole
purpose is represent facets of MAT objects.
A MAT is a data CUBE that is much like a lisp
array, it supports DISPLACEMENT, arbitrary DIMENSIONS and
INITIAL-ELEMENT with the usual semantics. However, a MAT supports
different representations of the same data. See @MAT-TUTORIAL for
an introduction.
cube
.
call-with-facet*
.
call-with-facet*
.
call-with-facet*
.
call-with-facet*
.
call-with-facet*
.
copy-facet*
.
(setf cuda-enabled)
.
cuda-enabled
.
facet-up-to-date-p*
.
initialize-instance
.
make-facet*
.
make-facet*
.
make-facet*
.
make-facet*
.
make-facet*
.
mat-ctype
.
mat-dimensions
.
mat-displacement
.
mat-initial-element
.
mat-max-size
.
mat-size
.
print-object
.
read-mat
.
reshape-and-displace-facet*
.
reshape-and-displace-facet*
.
reshape-and-displace-facet*
.
select-copy-source-for-facet*
.
vec
.
watch-facet
.
write-mat
.
A value in the ‘[0,MAX-SIZE]‘ interval. This is
like the DISPLACED-INDEX-OFFSET of a lisp array, but displacement
is relative to the start of the underlying storage vector.
0
:displacement
This slot is read-only.
Like ARRAY-DIMENSIONS. It holds a list of
dimensions, but it is allowed to pass in scalars too.
:dimensions
This slot is read-only.
The number of elements in the visible portion of
the array. This is always the product of the elements
MAT-DIMENSIONS and is similar to ARRAY-TOTAL-SIZE.
This slot is read-only.
The control provided by *CUDA-ENABLED* can be too
coarse. This flag provides a per-object mechanism to turn cuda
off. If it is set to NIL, then any operation that pays attention
to this flag will not create or access the CUDA-ARRAY facet.
Implementationally speaking, this is easily accomplished by using
USE-CUDA-P.
mgl-mat:*default-mat-cuda-enabled*
:cuda-enabled
One of *SUPPORTED-CTYPES*. The matrix can hold only values of this type.
mgl-mat:ctype
mgl-mat:*default-mat-ctype*
:ctype
This slot is read-only.
If non-nil, then when a facet is created, it is
filled with INITIAL-ELEMENT coerced to the appropriate numeric
type. If NIL, then no initialization is performed.
0
:initial-element
This slot is read-only.
The number of elements for which storage may be
allocated. This is DISPLACEMENT + MAT-SIZE + ‘SLACK‘ where ‘SLACK‘
is the number of trailing invisible elements.
:max-size
This slot is read-only.
Used by WITH-FACET, DIRECTION can be :INPUT, :OUTPUT or :IO.
- :INPUT promises that the facet will only be read and never
written. Other up-to-date facets of the same cube remain
up-to-date. If the facet in question is not up-to-date then data
is copied to it from one of the up-to-date facets (see
SELECT-COPY-SOURCE-FOR-FACET*).
- :OUTPUT promises that _all_ data will be overwritten without
reading any data. All up-to-date facets become non-up-to-date,
while this facet is marked as up-to-date. No copying of data takes
place.
- :IO promises nothing about the type of access. All up-to-date
facets become non-up-to-date, while this facet is marked as
up-to-date. If the facet in question is not up-to-date then data
is copied to it from one of the up-to-date facets (see
SELECT-COPY-SOURCE-FOR-FACET*).
Any number of ‘WITH-FACET‘s with direction :INPUT may be active at the same time, but :IO and :OUTPUT cannot coexists with another WITH-FACET regardless of the direction. The exception for this rule is that an inner WITH-FACET does not conflict with an enclosing WITH-FACET if they are for the same facet (but inner ‘WITH-FACET‘s for another facet or for the same facet from another thread do).
See CHECK-NO-WRITERS and CHECK-NO-WATCHERS called by @CUBE-DEFAULT-CALL-WITH-FACET*.
One of :PINNED, :STATIC and :CUDA-HOST. See *FOREIGN-ARRAY-STRATEGY* for their semantics.
Wait until all the copying started by START-SYNCING-CUDA-FACETS is done, then remove the CUDA-ARRAY facets of the CUDA-ARRAY facets from all matrices in KILLS that was passed to START-SYNCING-CUDA-FACETS.
Return a double float of zero mean and unit variance.
list
.
offset-pointer
)) ¶automatically generated reader method
curand-xorwow-state
)) ¶cuda-host-array
)) ¶automatically generated reader method
cuda-vector
)) ¶automatically generated reader method
foreign-array
)) ¶automatically generated reader method
cuda-host-array
)) ¶automatically generated writer method
foreign-array
)) ¶automatically generated writer method
curand-xorwow-state
) mat) ¶curand-xorwow-state
) mat) ¶curand-xorwow-state
)) ¶sync-token
)) ¶automatically generated reader method
sync-token
)) ¶automatically generated reader method
cuda-pool
)) ¶automatically generated reader method
lock
.
foreign-array
)) ¶automatically generated reader method
lock
.
foreign-pool
)) ¶automatically generated reader method
lock
.
foreign-array
)) ¶automatically generated writer method
lock
.
cuda-out-of-memory
)) ¶foreign-array
)) ¶automatically generated reader method
foreign-array
)) ¶automatically generated writer method
foreign-pool
)) ¶automatically generated reader method
foreign-pool
)) ¶automatically generated writer method
foreign-pool
)) ¶automatically generated reader method
foreign-pool
)) ¶automatically generated writer method
offset-pointer
)) ¶automatically generated reader method
offset-pointer
)) ¶offset-pointer
)) ¶automatically generated reader method
structure-object
.
common-lisp
.
0
0
:n-bytes-free
(make-hash-table)
(bordeaux-threads:make-recursive-lock)
lock
.
This slot is read-only.
(mgl-mat::make-list-holder)
0
cube
.
mgl-mat:ctype
mgl-mat:*default-mat-ctype*
:ctype
This slot is read-only.
0
:initial-element
This slot is read-only.
This slot is read-only.
Jump to: | %
(
.
A B C D E F G H I L M N O P R S T U V W |
---|