caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benedikt Grundmann <benedikt.grundmann@googlemail.com>
To: Hongbo Zhang <bobzhang1988@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] How could I implement an efficient ring buffer?
Date: Mon, 2 Apr 2012 16:44:45 +0100	[thread overview]
Message-ID: <CAMr3DCN3_gSofkEjPwN8M49KX82q77Ay2sAGu_BYejnh_+XW2Q@mail.gmail.com> (raw)
In-Reply-To: <4F79B858.2090502@gmail.com>

Use core's Dequeue module.

Cheers,

Bene

On 2 April 2012 15:31, Hongbo Zhang <bobzhang1988@gmail.com> wrote:
> 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
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>



-- 
Calvin: I try to make everyone's day a little more
surreal.

(From Calvin & Hobbes)


  parent reply	other threads:[~2012-04-02 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 14:31 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 [this message]
2012-04-03  0:06 ` Francois Berenger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMr3DCN3_gSofkEjPwN8M49KX82q77Ay2sAGu_BYejnh_+XW2Q@mail.gmail.com \
    --to=benedikt.grundmann@googlemail.com \
    --cc=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).