---
title: Fortran引导语支持差异
description: "Fortran引导语用于向编译器提供附加信息，并控制特定的代码块。不同编译器支持特定的Fortran引导语，Fortran引导语支持情况大致如表1所示。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenggrf/codeprtr/kunpengtaishanporting_12_0121.html
sourcePath: /source/zh/kunpenggrf/codeprtr/kunpengtaishanporting_12_0121.html
indexId: 37e6b5bd8c7fa0f287336eaca350141187b8fcdbb324eb847a70147a4a6bc78365
---
# Fortran引导语支持差异

Fortran引导语用于向编译器提供附加信息，并控制特定的代码块。不同编译器支持特定的Fortran引导语，Fortran引导语支持情况大致如表1所示。


**表1 引导语差异支持详情**

| 引导语 | 含义 | GNU编译器 | 毕昇编译器 | Intel编译器 |
| --- | --- | --- | --- | --- |
| !$omp | 支持omp并行编程语法 | Y | Y | Y |
| !$mem prefetch | 数据预取指令 | N | Y | N |
| !$omp simd | 指示编译器将循环转换为SIMD形式 | N | Y | Y |
| !dir$ vector always | 强制编译器进行循环矢量化 | N | Y | Y |
| !dir$ novector | 指示编译器不要进行循环矢量化操作 | N | Y | Y |
| !dir$ inline | 指示编译器对函数进行内联操作 | N | Y | Y |
| !dir$ noinline | 指示编译器不要对函数进行内联操作 | N | Y | Y |
| !dir$ unroll | 指示编译器进行循环展开操作 | N | Y | Y |
| !dir$ nounroll | 指示编译器阻止循环展开操作 | N | Y | Y |
| !DEC/dir$ IF | 宏定义 | N | N | Y |
| !DIR$ ATTRIBUTES | 指定编译器对变量的相关属性操作 | N | N | Y |
| !DIR$ PREFETCH | 数据预取指令 | N | N | Y |
| 更多规范介绍 | 更多规范介绍 | The GNU Fortran Compiler(http://www.math.uni\-leipzig.de/~hellmund/Vorlesung/gfortran.html\#SEC13) | 毕昇编译器Fortran引导语支持(https://www.hikunpeng.com/document/detail/zh/kunpengdevps/compilation/ug\-bisheng/kunpengbisheng\_06\_0015.html) | Fortran Compiler OneAPI Development Guide and Reference(https://www.intel.com/content/www/us/en/develop/documentation/fortran\-compiler\-oneapi\-dev\-guide\-and\-reference/top/language\-reference/a\-to\-z\-reference/a\-to\-b/attributes/attributes\-vector.html) |
