Multidimensional Support Routines (GNU libgomp)

### 3.4 Multidimensional Support Routines ¶

Routines that retrieve information about the execution environment with multiple spatial dimensions. They have C linkage and do not throw exceptions.

The dimensional space is unidimensional, if the number of active spaces is one. To create a multidimensional space, the `dim` modifier must be specified with a dimension greater than one in the `num_teams`, `num_thread_limits`, or `num_threads` clause.

The relation between the unidimensional and the spatial values is as follows: For the size, the unidimensional size is the product of the spatial sizes. For the thread or team number, the unidimensional number is the respective index of dimension 0 plus the index of dimension 1 times the size of dimension 0 plus the index of dimension 2 times the size of dimension 1 times the size of dimension 0 etc. If the active spatial dimensions is one, the spatial dimensional result for dimension zero is the same as returned by the respective unidimensional routine.

Note that there is no means to obtain the number of active dimensions in the general case as the size of an inactive spatial dimension is one, which is also a permitted size for an active spatial dimension.