Re: Efficient way to pass different shaped arrays?
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 16:06:39 -0700
John Harper wrote:
(snip)
FORALL(I=1:100,J=1:100) A(I,J) = MERGE(1.0, 0.0, I==J)
OK, but can you do something like:
SUBROUTINE B(array,X)
LOGICAL X
REAL, DIMENSION(MERGE(3,28,X),0:MERGE(0,10001,X)),INTENT(INOUT)::array
to select the appropriate dimensions?
My previous suggestion would look something like
SUBROUTINE B(array,X)
INTEGER X
REAL, DIMENSION(3+25*(1/X),0:10001*(1/X)),INTENT(INOUT)::array
where X is either 1 or greater than 1 to select between (28,0:10001)
and (3,0:0).
I would say both are pretty ugly, though.
-- glen
.
- Follow-Ups:
- Re: Efficient way to pass different shaped arrays?
- From: John Harper
- Re: Efficient way to pass different shaped arrays?
- References:
- Efficient way to pass different shaped arrays?
- From: Peter
- Re: Efficient way to pass different shaped arrays?
- From: glen herrmannsfeldt
- Re: Efficient way to pass different shaped arrays?
- From: John Harper
- Efficient way to pass different shaped arrays?
- Prev by Date: Re: Efficient way to pass different shaped arrays?
- Next by Date: removing blanks from a file
- Previous by thread: Re: Efficient way to pass different shaped arrays?
- Next by thread: Re: Efficient way to pass different shaped arrays?
- Index(es):
Relevant Pages
|