Intel® Fortran Compiler 16.0 User and Reference Guide

CONTIGUOUS

Statement and Attribute: Specifies that the target of a pointer or an assumed-sized array is contiguous.

The CONTIGUOUS attribute can be specified in a type declaration statement or an CONTIGUOUS statement, and takes one of the following forms:

Type Declaration Statement:

type, [att-ls,] CONTIGUOUS [, att-ls] :: object [, object] ...

Statement:

CONTIGUOUS [::] object [, object] ...

type

Is a data type specifier.

att-ls

Is an optional list of attribute specifiers.

object

Is an assumed-shape array or an array pointer.

Description

This attribute explicitly indicates that an assumed-shape array is contiguous or that a pointer will only be associated with a contiguous object.

An entity can be contiguous even if CONTIGUOUS is not specified. An object is contiguous if it is one of the following:

An object is not contiguous if it is an array subobject, and all of the following are true:

The CONTIGUOUS attribute can make it easier to enable optimizations that rely on the memory layout of an object occupying a contiguous block of memory.

Examples

The following examples show valid CONTIGUOUS statements:

REAL, CONTIGUOUS, DIMENSION(:,:) :: A
REAL, POINTER, CONTIGUOUS :: MY_POINTER(:)

See Also