Skip to content

Commit 7c71531

Browse files
committed
use RT_DEVICE_NOINLINE and clang format
1 parent 65c8c54 commit 7c71531

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

flang-rt/lib/runtime/extrema.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,9 @@ struct DoPartialMaxOrMinLocHelper {
400400
// NVCC inlines more aggressively which causes too many specializations of
401401
// this function to be inlined causing compiler timeouts. Set as
402402
// noinline to allow compilation to complete.
403-
#if defined(__CUDACC__)
404-
__attribute__((noinline))
405-
#endif
406-
RT_API_ATTRS void
407-
operator()(const char *intrinsic, Descriptor &result, const Descriptor &x,
408-
int kind, int dim, const Descriptor *mask, bool back,
409-
Terminator &terminator) const {
403+
RT_API_ATTRS RT_DEVICE_NOINLINE void operator()(const char *intrinsic,
404+
Descriptor &result, const Descriptor &x, int kind, int dim,
405+
const Descriptor *mask, bool back, Terminator &terminator) const {
410406
DoPartialMaxOrMinLoc<CAT, KIND, IS_MAX, COMPARE>(
411407
intrinsic, result, x, kind, dim, mask, back, terminator);
412408
}

flang-rt/lib/runtime/findloc.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,10 @@ struct NumericFindlocHelper {
156156
// NVCC inlines more aggressively which causes too many specializations of
157157
// this function to be inlined causing compiler timeouts. Set as
158158
// noinline to allow compilation to complete.
159-
#if defined(__CUDACC__)
160-
__attribute__((noinline))
161-
#endif
162-
RT_API_ATTRS void
163-
operator()(TypeCategory targetCat, int targetKind, Descriptor &result,
164-
const Descriptor &x, const Descriptor &target, int kind, int dim,
165-
const Descriptor *mask, bool back, Terminator &terminator) const {
159+
RT_API_ATTRS RT_DEVICE_NOINLINE void operator()(TypeCategory targetCat,
160+
int targetKind, Descriptor &result, const Descriptor &x,
161+
const Descriptor &target, int kind, int dim, const Descriptor *mask,
162+
bool back, Terminator &terminator) const {
166163
switch (targetCat) {
167164
case TypeCategory::Integer:
168165
case TypeCategory::Unsigned:

0 commit comments

Comments
 (0)