aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Headers/openmp_wrappers/stdlib.h
blob: d607469e04f79e09c34f3b2bf37d9827ea98bec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*===---- openmp_wrapper/stdlib.h ------ OpenMP math.h intercept ----- c++ -===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef __CLANG_OPENMP_STDLIB_H__
#define __CLANG_OPENMP_STDLIB_H__

#ifndef _OPENMP
#error "This file is for OpenMP compilation only."
#endif

#include_next <stdlib.h>

#ifdef __AMDGCN__
#pragma omp begin declare variant match(device = {arch(amdgcn)})

#define __OPENMP_AMDGCN__
#include <__clang_hip_stdlib.h>
#undef __OPENMP_AMDGCN__

#pragma omp end declare variant
#endif

#endif // __CLANG_OPENMP_STDLIB_H__