caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Fernando Alegre <fernando@cc.gatech.edu>
To: caml-list@inria.fr
Cc: xavier.leroy@inria.fr, info@gerd-stolpmann.de,
	"Jun P.FURUSE" <Jun.Furuse@inria.fr>
Subject: Re: [Caml-list] camlimages and kernel memory
Date: Wed, 12 Jun 2002 18:09:02 -0400	[thread overview]
Message-ID: <20020612220902.GB13193@oso.local> (raw)
In-Reply-To: <20020612.182037.700403668.Jun.Furuse@inria.fr>


Thank you for all the good suggestions. We are currently using Bigarrays and
mmap to read images from files, simulating the dcams. We map the whole
file into a bigarray and use ad-hoc functions to extract the rgb data
without worriying much about headers. This is OK  for now, but we may be
interested in the future in interfacing with the camlimages library.

So, the next question is: Can we use Obj.magic to convert a bigarray to a
string without copying data? Will this trick work   with boundary checks
turned off, so that we can have the advantage of mmap and no bound checks
at the same time?

Thanks again,

       Fernando Alegre
       
On Wed, Jun 12, 2002 at 06:20:37PM +0200, Jun P.FURUSE wrote:

> The kernel memory may use different pixel layout, I am afraid.
> In such case, you have to write your own version of module like
> Rgb24, Index8 and so on. I am sorry but they are not well documented...


> BTW, once I tried to implement Image.t using Bigarray, but it was too
> slow. It seemed to me that it performed the array boundary checks for
> each access. For image manipulation purposes, the unsafe versions of set
> and get are really required. 
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      reply	other threads:[~2002-06-12 18:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-05 23:48 Fernando Alegre
2002-06-06 21:08 ` Gerd Stolpmann
2002-06-08 13:36   ` Xavier Leroy
2002-06-12 16:20     ` Jun P.FURUSE
2002-06-12 22:09       ` Fernando Alegre [this message]

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=20020612220902.GB13193@oso.local \
    --to=fernando@cc.gatech.edu \
    --cc=Jun.Furuse@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    --cc=xavier.leroy@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).