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