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.6, generated automatically by Declt version 3.0 "Montgomery Scott" on Fri Jun 26 12:18:17 2020 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.6

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/quickref/quicklisp/dists/quicklisp/software/static-vectors-v1.8.6/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/impl.lisp

Dependencies
Parent

static-vectors (system)

Location

impl-sbcl.lisp

Exported Definitions
Internal Definitions

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

3.1.5 static-vectors/constructor.lisp

Dependencies
Parent

static-vectors (system)

Location

constructor.lisp

Exported Definitions
Internal Definitions

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

3.1.6 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)


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

5.1.2 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)


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

5.2.2 Functions

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

static-vectors

Source

impl.lisp (file)

Function: canonicalize-args ENV ELEMENT-TYPE LENGTH
Package

static-vectors

Source

constantp.lisp (file)

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

static-vectors

Source

constructor.lisp (file)

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

static-vectors

Source

constructor.lisp (file)

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

static-vectors

Source

constructor.lisp (file)

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

static-vectors

Source

constructor.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: quotedp FORM
Package

static-vectors

Source

constantp.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-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․asd file
File, Lisp, static-vectors/cffi-type-translator.lisp: The static-vectors/cffi-type-translator․lisp file
File, Lisp, static-vectors/constantp.lisp: The static-vectors/constantp․lisp file
File, Lisp, static-vectors/constructor.lisp: The static-vectors/constructor․lisp file
File, Lisp, static-vectors/impl.lisp: The static-vectors/impl․lisp file
File, Lisp, static-vectors/pkgdcl.lisp: The static-vectors/pkgdcl․lisp file

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

S
static-vectors.asd: The static-vectors․asd file
static-vectors/cffi-type-translator.lisp: The static-vectors/cffi-type-translator․lisp file
static-vectors/constantp.lisp: The static-vectors/constantp․lisp file
static-vectors/constructor.lisp: The static-vectors/constructor․lisp file
static-vectors/impl.lisp: The static-vectors/impl․lisp file
static-vectors/pkgdcl.lisp: The static-vectors/pkgdcl․lisp file

Jump to:   F   L   S  

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

A.2 Functions

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

%
%allocate-static-vector: Internal functions

C
canonicalize-args: Internal functions
check-arguments: Internal functions
check-initial-contents: Internal functions
check-initial-element: Internal functions
check-initialization-arguments: Internal functions
constantp: Internal functions

E
eval-constant: Internal functions

F
fill-foreign-memory: Exported functions
free-static-vector: Exported functions
Function, %allocate-static-vector: Internal functions
Function, canonicalize-args: 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, quotedp: Internal functions
Function, replace-foreign-memory: Exported functions
Function, static-vector-address: Internal functions
Function, static-vector-pointer: Exported functions
Function, vector-widetag-and-n-bits: Internal functions

M
Macro, with-static-vector: Exported macros
Macro, with-static-vectors: Exported macros
make-static-vector: Exported functions

Q
quotedp: Internal functions

R
replace-foreign-memory: Exported functions

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

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

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

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

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

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+array-header-size+: Internal constants

C
Constant, +array-header-size+: 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