The static-vectors Reference Manual

Table of Contents

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

The static-vectors Reference Manual

This is the static-vectors Reference Manual, version 1.8.3, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:23:08 2018 GMT+0.


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

1 Introduction

                           A few use notes

CAVEAT: On some implementations, the GC takes care of deallocating the
arrays, while on others they need to be deallocated explicitly;
therefore, in order to make sure that deallocation works on all
implementations, you must use FREE-STATIC-VECTOR and make sure that
all references to the array are destroyed.

Furthermore, you can only allocate simple-arrays - not arrays of
element-type T and not multidimensional arrays. For use in the latter case,
you can displace a multidimensional array to a simple-array of element-type.

This library is especially useful in cases when you need to share an
array with a C/C++/Fortran library, as long as the allocation is done
on the Lisp side: e.g. as buffer for an I/O stream, et cætera...


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

2 Systems

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


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

2.1 static-vectors

Author

Stelian Ionescu <sionescu@cddr.org>

License

MIT

Description

Create vectors allocated in static memory.

Version

1.8.3

Defsystem Dependency

cffi-grovel

Dependencies
Source

static-vectors.asd (file)

Components

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

3 Files

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


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

3.1 Lisp


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

3.1.1 static-vectors.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/static-vectors-v1.8.3/static-vectors.asd

Systems

static-vectors (system)


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

3.1.2 static-vectors/pkgdcl.lisp

Parent

static-vectors (system)

Location

pkgdcl.lisp

Packages

static-vectors


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

3.1.3 static-vectors/constantp.lisp

Dependency

pkgdcl.lisp (file)

Parent

static-vectors (system)

Location

constantp.lisp

Internal Definitions

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

3.1.4 static-vectors/initialize.lisp

Dependencies
Parent

static-vectors (system)

Location

initialize.lisp

Internal Definitions

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

3.1.5 static-vectors/impl.lisp

Dependencies
Parent

static-vectors (system)

Location

impl-sbcl.lisp

Exported Definitions
Internal Definitions

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

3.1.6 static-vectors/constructor.lisp

Dependencies
Parent

static-vectors (system)

Location

constructor.lisp

Exported Definitions

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

3.1.7 static-vectors/cffi-type-translator.lisp

Dependencies
Parent

static-vectors (system)

Location

cffi-type-translator.lisp


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

4 Packages

Packages are listed by definition order.


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

4.1 static-vectors

Source

pkgdcl.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Macros

Macro: with-static-vector (VAR LENGTH &rest ARGS &key ELEMENT-TYPE INITIAL-CONTENTS INITIAL-ELEMENT) &body BODY

Bind PTR-VAR to a static vector of length LENGTH and execute BODY within its dynamic extent. The vector is freed upon exit.

Package

static-vectors

Source

impl.lisp (file)

Macro: with-static-vectors ((VAR LENGTH &rest ARGS) &rest MORE-CLAUSES) &body BODY

Allocate multiple static vectors at once.

Package

static-vectors

Source

constructor.lisp (file)


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

5.1.2 Compiler macros

Compiler Macro: make-static-vector LENGTH &key ELEMENT-TYPE INITIAL-ELEMENT INITIAL-CONTENTS
Package

static-vectors

Source

constructor.lisp (file)


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

5.1.3 Functions

Function: fill-foreign-memory POINTER LENGTH VALUE

Fill LENGTH octets in foreign memory area POINTER with VALUE.

Package

static-vectors

Source

impl.lisp (file)

Function: free-static-vector VECTOR

Free VECTOR, which must be a vector created by MAKE-STATIC-VECTOR.

Package

static-vectors

Source

impl.lisp (file)

Function: make-static-vector LENGTH &key ELEMENT-TYPE INITIAL-ELEMENT INITIAL-CONTENTS

Create a simple vector of length LENGTH and type ELEMENT-TYPE which will not be moved by the garbage collector. The vector might be allocated in foreign memory so you must always call FREE-STATIC-VECTOR to free it.

Package

static-vectors

Source

constructor.lisp (file)

Function: replace-foreign-memory DST-PTR SRC-PTR LENGTH

Copy LENGTH octets from foreign memory area SRC-PTR to DST-PTR.

