BLAS interface types - Factor Documentation (original) (raw)

BLAS vectors come in single- and double-precision, real and complex flavors:
float-blas-vector
double-blas-vector
complex-float-blas-vector
complex-double-blas-vector

These vector types all follow the sequence protocol. In addition, there are corresponding types for matrix data:

float-blas-matrix

double-blas-matrix
complex-float-blas-matrix
complex-double-blas-matrix

There are BOA constructors for all vector and matrix types, which provide the most flexibility in specifying memory layout:

( underlying length inc -- vector )

( underlying length inc -- vector )
( underlying length inc -- vector )
( underlying length inc -- vector )
( underlying ld rows cols transpose -- matrix )
( underlying ld rows cols transpose -- matrix )
( underlying ld rows cols transpose -- matrix )
( underlying ld rows cols transpose -- matrix )

For the simple case of creating a dense, zero-filled vector or matrix, simple empty object constructors are provided:

( length exemplar -- vector )

( rows cols exemplar -- matrix )

BLAS vectors and matrices can also be constructed from other Factor sequences:

>float-blas-vector ( seq -- v )

>double-blas-vector ( seq -- v )
>complex-float-blas-vector ( seq -- v )
>complex-double-blas-vector ( seq -- v )
>float-blas-matrix ( arrays -- matrix )
>double-blas-matrix ( arrays -- matrix )
>complex-float-blas-matrix ( arrays -- matrix )
>complex-double-blas-matrix ( arrays -- matrix )