43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/*===- __clang_openmp_device_functions.h - OpenMP device function declares -===
|
|
*
|
|
* 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_DEVICE_FUNCTIONS_H__
|
|
#define __CLANG_OPENMP_DEVICE_FUNCTIONS_H__
|
|
|
|
#ifndef _OPENMP
|
|
#error "This file is for OpenMP compilation only."
|
|
#endif
|
|
|
|
#pragma omp begin declare variant match( \
|
|
device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)})
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define __CUDA__
|
|
#define __OPENMP_NVPTX__
|
|
|
|
/// Include declarations for libdevice functions.
|
|
#include <__clang_cuda_libdevice_declares.h>
|
|
|
|
/// Provide definitions for these functions.
|
|
#include <__clang_cuda_device_functions.h>
|
|
|
|
#undef __OPENMP_NVPTX__
|
|
#undef __CUDA__
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#pragma omp end declare variant
|
|
|
|
#endif
|