Description. Returns the map array used in the indirect
distribution of axis TEMPLATE_DIM of the
ultimate align-target associated with ARRAY.
Class. Mapping inquiry subroutine.
ARRAY may be of any type. It must not be scalar. It must not be sequential. It must not be a pointer that is disassociated or an allocatable array that is not allocated. It is an INTENT(IN) argument.
TEMPLATE_DIM must be scalar and of type default integer. Its value must be between one and the rank of the ultimate align-target of ARRAY. It is an INTENT(IN) argument.
MAP_ARRAY must be of type default integer and of rank one. Its size must be no smaller than the extent of the PROCESSORS_DIMth axis of the processors arrangement onto which is distributed the ultimate align-target associated with ARRAY. It is an INTENT(OUT) argument.
The ith element of
MAP_ARRAY is set to the processor index to which the
ith element of the ultimate align-target of
ARRAY along axis TEMPLATE_DIM is mapped. If
axis TEMPLATE_DIM of the ultimate
align-target of ARRAY is collapsed, then
all elements of the result have the value one.
Example. Given the declarations
DIMENSION A(2) !HPF$ TEMPLATE T(4,8) !HPF$ ALIGN A(I,*) WITH T(2*I,5) !HPF$ PROCESSORS PROCS(2,2) !HPF$ DISTRIBUTE T(INDIRECT( (/1,2,2,1/) ), BLOCK( (/3,5/) )) ONTO PROCS
assuming that the actual
mappings are as the directives specify,
Then after calling
HPF_MAP_ARRAY(A,TEMPLATE_DIM=1, MAP_ARRAY=M), M has the value [1 2 2 1]. After calling HPF_MAP_ARRAY(A,TEMPLATE_DIM=2, MAP_ARRAY=M), M has the value [1 1 1 2 2 2 2 2].