Go to the documentation of this file.
9 #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
10 #error "This file is for GPU offloading compilation only"
13 #include_next <stdio.h>
39 #if !defined(__GLIBC__) || defined(_STDIO_H)
41 #ifndef __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
42 #define __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
44 #if __has_include(<llvm-libc-decls/stdio.h>)
46 #if defined(__HIP__) || defined(__CUDA__)
47 #define __LIBC_ATTRS __attribute__((device))
53 #pragma push_macro("stdout")
54 #pragma push_macro("stdin")
55 #pragma push_macro("stderr")
61 #pragma omp begin declare target
63 #include <llvm-libc-decls/stdio.h>
65 #pragma omp end declare target
70 #if !defined(__NVPTX__) && !defined(__AMDGPU__)
71 #pragma pop_macro("stdout")
72 #pragma pop_macro("stderr")
73 #pragma pop_macro("stdin")