diff options
Diffstat (limited to 'flang-rt/lib/runtime/extrema.cpp')
-rw-r--r-- | flang-rt/lib/runtime/extrema.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/flang-rt/lib/runtime/extrema.cpp b/flang-rt/lib/runtime/extrema.cpp index 9846529..c4575cc 100644 --- a/flang-rt/lib/runtime/extrema.cpp +++ b/flang-rt/lib/runtime/extrema.cpp @@ -397,9 +397,12 @@ template <TypeCategory CAT, bool IS_MAX, template <typename, bool, bool> class COMPARE> struct DoPartialMaxOrMinLocHelper { template <int KIND> struct Functor { - RT_API_ATTRS void operator()(const char *intrinsic, Descriptor &result, - const Descriptor &x, int kind, int dim, const Descriptor *mask, - bool back, Terminator &terminator) const { + // NVCC inlines more aggressively which causes too many specializations of + // this function to be inlined causing compiler timeouts. Set as + // noinline to allow compilation to complete. + RT_API_ATTRS RT_DEVICE_NOINLINE void operator()(const char *intrinsic, + Descriptor &result, const Descriptor &x, int kind, int dim, + const Descriptor *mask, bool back, Terminator &terminator) const { DoPartialMaxOrMinLoc<CAT, KIND, IS_MAX, COMPARE>( intrinsic, result, x, kind, dim, mask, back, terminator); } |