Subject: Re: Array boundry.

From: Zheng Gengbin <[email-masked]>
Date: Wed, 16 Apr 1997 09:31:47 +0800 (EAT)

On Tue, 15 Apr 1997, Guansong Zhang wrote:

> Yan Mi once have the similiar problem when working on array assignment format.
> It is decide to use intrinsic functions in F90 to caculate the lower and upper
> bound of the array inside the procedure, so we can use it later.
> 
> Now the problem is that if a template is added, it should be added before the
> execution statements, when boundary is not caculated out.
> 
> Adlib Fortran interface provide support for an array to be distributed directly
> onto processors. I suggest we use those functions to solve the problem, though
> there is no effort to do so in trans0 at present time.
> 
> If you agree, we should decide how to record a partitioned array without
> explicit template.
> 

	This seems a reasonable method . I checked the function 
pcrc_set_array_distribute(dad ,dim ,g_lb ,g_ub ,dist_code , grid 
,dim_grid ) . 

	So , I think I can make a default distribution in trans1 without
generate template,and trans0 will adjust to record the information whether 
an array have explicit template . If it has no explicit template , 
trans0 will distribute the array directly . In fact , when it happens ,
the array is dealt with like a template .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Thu, 17 Apr 1997 10:05:22 +0800 (EAT)

On Wed, 16 Apr 1997, Guansong Zhang wrote:

> On Apr 16, 10:03am, Zheng Gengbin wrote:
> > Subject: Re: Array boundry.
> > > The alternative solution may be: caculating all the necessary boundaries in
> > > side the caller, and put them in argument list. Though DAD already have all
> > > those info, they can only be retrieved at run-time.
> > >
> >
> > 	I think Mr Carpenter is right , in f90 , when a subroutine is called,
> > while rempping the dummies it must have an explicit interface . The caller
> > can create the dad for callee , and pass the dad to the function.
> >
> >
> > > In this case, every procedure call involved array section not only need to
> add
> > > a DAD as argument, but also the shape of the array.
> > >
> >
> > 	The DAD already contains the array shape information , doesn't it?
> >
> > Now we have 2 method to deal with the dummy , first to create dummy dad
> > in the caller function , second is to create the dad inside the callee
> > function . We have to decide which one is better .
> >
> 
> Dummy dad has been always creaded in the caller. I think some misunderstanding
> happened here.
> 

	Yea , Dummy dad is created in the caller , but the data mapping is
done by callee . Since we can assume every call which will do data 
mapping on the dummies have explicit interface , so compiler can do data
mapping for the dummy before it called .

Zheng