blob: 7e7c0866426bc9ec9ffb9e41f11c1c8b6c079243 [file] [log] [blame]
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001/*===-- complex --- OpenMP complex wrapper for target regions --------- 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
10#ifndef __CLANG_OPENMP_COMPLEX_H__
11#define __CLANG_OPENMP_COMPLEX_H__
12
13#ifndef _OPENMP
14#error "This file is for OpenMP compilation only."
15#endif
16
17// We require math functions in the complex builtins below.
18#include <math.h>
19
Pirama Arumuga Nainar494f6452021-12-02 10:42:14 -080020#ifdef __NVPTX__
Pirama Arumuga Nainar986b8802021-06-03 16:00:34 -070021#define __OPENMP_NVPTX__
Sasha Smundak0fc590b2020-10-07 08:11:59 -070022#include <__clang_cuda_complex_builtins.h>
Pirama Arumuga Nainar986b8802021-06-03 16:00:34 -070023#undef __OPENMP_NVPTX__
Sasha Smundak0fc590b2020-10-07 08:11:59 -070024#endif
25
Pirama Arumuga Nainar494f6452021-12-02 10:42:14 -080026#ifdef __AMDGCN__
27#define __OPENMP_AMDGCN__
28#include <__clang_cuda_complex_builtins.h>
29#undef __OPENMP_AMDGCN__
30#endif
31
32#endif
33
Sasha Smundak0fc590b2020-10-07 08:11:59 -070034// Grab the host header too.
35#include_next <complex.h>