xref: /freebsd-src/contrib/llvm-project/clang/lib/Headers/openmp_wrappers/stdlib.h (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
1*bdd1243dSDimitry Andric /*===---- openmp_wrapper/stdlib.h ------ OpenMP math.h intercept ----- c++ -===
2*bdd1243dSDimitry Andric  *
3*bdd1243dSDimitry Andric  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*bdd1243dSDimitry Andric  * See https://llvm.org/LICENSE.txt for license information.
5*bdd1243dSDimitry Andric  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*bdd1243dSDimitry Andric  *
7*bdd1243dSDimitry Andric  *===-----------------------------------------------------------------------===
8*bdd1243dSDimitry Andric  */
9*bdd1243dSDimitry Andric 
10*bdd1243dSDimitry Andric #ifndef __CLANG_OPENMP_STDLIB_H__
11*bdd1243dSDimitry Andric #define __CLANG_OPENMP_STDLIB_H__
12*bdd1243dSDimitry Andric 
13*bdd1243dSDimitry Andric #ifndef _OPENMP
14*bdd1243dSDimitry Andric #error "This file is for OpenMP compilation only."
15*bdd1243dSDimitry Andric #endif
16*bdd1243dSDimitry Andric 
17*bdd1243dSDimitry Andric #include_next <stdlib.h>
18*bdd1243dSDimitry Andric 
19*bdd1243dSDimitry Andric #ifdef __AMDGCN__
20*bdd1243dSDimitry Andric #pragma omp begin declare variant match(device = {arch(amdgcn)})
21*bdd1243dSDimitry Andric 
22*bdd1243dSDimitry Andric #define __OPENMP_AMDGCN__
23*bdd1243dSDimitry Andric #include <__clang_hip_stdlib.h>
24*bdd1243dSDimitry Andric #undef __OPENMP_AMDGCN__
25*bdd1243dSDimitry Andric 
26*bdd1243dSDimitry Andric #pragma omp end declare variant
27*bdd1243dSDimitry Andric #endif
28*bdd1243dSDimitry Andric 
29*bdd1243dSDimitry Andric #endif // __CLANG_OPENMP_STDLIB_H__
30