[ HPF Home | Versions | Compilers | Projects | Publications | Applications | Benchmarks | Events | Contact ] |
Optional arguments. DIM, PROC.
Description. Returns the number of blocks of elements in each
dimension, or of
a specific dimension of the array on a given processor.
Class. Pure function.
Arguments.
ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument.
DIM (optional) must be scalar and of type integer with a value in the range , where is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
PROC (optional) must be scalar and of type integer.
It must be a valid processor number.
Result Type, Type Parameter, and Shape.
The result is of type default integer. It is scalar if
DIM is present; otherwise the result is an array of
rank one and size , where is the rank of
ARRAY.
Result Value.
*
(i): The value of LOCAL_BLKCNT(ARRAY, DIM, PROC) is the number of blocks of the ultimate align target of ARRAY in dimension DIM that are mapped to processor PROC and which have at least one element of ARRAY aligned to them.
(ii): LOCAL_BLKCNT(ARRAY, DIM) returns the same value as LOCAL_BLKCNT(ARRAY, DIM, PROC=MY_PROCESSOR()).
(iii): LOCAL_BLKCNT(ARRAY) has a value whose th component is
equal to LOCAL_BLKCNT(ARRAY, ), for , where
is the rank of ARRAY.
Examples.
Given the declarations
REAL A(20,20), B(10)
!HPF$ ALIGN B(J) WITH A(*,J)
!HPF$ PROCESSORS PR(5,5)
!HPF$ CALL LOCAL_COMPUTE(A, B)
...
...
...
EXTRINSIC(HPF_LOCAL) SUBROUTINE LOCAL_COMPUTE(X, Y)
USE HPF_LOCAL_LIBRARY
REAL X(:,:), Y(:)
INTEGER NBY(1), NBX(2)
NBX = LOCAL_BLKCNT(X)
NBY = LOCAL_BLKCNT(Y)
the values returned on the physical processor corresponding to
PR(2,4) in NBX is ,4,3,, plus 1filll
-1;4,3,; plus 1filll
-1:4,3,: plus 1filll
-1.4,3,. plus 1filll
-14,3, plus 1filll-1 and in NBY is
,1,, plus 1filll
-1;1,; plus 1filll
-1:1,: plus 1filll
-1.1,. plus 1filll
-11, plus 1filll-1.
©2000-2006 Rice University | [ Contact Us | HiPerSoft | Computer Science ] |