FLANG
include
flang
Runtime
complex.h
1
//===-- include/flang/Runtime/complex.h -------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
// A single way to expose C++ complex class in files that can be used
10
// in F18 runtime build. With inclusion of this file std::complex
11
// and the related names become available, though, they may correspond
12
// to alternative definitions (e.g. from cuda::std namespace).
13
14
#ifndef FORTRAN_RUNTIME_COMPLEX_H
15
#define FORTRAN_RUNTIME_COMPLEX_H
16
17
#include "flang/Common/api-attrs.h"
18
19
#if RT_USE_LIBCUDACXX
20
#include <cuda/std/complex>
21
#endif
22
23
#if RT_USE_LIBCUDACXX && defined(RT_DEVICE_COMPILATION)
24
namespace
Fortran::runtime::rtcmplx {
25
using
cuda::std::complex;
26
using
cuda::std::conj;
27
}
// namespace Fortran::runtime::rtcmplx
28
#else
// !(RT_USE_LIBCUDACXX && defined(RT_DEVICE_COMPILATION))
29
#include <complex>
30
namespace
Fortran::runtime::rtcmplx {
31
using
std::complex;
32
using
std::conj;
33
}
// namespace Fortran::runtime::rtcmplx
34
#endif
// !(RT_USE_LIBCUDACXX && defined(RT_DEVICE_COMPILATION))
35
36
#endif
// FORTRAN_RUNTIME_COMPLEX_H
Generated on
for FLANG by
1.14.0