Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

HINT

Parallel Directive Clause: Provides information about the expected runtime behavior of the region that corresponds to the construct where it is specified for optimization purposes.

Syntax

HINT (hint-expression)

hint-expression

Is an integer expression with a kind type of OMP_SYNC_HINT_KIND with a value that is a valid synchronization hint.

The HINT clause provides information about the expected runtime properties of the construct where it appears. It does not change the semantics of the construct.

If a HINT clause does not appear in a construct that accepts a HINT clause, it is as if HINT (OMP_SYNC_HINT_NONE) appears in the construct.

The predefined KIND type OMP_SYNC_HINT_KIND is used to specify the kind-type parameter for an integer that is to be used in hint-expression. The following table lists the predefined synchronization HINT constants. They appear in the Fortran module file omp_lib.mod and the Fortran include file omp_lib.h.

Synchronization HINT constant name

Value

Description

OMP_SYNC_HINT_NONE

0

Provides documentation clarity. It has no effect on the construct transformation.

OMP_SYNC_HINT_UNCONTENDED

1

Indicates low contention in the construct. Few threads are expected to encounter the region at the same time in a manner requiring synchronization.

OMP_SYNC_HINT_CONTENDED

2

Indicates high contention in the construct. Many threads will encounter the region at the same time requiring synchronization.

OMP_SYNC_HINT_SPECULATIVE

4

Suggests that the operation be implemented using speculative techniques such as transactional memory.

OMP_SYNC_HINT_NONSPECULATIVE

8

Suggests that the operation not be implemented using speculative techniques such as transactional memory.

Synchronization HINT constants can be combined in expressions with the plus (+) operator. Combining a synchronization HINT constant with OMP_SYNC_HINT_NONE is the same as just specifying the synchronization HINT constant alone.

You cannot combine the following HINT constants:

  • OMP_SYNC_HINT_UNCONTENDED and OMP_SYNC_HINT_CONTENDED

  • OMP_SYNC_HINT_SPECULATIVE and OMP_SYNC_HINT_NONSPECULATIVE

An implementation can provide additional pre-defined synchronization HINT constants.

See Also