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

ID 767251
Date 9/08/2022
Public

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

Document Table of Contents

ATOMIC_AND

Atomic Intrinsic Subroutine (Generic): Performs atomic bitwise AND.

CALL ATOMIC_AND (atom, value [, stat])

atom

(Input; output) Must be a scalar coarray or coindexed object and of type integer with kind ATOMIC_INT_KIND. It becomes defined with the value of iand (atom, int (value, ATOMIC_INT_KIND)) if no error occurs. Otherwise, it becomes undefined.

ATOMIC_INT_KIND is a named constant in the intrinsic module ISO_FORTRAN_ENV.

value

(Input) Must be a scalar integer. The value of value must be representable as an integer with kind ATOMIC_INT_KIND.

stat

(Output; optional) Must be a non-coindexed integer scalar with a decimal exponent range of at least four (KIND=2 or greater). The value assigned to stat is specified in Overview of Atomic Subroutines. If stat is not present and an error condition occurs, error termination is initiated.

Example

Consider the following:

CALL ATOMIC_AND (N[4], 22) 

If the value of N on image 4 is 29 when this operation is initiated, the value of N on image 4 is 20 when the operation is complete and no error condition occurs during the subroutine reference.