Engee documentation

For Each

Control unit for For-each type subsystem.

blockType: ForEach

Path in the library:

/Basic/Ports & Subsystems/For Each

Description

The For Each block is a control block for the For Each Subsystem. Specifically, the For Each block allows blocks within the For Each Subsystem to process portions of input signals. Each block within this subsystem maintains a separate set of states for each element or subarray it processes. As a set of subsystem blocks process elements or subarrays, the subsystem combines the results to form output signals.

Ports

Output

Partition index - index of the current item
scalar

Index of the current element (starting from zero); scalar.

Data types: Int32, Float64.

Parameters

Main

Show partition index output port (zero-based indexing) - output port display control
disabled (by default) | enabled

Controls the partition index output port display.

  • disabled - hide the output port.

  • enabled - display the output port on the block.

Usage in program code

Block parameter

ShowIterationIndex

Values

disabled | enabled

By default

off

Partition index output data type - specify partition index data type
Int32 (by default) | Float64

Specify the partition index output data type for the output port.

  • Int32 - select a 32-bit integer with a sign.

  • Float64 - select a 64-bit real number.

Dependencies

To use this parameter, select the Show partition index output port checkbox.

Usage in program code

Block parameter

IterationIndexDataType

Values

int32 | Float64

By default

int32

Number of iterations - specify the number of partitions to be processed
-1 (by default) | number of iterations

To process a subset of data, specify the number of slices of the input signal or mask parameter array to be processed, otherwise specify -1 to process all slices. The number must not be greater than the total number of available slices.

  • -1 - process all slices.

  • Number of iterations - the number of slices to process. For example, Number of iterations 3 means that only the first 3 slices are processed.

Usage in program code

Block parameter

SpecifiedNumIters

Values

-1 | integer

By default

-1