I have a question for the HPF wizards out there:
Assume that I have a derived type containing a POINTER component.
This component is a pointer because the standards forbids ALLOCATABLE
arrays a components and it will only appear in ALLOCATE and DEALLOCATE
statements, never in a pointer assignment (if that makes any
difference).
type :: t
private
real, dimension(:), pointer :: x
end type t
Assume further that a have an array of this derived type
type(t), dimension(SIZE_TA) :: ta
and a PURE procedure
pure subroutine p (one_t)
type(t), intent(in) :: one_t
end subroutine p
what will a typical (or a good) HPF compiler do with code like
forall (i = 1:size(ta))
call p (ta(i))
end forall
Will it parallelize the code (assuming appropriate $HPF directives) or
will the pointer component prevent this?
I hope that
type :: t
private
real, dimension(MAX_SIZE_X) :: x
integer, size_x
end type t
and replacing size(t%x) by t%size_x everywhere is _not_ the only
solution ...
I don't have a working HPF environment available. I'm asking, because
I want to make sure that a library that I have developed with MPI
makes some sense with HPF as well.
Thanks,
-Thorsten Ohl
--
Thorsten Ohl, Physics Department, TU Darmstadt -- [log in to unmask]
http://crunch.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|