Hello,
I have a question concerning the PACK array intrinsic of Fortran 90.
I have an array of shape A(N,n), N>>n, and a mask of shape A_MASK(N). I
want to pack A using this mask *along* the first dimension. In other
words, I want to do:
DO i=1,n
A_PACKED(:,i)=PACK(A(:,i),A_MASK)
END DO
Is there a way to do this in array syntax? The above DO loop would
generate huge overheads in copy-in copy-out operations for the arrays. I
know that one can use PACK and then RESHAPE to make A_PACKED, but that
would likely generate lots of overhead too.
Thanks a lot,
Aleksandar
--
_____________________________________________
Aleksandar Donev
Physics Department
Michigan State University
East Lansing, MI 48824-1116
E-mail: [log in to unmask]
Work phone: (517) 432-6770
_____________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|