Version française
Home     About     Download     Resources     Contact us    
Browse thread
ANNOUNCE : libsndfile-ocaml alpha
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matthieu Dubuget <matthieu.dubuget@g...>
Subject: Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha
Erik de Castro Lopo a écrit :
> Richard Jones wrote:
>
>   
>> On Sun, Dec 31, 2006 at 03:23:05PM +1100, Erik de Castro Lopo wrote:
>>     
>>> Since it is already possible to read Ocaml floats (which are normalised
>>> to the range [-1.0, 1.0]) why would anyone want to ready any other data
>>> type?
>>>       
>> Two reasons I can think of[*]: (a) to avoid copying, (b) to make an
>> exact reproduction (without the conversion to and from float).
>>     
>
> Well the amount of copying is the same whether I use bigarray or a 
> standard Ocaml float array so (a) is irrelevant.
>   
Is it really the case? I thought that it was possible to create a
bigarray wrapping a C array without
copying datas. I do not know how to achieve this for float arrays?

This could be interesting for read-only access or in-place modifications?

Another very interesting feature of bigarrays is the memory mapping of a
file as a big array, very useful to work with BIG files.

Matt