The ffa Reference Manual

Table of Contents

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

The ffa Reference Manual

This is the ffa Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:53:19 2018 GMT+0.


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

1 Introduction

Note: as of July 2008, I have split the part of the FFA package that does
not use CFFI into a separate package, ARRAY-OPERATIONS.

Loading FFA will no longer load ARRAY-OPERATIONS.

Tamas Papp 


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 ffa

Author

Tamas K Papp

License

LLGPL

Description

Foreign friendly arrays

Dependencies
Source

ffa.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 ffa.asd

Location

ffa.asd

Systems

ffa (system)

Packages

ffa-asd


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

3.1.2 ffa/package.lisp

Parent

ffa (system)

Location

package.lisp

Packages

ffa


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

3.1.3 ffa/types.lisp

Dependency

package.lisp (file)

Parent

ffa (system)

Location

types.lisp

Exported Definitions

elt-type (function)

Internal Definitions

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

3.1.4 ffa/utils.lisp

Dependency

types.lisp (file)

Parent

ffa (system)

Location

utils.lisp

Internal Definitions

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

3.1.5 ffa/pointer.lisp

Dependency

utils.lisp (file)

Parent

ffa (system)

Location

pointer.lisp

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 ffa-asd

Source

ffa.asd

Use List

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

4.2 ffa

Source

package.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-pointer-to-array (ARRAY POINTER CFFI-TYPE SIZE DIRECTION) &body BODY

See the documentation.

Package

ffa

Source

pointer.lisp (file)

Macro: with-pointers-to-arrays PARAMETER-LISTS &body BODY

Same as with-pointer-to-array, but with multiple arrays, pointers, etc. parameter-lists needs to be a list of lists.

Package

ffa

Source

pointer.lisp (file)


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

5.1.2 Functions

Function: elt-type CFFI-ELT-TYPE

Return the Lisp array element-type matching cffi-elt-type, nil if not found.

Package

ffa

Source

types.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *cffi-and-lisp-types*
Package

ffa

Source

types.lisp (file)


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

5.2.2 Macros

Macro: copy-to-pointer (ARRAY POINTER CFFI-TYPE SIZE INDEX-OFFSET DIRECTION) &body BODY

Allocate memory area and establish desired mapping between array and pointer (copy in and/or out as needed). Array will be available at pointer, which is a local binding so you do whatever you want with it (change its value etc).

Package

ffa

Source

pointer.lisp (file)

Macro: iter% &body BODY

Common iteration for all cases below. IMPORTANT: This macro captures pointer-index, size, array-index and index-offset.

Package

ffa

Source

pointer.lisp (file)

Macro: pin-to-pointer (ARRAY POINTER CFFI-TYPE SIZE INDEX-OFFSET) &body BODY

Use SBCL’s sb-sys:with-pinned-objects and sb-ext:array-storage-vector for mapping an array to a memory location. NOTE: checking that cffi-type matches the type of the array is the responsibility of the user of this macro. The total size of the array is checked.

Package

ffa

Source

pointer.lisp (file)


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

5.2.3 Functions

Function: complex-mem-aref POINTER PART-TYPE INDEX

aref workaround for C99 complex types. Part-type is NOT checked.

Package

ffa

Source

pointer.lisp (file)

Writer

(setf complex-mem-aref) (function)

Function: (setf complex-mem-aref) C POINTER PART-TYPE INDEX

setf aref workaround for C99 complex types. Part-type is NOT checked.

Package

ffa

Source

pointer.lisp (file)

Reader

complex-mem-aref (function)

Function: copy-array-from-pointer ARRAY POINTER CFFI-TYPE LISP-TYPE INDEX-OFFSET SIZE

Copy size elements to an array (starting at index-offset) of element type lisp-type from the memory area that starts at pointer, coercing the elements if necessary.

Package

ffa

Source

pointer.lisp (file)

Function: copy-array-to-pointer ARRAY POINTER CFFI-TYPE LISP-TYPE INDEX-OFFSET SIZE

