caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Bigarray question
@ 2005-11-25 18:19 Thomas Fischbacher
  2005-11-25 20:06 ` [Caml-list] " Dmitry Bely
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Fischbacher @ 2005-11-25 18:19 UTC (permalink / raw)
  To: caml-list


As far as I can see from the documentation, it is not explicitly permitted 
to change a once allocated bigarray data structure in such a way that one 
replaces the data pointer by some other data pointer (while retaining 
size and type). This would, however, be quite useful in some situations.

Could this be changed?

-- 
regards,               tf@cip.physik.uni-muenchen.de              (o_
 Thomas Fischbacher -  http://www.cip.physik.uni-muenchen.de/~tf  //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y)           V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1))                  (Debian GNU)


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Bigarray question
@ 2007-12-18 17:44 Thomas Fischbacher
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Fischbacher @ 2007-12-18 17:44 UTC (permalink / raw)
  To: Caml-list List


Hello everybody,

as far as I can tell, it is easy (but not explicitly allowed in the
documentation) to allocate a Caml bigarray and change the data
pointer inside that bigarray afterwards.

What I am into right now is writing a function which allows me to
walk a caml function over the entries of a sparse matrix operator
managed by a low-level sparse matrix linear algebra C library.
Therefore, it would be rather elegant to allocate bigarrays for
index and data entries only once and pass them on to the ML
callback for every row of the matrix.

There is no problem in implementing this, technically speaking.
But this would require a change to the ML documentation stating
that it is explicitly considered as permissible to change the
data pointer in a bigarray. Can I get that, please?

-- 
best regards,
Thomas Fischbacher
t.fischbacher@soton.ac.uk


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-12-18 17:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-25 18:19 Bigarray question Thomas Fischbacher
2005-11-25 20:06 ` [Caml-list] " Dmitry Bely
2005-11-27 22:48   ` Thomas Fischbacher
2005-11-28  9:39     ` Dmitry Bely
2005-11-28 21:30       ` Thomas Fischbacher
2007-12-18 17:44 Thomas Fischbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).