| OPENMP API Specification: Version 5.0 November 2018

2.1.4  Array Shaping

If an expression has a type of pointer to T, then a shape-operator can be used to specify the extent of that pointer. In other words, the shape-operator is used to reinterpret, as an n-dimensional array, the region of memory to which that expression points.

Formally, the syntax of the shape-operator is as follows:  

 shaped-expression  := ([s1][s2]...[sn])cast-expression  

The result of applying the shape-operator to an expression is an lvalue expression with an n-dimensional array type with dimensions s1 ×s2×sn and element type T.

The precedence of the shape-operator is the same as a type cast.

Each si is an integral type expression that must evaluate to a positive integer.

RestrictionsRestrictions to the shape-operator are as follows:

SVG-Viewer needed.