Package

static-vectors

Source

impl.lisp (file)

Function: static-vector-pointer VECTOR &key OFFSET

Return a foreign pointer to the beginning of VECTOR + OFFSET octets. VECTOR must be a vector created by MAKE-STATIC-VECTOR.

Package

static-vectors

Source

impl.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +array-header-size+
Package

static-vectors

Source

impl.lisp (file)

Constant: +static-vectors-are-garbage-collected+
Package

static-vectors

Source

initialize.lisp (file)


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

5.2.2 Macros

Macro: cmfuncall OP &rest ARGS
Package

static-vectors

Source

constantp.lisp (file)

Macro: free-vector-on-error (VECTOR) &body BODY
Package

static-vectors

Source

initialize.lisp (file)

Macro: the* TYPE FORM
Package

static-vectors

Source

initialize.lisp (file)


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

5.2.3 Compiler macros

Compiler Macro: %allocate-static-vector LENGTH ELEMENT-TYPE
Package

static-vectors

Source

impl.lisp (file)

Compiler Macro: %initialize-vector VECTOR LENGTH ELEMENT-TYPE INITIAL-ELEMENT INITIAL-ELEMENT-P INITIAL-CONTENTS INITIAL-CONTENTS-P
Package

static-vectors

Source

initialize.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Functions

Function: %%allocate-static-vector ALLOCATION-SIZE WIDETAG LENGTH
Package

static-vectors

Source

impl.lisp (file)

Function: %allocate-static-vector LENGTH ELEMENT-TYPE
Package

static-vectors

Source

impl.lisp (file)

Function: %allocation-size LENGTH WIDETAG N-BITS
Package

static-vectors

Source

impl.lisp (file)

Function: %initialize-vector VECTOR LENGTH ELEMENT-TYPE INITIAL-ELEMENT INITIAL-ELEMENT-P INITIAL-CONTENTS INITIAL-CONTENTS-P
Package

static-vectors

Source

initialize.lisp (file)

Function: check-arguments LENGTH ELEMENT-TYPE INITIAL-ELEMENT INITIAL-ELEMENT-P INITIAL-CONTENTS INITIAL-CONTENTS-P
Package

static-vectors

Source

initialize.lisp (file)

Function: check-initial-contents LENGTH INITIAL-CONTENTS
Package

static-vectors

Source

initialize.lisp (file)

Function: check-initial-element ELEMENT-TYPE INITIAL-ELEMENT
Package

static-vectors

Source

initialize.lisp (file)

Function: check-initialization-arguments INITIAL-ELEMENT-P INITIAL-CONTENTS-P
Package

static-vectors

Source

initialize.lisp (file)

Function: constantp FORM &optional ENV
Package

static-vectors

Source

constantp.lisp (file)

Function: eval-constant FORM &optional ENV
Package

static-vectors

Source

constantp.lisp (file)

Function: static-alloc SIZE
Package

static-vectors

Source

impl.lisp (file)

Function: static-vector-address VECTOR

Return a foreign pointer to VECTOR(including its header). VECTOR must be a vector created by MAKE-STATIC-VECTOR.

Package

static-vectors

Source

impl.lisp (file)

Function: vector-from-pointer POINTER WIDETAG LENGTH
Package

static-vectors

Source

impl.lisp (file)

Function: vector-widetag-and-n-bits TYPE
Package

static-vectors

Source

impl.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, static-vectors.asd: The static-vectors<dot>asd file
File, Lisp, static-vectors/cffi-type-translator.lisp: The static-vectors/cffi-type-translator<dot>lisp file
File, Lisp, static-vectors/constantp.lisp: The static-vectors/constantp<dot>lisp file
File, Lisp, static-vectors/constructor.lisp: The static-vectors/constructor<dot>lisp file
File, Lisp, static-vectors/impl.lisp: The static-vectors/impl<dot>lisp file
File, Lisp, static-vectors/initialize.lisp: The static-vectors/initialize<dot>lisp file
File, Lisp, static-vectors/pkgdcl.lisp: The static-vectors/pkgdcl<dot>lisp file

L
Lisp File, static-vectors.asd: The static-vectors<dot>asd file
Lisp File, static-vectors/cffi-type-translator.lisp: The static-vectors/cffi-type-translator<dot>lisp file
Lisp File, static-vectors/constantp.lisp: The static-vectors/constantp<dot>lisp file
Lisp File, static-vectors/constructor.lisp: The static-vectors/constructor<dot>lisp file
Lisp File, static-vectors/impl.lisp: The static-vectors/impl<dot>lisp file
Lisp File, static-vectors/initialize.lisp: The static-vectors/initialize<dot>lisp file
Lisp File, static-vectors/pkgdcl.lisp: The static-vectors/pkgdcl<dot>lisp file

S
static-vectors.asd: The static-vectors<dot>asd file
static-vectors/cffi-type-translator.lisp: The static-vectors/cffi-type-translator<dot>lisp file
static-vectors/constantp.lisp: The static-vectors/constantp<dot>lisp file
static-vectors/constructor.lisp: The static-vectors/constructor<dot>lisp file
static-vectors/impl.lisp: The static-vectors/impl<dot>lisp file
static-vectors/initialize.lisp: The static-vectors/initialize<dot>lisp file
static-vectors/pkgdcl.lisp: The static-vectors/pkgdcl<dot>lisp file

Jump to:   F   L   S  

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

A.2 Functions

Jump to:   %  
C   E   F   M   R   S   T   V   W  
Index Entry  Section

%
%%allocate-static-vector: Internal functions
%allocate-static-vector: Internal compiler macros
%allocate-static-vector: Internal functions
%allocation-size: Internal functions
%initialize-vector: Internal compiler macros
%initialize-vector: Internal functions

C
check-arguments: Internal functions
check-initial-contents: Internal functions
check-initial-element: Internal functions
check-initialization-arguments: Internal functions
cmfuncall: Internal macros
Compiler Macro, %allocate-static-vector: Internal compiler macros
Compiler Macro, %initialize-vector: Internal compiler macros
Compiler Macro, make-static-vector: Exported compiler macros
constantp: Internal functions

E
eval-constant: Internal functions

F
fill-foreign-memory: Exported functions
free-static-vector: Exported functions
free-vector-on-error: Internal macros
Function, %%allocate-static-vector: Internal functions
Function, %allocate-static-vector: Internal functions
Function, %allocation-size: Internal functions
Function, %initialize-vector: Internal functions
Function, check-arguments: Internal functions
Function, check-initial-contents: Internal functions
Function, check-initial-element: Internal functions
Function, check-initialization-arguments: Internal functions
Function, constantp: Internal functions
Function, eval-constant: Internal functions
Function, fill-foreign-memory: Exported functions
Function, free-static-vector: Exported functions
Function, make-static-vector: Exported functions
Function, replace-foreign-memory: Exported functions
Function, static-alloc: Internal functions
Function, static-vector-address: Internal functions
Function, static-vector-pointer: Exported functions
Function, vector-from-pointer: Internal functions
Function, vector-widetag-and-n-bits: Internal functions

M
Macro, cmfuncall: Internal macros
Macro, free-vector-on-error: Internal macros
Macro, the*: Internal macros
Macro, with-static-vector: Exported macros
Macro, with-static-vectors: Exported macros
make-static-vector: Exported compiler macros
make-static-vector: Exported functions

R
replace-foreign-memory: Exported functions

S
static-alloc: Internal functions
static-vector-address: Internal functions
static-vector-pointer: Exported functions

T
the*: Internal macros

V
vector-from-pointer: Internal functions
vector-widetag-and-n-bits: Internal functions

W
with-static-vector: Exported macros
with-static-vectors: Exported macros

Jump to:   %  
C   E   F   M   R   S   T   V   W  

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

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+array-header-size+: Internal constants
+static-vectors-are-garbage-collected+: Internal constants

C
Constant, +array-header-size+: Internal constants
Constant, +static-vectors-are-garbage-collected+: Internal constants

Jump to:   +  
C  

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

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, static-vectors: The static-vectors package

S
static-vectors: The static-vectors system
static-vectors: The static-vectors package
System, static-vectors: The static-vectors system

Jump to:   P   S