clang
20.0.0git
lib
Headers
llvm_offload_wrappers
__llvm_offload.h
Go to the documentation of this file.
1
/*===------ LLVM/Offload helpers for kernel languages (CUDA/HIP) -*- c++ -*-===
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
#include <
stddef.h
>
11
12
#define __host__ __attribute__((host))
13
#define __device__ __attribute__((device))
14
#define __global__ __attribute__((global))
15
#define __shared__ __attribute__((shared))
16
#define __constant__ __attribute__((constant))
17
#define __managed__ __attribute__((managed))
18
19
extern
"C"
{
20
21
typedef
struct
dim3
{
22
dim3
() {}
23
dim3
(
unsigned
x
) :
x
(
x
) {}
24
unsigned
x
= 0,
y
= 0,
z
= 0;
25
}
dim3
;
26
27
// TODO: For some reason the CUDA device compilation requires this declaration
28
// to be present on the device while it is only used on the host.
29
unsigned
__llvmPushCallConfiguration
(
dim3
gridDim
,
dim3
blockDim
,
30
size_t
sharedMem = 0,
void
*stream = 0);
31
}
blockDim
__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim
Definition:
__clang_cuda_builtin_vars.h:108
gridDim
__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim
Definition:
__clang_cuda_builtin_vars.h:109
__llvmPushCallConfiguration
unsigned __llvmPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem=0, void *stream=0)
stddef.h
dim3
Definition:
__llvm_offload.h:21
dim3::dim3
dim3(unsigned x)
Definition:
__llvm_offload.h:23
dim3::y
unsigned y
Definition:
__llvm_offload.h:24
dim3::z
unsigned z
Definition:
__llvm_offload.h:24
dim3::x
unsigned x
Definition:
__llvm_offload.h:24
dim3::dim3
dim3()
Definition:
__llvm_offload.h:22
Generated on Mon Nov 4 2024 05:37:09 for clang by
1.9.6