1/*===- __clang_openmp_device_functions.h - OpenMP device function declares -=== 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_DEVICE_FUNCTIONS_H__ 11#define __CLANG_OPENMP_DEVICE_FUNCTIONS_H__ 12 13#ifndef _OPENMP 14#error "This file is for OpenMP compilation only." 15#endif 16 17#pragma omp begin declare variant match( \ 18 device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) 19 20#ifdef __cplusplus 21extern "C" { 22#endif 23 24#define __CUDA__ 25#define __OPENMP_NVPTX__ 26 27/// Include declarations for libdevice functions. 28#include <__clang_cuda_libdevice_declares.h> 29 30/// Provide definitions for these functions. 31#include <__clang_cuda_device_functions.h> 32 33#undef __OPENMP_NVPTX__ 34#undef __CUDA__ 35 36#ifdef __cplusplus 37} // extern "C" 38#endif 39 40#pragma omp end declare variant 41 42#endif 43