guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vector typing


From: Dave Griffiths
Subject: vector typing
Date: Thu, 4 May 2006 17:57:31 +0100 (BST)
User-agent: SquirrelMail/1.4.6

Hi all,

I'm upgrading an application from the old gh interface (yep, about time
too, it's much nicer) and I've noticed a change in the way vectors are
constructed in the api. I used to use gh_doubles2scm to quickly convert a
block of data into a generalised vector. I've moved over to using
scm_take_f32vector, which is just as fast, but creates vectors which have
to be accessed by (f32vector-ref) etc.

I admit I am confused about the typing of vectors - is there a quick way
to create generalised vectors other than using scm_make_vector and adding
each element individually with scm_vector_set_x?

Speed is an issue, as this is a graphics application
(http://www.pawfal.org/fluxus) and I'm doing a lot of things with vectors.
Are f32 better for speed reasons anyway? Why can't I access them with the
vanilla vector-ref/vector-set! etc?

cheers,

dave





reply via email to

[Prev in Thread] Current Thread [Next in Thread]