caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] How could I implement an efficient ring buffer?
@ 2012-04-02 14:31 Hongbo Zhang
  2012-04-02 15:04 ` David Allsopp
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hongbo Zhang @ 2012-04-02 14:31 UTC (permalink / raw)
  To: Caml List

Hi List,
    I want to implement sliding window algorithm (in place, no memory 
copy), I wonder whether I need to write c code.

    To make it clear and simple,
       In c, you can record the head pointer of the array, and do the 
modulo operations when get and set
       In ocaml, it seems you have an array a of type int array,  you 
can not do things like this *(&a+5).
    Many thanks


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

end of thread, other threads:[~2012-04-03  0:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 14:31 [Caml-list] How could I implement an efficient ring buffer? Hongbo Zhang
2012-04-02 15:04 ` David Allsopp
2012-04-02 15:15   ` Gabriel Scherer
2012-04-02 21:15   ` Jon Harrop
2012-04-02 15:44 ` Benedikt Grundmann
2012-04-03  0:06 ` Francois Berenger

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).