Specifies a block of code in the SIMD loop or SIMD-enabled function that should be executed serially, in a logical order of SIMD lanes.
simdoffblock will use a single SIMD lane to execute operations in the order of the loop iterations, or logical lanes of a SIMD-enabled function. This preserves ordering of operations in the block with respect to each other, and correlates with iteration space of the enclosing SIMD construct. The ordered
simdblock is executed in order, with respect to each SIMD lane or each loop iteration. The operations within the ordered
simdoffblock can be re-ordered by optimizations, as long as the original execution semantics are preserved.
simdoffblocks allow the isolation and resolution of situations prohibited from SIMD execution. This includes cross-iteration data dependencies, function calls with side effects, such as
OpenMP,TBB and native thread synchronization primitives.
simdoffsections are useful for resolving cross-iteration data dependencies in otherwise data-parallel computations. For example, the section may handle histogram updates as shown below: