[plt-dev] flvector

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Jan 10 03:34:08 EST 2010

On Dec 18, Doug Williams wrote:
> Attached is a zip file with some homogeneous vector and array code I
> was working on in the past. The code in vtype.ss abstracts the
> definitions of the various SFRI 4 vector types (and regular Scheme
> vectors). The vector types it knows about are object (i.e., straight
> Scheme heterogeneous vectors), u(8,16,32,64), s(8,16,32,64), and
> f(32,64). There are also complex vectors of the numeric types
> cu(8,16,32,64), cs(8,16,32,64), and cf(32,64).  The code in
> type-vector.ss abstracts the vector types describes in vtype.ss into
> a single typed-vector type. The code in array.ss provides the array
> abstraction with the underlying data stored as a
> typed-vector. Finally, the array-test.ss test the array
> abstraction. [Just running array-test.ss will give you a pretty good
> idea about the array abstraction.]
> The intent is to provide a homogeneous array implementation similar
> to the underlying arrays in Matlab (or numpy in Python). This is
> what I would like to make more efficient and better integrated into
> the rest of PLT Scheme.
> So, I guess the questions are:
> 1) Should I skip SRFI 4 altogether? The SRFI 4 implementation just
> exports things from scheme/foreign, so it would probably make sense
> to go straight to it. But, I am also using the naming convention
> from SRFI 4.

Did you see the `cvector' type from `scheme/foreign'?  AFAICT (from a
very brief view), your code does something very similar.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.