Skip to content

Commit f57756a

Browse files
authored
[flang-rt] Use RT_API_ATTRS for ErfcScaled. (#129598)
As long as it is a host-only function, it cannot be referenced by the flang-rt's ErfcScaled entry points. With the markup in place, it is compiling properly by a CUDA compiler.
1 parent f44fb56 commit f57756a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flang/include/flang/Common/erfc-scaled.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
#ifndef FORTRAN_COMMON_ERFC_SCALED_H_
1010
#define FORTRAN_COMMON_ERFC_SCALED_H_
1111

12+
#include "flang/Common/api-attrs.h"
1213
#include <cmath>
1314
#include <limits>
1415

1516
namespace Fortran::common {
16-
template <typename T> inline T ErfcScaled(T arg) {
17+
template <typename T> inline RT_API_ATTRS T ErfcScaled(T arg) {
1718
// Coefficients for approximation to erfc in the first interval.
1819
static const T a[5] = {3.16112374387056560e00, 1.13864154151050156e02,
1920
3.77485237685302021e02, 3.20937758913846947e03, 1.85777706184603153e-1};

0 commit comments

Comments
 (0)