Re: [pure-lang-users] case
Status: Beta
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-08-29 00:24:41
|
Eddie Rucker wrote: > It has functions for initializing to zero, idenity, or all the entries the same value. However, since the data is laid out as an > array of doubles, ints for gsl_matrix_int, (you get the picture) Yes, I see. So it's just a blob with dimensions and stride attached to it. Well, I could easily generate data compatible with that in Pure, along with the usual access operations and support in the runtime. Memory management would be provided by Pure. I could then add the necessary marshalling so that these thingies could be passed either as is to GSL, or the underlying gsl_block to the BLAS routines, or just the pointer to the blob to int*, double* etc., so that they could be used with graphics and audio software just as easily. Of course we need to fix a syntax for those arrays. I'd suggest the following: {x1,x2,...} is a vector (compatible with gsl_vector struct layout), {x11,x12,...; x21,x22,...; ...} is a matrix (compatible with gsl_matrix struct layout). Elements would be either integers or doubles, promoting all ints to double in the mixed case. We can think about complex numbers later. Using some macro hackery, it should also be possible to provide some kind of array comprehensions. I still have to think about this. Does that proposal sound reasonable? Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |