parenthesized(Parser<AccObjectList>{}))) ||
"DEVICEPTR" >> construct<AccClause>(construct<AccClause::Deviceptr>(
parenthesized(Parser<AccObjectList>{}))) ||
- "DEVICENUM" >> construct<AccClause>(construct<AccClause::DeviceNum>(
- parenthesized(scalarIntConstantExpr))) ||
+ "DEVICE_NUM" >> construct<AccClause>(construct<AccClause::DeviceNum>(
+ parenthesized(scalarIntExpr))) ||
"DEVICE_RESIDENT" >>
construct<AccClause>(construct<AccClause::DeviceResident>(
parenthesized(Parser<AccObjectList>{}))) ||
("DEVICE_TYPE"_tok || "DTYPE"_tok) >>
construct<AccClause>(construct<AccClause::DeviceType>(parenthesized(
- "*" >> construct<std::optional<std::list<Name>>>()))) ||
+ "*" >> construct<std::optional<std::list<ScalarIntExpr>>>()))) ||
("DEVICE_TYPE"_tok || "DTYPE"_tok) >>
construct<AccClause>(construct<AccClause::DeviceType>(
- parenthesized(maybe(nonemptyList(name))))) ||
+ parenthesized(maybe(nonemptyList(scalarIntExpr))))) ||
"FINALIZE" >> construct<AccClause>(construct<AccClause::Finalize>()) ||
"FIRSTPRIVATE" >> construct<AccClause>(construct<AccClause::Firstprivate>(
parenthesized(Parser<AccObjectList>{}))) ||
real :: reduction_r
logical :: reduction_l
real(8), dimension(N, N) :: aa
+ logical :: ifCondition = .TRUE.
!ERROR: At least one clause is required on the DECLARE directive
!$acc declare
real(8), dimension(N) :: a
+ !$acc init
+ !$acc init if(.TRUE.)
+ !$acc init if(ifCondition)
+ !$acc init device_num(1)
+ !$acc init device_num(i)
+ !$acc init device_type(i)
+ !$acc init device_type(2, i, j)
+ !$acc init device_num(i) device_type(i, j) if(ifCondition)
+
!ERROR: At least one of ATTACH, COPYIN, CREATE clause must appear on the ENTER DATA directive
!$acc enter data
// 2.14.1
def ACCC_DeviceNum : Clause<"device_num"> {
- let flangClassValue = "ScalarIntConstantExpr";
+ let flangClassValue = "ScalarIntExpr";
}
// 2.7.3
// 2.4
def ACCC_DeviceType : Clause<"device_type"> {
- let flangClassValue = "Name";
+ let flangClassValue = "ScalarIntExpr";
let defaultValue = "*";
let isValueOptional = 1;
let isValueList = 1;