File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,14 @@ struct DeviceExprChecker
82
82
}
83
83
}
84
84
}
85
+ const Symbol &ultimate{sym->GetUltimate ()};
86
+ const Scope &scope{ultimate.owner ()};
87
+ const Symbol *mod{scope.IsModule () ? scope.symbol () : nullptr };
88
+ // Allow ieee_arithmetic module functions to be called on the device.
89
+ // TODO: Check for unsupported ieee_arithmetic on the device.
90
+ if (mod && mod->name () == " ieee_arithmetic" ) {
91
+ return {};
92
+ }
85
93
} else if (x.GetSpecificIntrinsic ()) {
86
94
// TODO(CUDA): Check for unsupported intrinsics here
87
95
return {};
Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ end subroutine ieee_get_underflow_mode_l##GKIND;
339
339
#define IEEE_IS_FINITE_R(XKIND) \
340
340
elemental logical function ieee_is_finite_a##XKIND(x); \
341
341
real (XKIND), intent (in ) :: x; \
342
+ ! dir$ ignore_tkr(d) x; \
342
343
end function ieee_is_finite_a##XKIND;
343
344
interface ieee_is_finite
344
345
SPECIFICS_R(IEEE_IS_FINITE_R)
Original file line number Diff line number Diff line change @@ -209,3 +209,15 @@ subroutine host1()
209
209
a(i) = a(i) + a(j) - 34.0
210
210
end do
211
211
end
212
+
213
+ subroutine ieee_test
214
+ use ieee_arithmetic
215
+
216
+ real(8), device :: y(100)
217
+ logical(4), managed :: ll(100)
218
+
219
+ !$cuf kernel do(1)<<<*,*>>>
220
+ do i = 1, 100
221
+ ll(i) = ieee_is_finite(y(i)) ! allow ieee_arithmetic functions on the device.
222
+ end do
223
+ end subroutine
You can’t perform that action at this time.
0 commit comments