next up previous contents
Next: TRANSPOSE(ARRAYORDER) Up: Specifications of Extended Intrinsic Previous: ACTIVE_PROCS_SHAPE()

ACTIVE_PROCS_SHAPE()

Description. Returns the shape of the currently active processor array, as determined by the innermost ON block.

Class. Processors inquiry function.

Arguments. None

Result Type, Type Parameter, and Shape. The result is a default integer array of rank one whose size is equal to the rank of the processor array determined by the innermost containing ON block.

Result Value. The value of the result is the shape of the processor array determined by the innermost containing ON block. Outside of any ON block, the result is the same as that returned by PROCESSORS_SHAPE().

Examples. The program fragment

        INTEGER X(16, 3)
        !hpf$ TEMPLATE T(16, 8)
        !hpf$ PROCESSORS PROCS(4, 4)
        !hpf$ ALIGN X(I, J) WITH T(I, 3*J-1)
        !hpf$ DISTRIBUTE T(CYCLIC(2), BLOCK) ONTO PROCS
        !hpf$ ON     (PROCS(:,:)) BEGIN
            PRINT *, ACTIVE_PROCS_SHAPE()
            !hpf$ ON HOME(X(2:12:10, :)) BEGIN
            PRINT *, ACTIVE_PROCS_SHAPE()
            !hpf$ END ON
        !hpf$ END ON

prints and regardless of the size or shape of the hardware processor array on which the program is running,