Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
27230 Discussions

CONTIGUOUS Flag for Dummy Array Arguments

ScottBoyce
Beginner
145 Views

While documentation says that the compiler will make more optimizations for subroutines that use the CONTIGUOUS flag, I thought I ask if this is true of the Intel Compiler.

I always pass to my subroutines contiguous slices such as X(:,:,2:5)

An example subroutine would be:

SUBROUTINE MYSUB(X,Y,Z)
REAL, DIMENSION(:    ), CONTIGUOUS, INTENT(INOUT):: X
REAL, DIMENSION(:,:  ), CONTIGUOUS, INTENT(INOUT):: Y
REAL, DIMENSION(:,:,:),             INTENT(INOUT):: Z
CONTIGUOUS:: Z

...CODE...

END SUBROUTINE

Does the compiler do any optimizations on X,Y, and Z or is this an unnessary keyword. When is it best to use this?

Thanks in advance

0 Kudos
2 Replies
TimP
Black Belt
145 Views

How about checking full. examples e.g.by comparing  opt-report4 ?

Xiaoping_D_Intel
Employee
145 Views

There are detail explanation and examples in the section 10 of this article.

Thanks,

Xiaoping Duan

Intel Customer Support

 

Reply