Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Bigarray question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-12-19 (19:15)
From: Thomas Fischbacher <tf@f...>
Subject: Re: [Caml-list] Bigarray question


>>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.
>>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?
> I see no reason why this would cause problems, as long as the data
> pointer points to C data of the right shape and dimensions.  (Of
> course, you could update the dimensions of the bigarray as
> appropriate, if needed.)  I don't think I would document this, as I
> wouldn't quite know how to word it in the docs, but you have my
> encouragements to try and report problems if any.

Just adding a line to the documentation which states that
"it is permitted to dynamically change the data and dims
fields of the bigarray data structure from within C" would be

best regards,
Thomas Fischbacher