Copy size elements from array (starting at index-offset) of type lisp-type to the memory area that starts at pointer, coercing the elements if necessary.

Package

ffa

Source

pointer.lisp (file)

Function: displace-array ARRAY DIMENSIONS INDEX-OFFSET

Make a displaced array from array with the given dimensions and the index-offset and the same element-type as array. Tries to displace from the original array.

Package

ffa

Source

utils.lisp (file)

Function: elt-type-size CFFI-ELT-TYPE
Package

ffa

Source

types.lisp (file)

Function: find-original-array ARRAY

Find the original parent of a displaced array, return this and the sum of displaced index offsets.

Package

ffa

Source

utils.lisp (file)

Function: part-type CFFI-TYPE

Return the appropriate part-type if cffi-type is complex, otherwise NIL.

Package

ffa

Source

pointer.lisp (file)

Function: valid-direction-p DIRECTION

Test if the given direction is valid.

Package

ffa

Source

pointer.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
ffa.asd: The ffa<dot>asd file
ffa/package.lisp: The ffa/package<dot>lisp file
ffa/pointer.lisp: The ffa/pointer<dot>lisp file
ffa/types.lisp: The ffa/types<dot>lisp file
ffa/utils.lisp: The ffa/utils<dot>lisp file
File, Lisp, ffa.asd: The ffa<dot>asd file
File, Lisp, ffa/package.lisp: The ffa/package<dot>lisp file
File, Lisp, ffa/pointer.lisp: The ffa/pointer<dot>lisp file
File, Lisp, ffa/types.lisp: The ffa/types<dot>lisp file
File, Lisp, ffa/utils.lisp: The ffa/utils<dot>lisp file

L
Lisp File, ffa.asd: The ffa<dot>asd file
Lisp File, ffa/package.lisp: The ffa/package<dot>lisp file
Lisp File, ffa/pointer.lisp: The ffa/pointer<dot>lisp file
Lisp File, ffa/types.lisp: The ffa/types<dot>lisp file
Lisp File, ffa/utils.lisp: The ffa/utils<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   (  
C   D   E   F   I   M   P   V   W  
Index Entry  Section

(
(setf complex-mem-aref): Internal functions

C
complex-mem-aref: Internal functions
copy-array-from-pointer: Internal functions
copy-array-to-pointer: Internal functions
copy-to-pointer: Internal macros

D
displace-array: Internal functions

E
elt-type: Exported functions
elt-type-size: Internal functions

F
find-original-array: Internal functions
Function, (setf complex-mem-aref): Internal functions
Function, complex-mem-aref: Internal functions
Function, copy-array-from-pointer: Internal functions
Function, copy-array-to-pointer: Internal functions
Function, displace-array: Internal functions
Function, elt-type: Exported functions
Function, elt-type-size: Internal functions
Function, find-original-array: Internal functions
Function, part-type: Internal functions
Function, valid-direction-p: Internal functions

I
iter%: Internal macros

M
Macro, copy-to-pointer: Internal macros
Macro, iter%: Internal macros
Macro, pin-to-pointer: Internal macros
Macro, with-pointer-to-array: Exported macros
Macro, with-pointers-to-arrays: Exported macros

P
part-type: Internal functions
pin-to-pointer: Internal macros

V
valid-direction-p: Internal functions

W
with-pointer-to-array: Exported macros
with-pointers-to-arrays: Exported macros

Jump to:   (  
C   D   E   F   I   M   P   V   W  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*cffi-and-lisp-types*: Internal special variables

S
Special Variable, *cffi-and-lisp-types*: Internal special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   F   P   S  
Index Entry  Section

F
ffa: The ffa system
ffa: The ffa package
ffa-asd: The ffa-asd package

P
Package, ffa: The ffa package
Package, ffa-asd: The ffa-asd package

S
System, ffa: The ffa system

Jump to:   F   P   S