UArray question....

heron_carvalho heron_carvalho at bol.com.br
Mon Oct 27 14:28:00 EST 2003


Hi,

 thanks for your answer. 

 In the distributed parallel extension that we are 
developing, programmers are free to use immutable or 
mutable arrays and to transmit them between processes 
(the language have mechanisms to make transparent 
send/recv operations). Thus, it is important to give 
efficient marshalling for any array type. With 
StorableArrays, GHC offers good support, but for 
immutable arrays types, we have to copy element by 
element (worse performance). 
 
  But someone can explain how unboxed arrays are stored 
in memory ?

Heron 


> AFAIK, no.  That's the whole point of StorableArrays.  
Why can't you use 
> these instead of UArrays?
> 
>  - Hal
> 
> On Mon, 27 Oct 2003, heron_carvalho wrote:
> 
> > Dear colleagues,
> >  
> >    In GHC/FFI, is there some way (is it possible ?) t
o 
> > access DIRECTLY an array of UArray type (immutable) i
n a 
> > sequential contiguous memory buffer (in C side, for 
> > example) without to need to copy the array elements o
ne 
> > by one ? GHC hackers and implementors are wellcome...
 :-) 
> > My interest is to transmit the array over a network u
sing 
> > MPI, but avoiding marshalling overheads. 
> >  
> >     It is easy to do this with StorableArray's in the
 IO 
> > monad, of course, but I need to use UArray.
> >  
> >  
> > Heron de Carvalho
> >  
> > 
> > 
> >  
> > _____________________________________________________
_____________________
> > Acabe com aquelas janelinhas que pulam na sua tela.
> > AntiPop-up UOL - É grátis!
> > http://antipopup.uol.com.br/
> > 
> > 
> > _______________________________________________
> > Glasgow-haskell-users mailing list
> > Glasgow-haskell-users at haskell.org
> > http://www.haskell.org/mailman/listinfo/glasgow-
haskell-users
> > 
> 
> -- 
>  Hal Daume III                                   | hdau
me at isi.edu
>  "Arrest this man, he talks in maths."           | www.
isi.edu/~hdaume
> 
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-
haskell-users
> 

 
__________________________________________________________________________
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/




More information about the Glasgow-haskell-users mailing list