Hi,

I have the following problem 

Let's consider a distributed array : a(0) .. a(n)  (1D version for simplicity):

a(1) .. a(10) on place 0
a(11) .. a(20) on place 1
a(21) .. a(30) on place 2
..

I want to apply a stencil (e.g. from the heat equation : b_(i) = f(a_(i+1), 
a(i), a_(i-1))).
where b has the same distribution as a

Is it possible to define a class (that inherits from array) so that
__________________________________________________________
- at each place p, the local part of the array a(1 + 10*p) ... a(10*(p+1)) is 
surrounded 
  by a layer of "ghost components" that are copies of a(10*p) and a(10*(p+1) + 
1)

__________________________________________________________
- at a place p: 
      
if you write : 

        a(1+10*p) = a(10*p), 

you read the local copy (ghost value) of the distant component a(10*p)
     
 if you write : 

         a(1+10*p) = at (p-1) a(10*p), 

you have a remote access to the real component

__________________________________________________________
- the class has a method (e.g. ghosts_synchronize) that efficiently 
  duplicates selected distant values in ghost values  

Maybe this kind of arrays have already been implemented somewhere ?

__________________________________________________________
Thanks in advance,
Marc
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to