Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] doing MMX through ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] doing MMX through ocaml

Le 17 nov. 05 à 23:16, Damien Bobillot a écrit :

> PS : I think it will perhaps have the same problems as floating  
> computation, which is not really efficient. As far as I know,  
> floats are not stored as float in memory, but as a generic ocaml  
> value  : a pointer to a structure contains a tag indicating that  
> it's a float, and after the IEEE float value.

This not exactly true. As an exception, they are unboxed in records  
and arrays made of floats only [1,2].

Note that you can also use bigarrays [3] to have unboxed arrays of  
any scalar datatype.

This page [4] (unfortunately not available in the faq of the new  
ocaml site) contains interesting information about writing numerical  
code in ocaml.

Best,

Daniel

[1] <http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc218>
[2] <http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc219>
[3] <http://caml.inria.fr/pub/docs/manual-ocaml/manual043.html#htoc261>
[4] <http://caml.inria.fr/pub/old_caml_site/ocaml/numerical.html>