16#ifndef __CLANG_HIP_RUNTIME_WRAPPER_H__
17#define __CLANG_HIP_RUNTIME_WRAPPER_H__
21#define __host__ __attribute__((host))
22#define __device__ __attribute__((device))
23#define __global__ __attribute__((global))
24#define __shared__ __attribute__((shared))
25#define __constant__ __attribute__((constant))
26#define __managed__ __attribute__((managed))
28#define __cluster_dims__(...) __attribute__((cluster_dims(__VA_ARGS__)))
29#define __no_cluster__ __attribute__((no_cluster))
31#if !defined(__cplusplus) || __cplusplus < 201103L
52#if !defined(__HIPCC_RTC__)
53#if __has_include("hip/hip_version.h")
54#include "hip/hip_version.h"
58typedef __SIZE_TYPE__ __hip_size_t;
64#if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 405
65__device__ unsigned long long __ockl_dm_alloc(
unsigned long long __size);
66__device__ void __ockl_dm_dealloc(
unsigned long long __addr);
67#if __has_feature(address_sanitizer)
68__device__ unsigned long long __asan_malloc_impl(
unsigned long long __size,
69 unsigned long long __pc);
70__device__ void __asan_free_impl(
unsigned long long __addr,
71 unsigned long long __pc);
73 unsigned long long __pc = (
unsigned long long)__builtin_return_address(0);
74 return (
void *)__asan_malloc_impl(__size, __pc);
77 unsigned long long __pc = (
unsigned long long)__builtin_return_address(0);
78 __asan_free_impl((
unsigned long long)__ptr, __pc);
82 return (
void *) __ockl_dm_alloc(__size);
85 __ockl_dm_dealloc((
unsigned long long)__ptr);
89#if __HIP_ENABLE_DEVICE_MALLOC__
90__device__ void *__hip_malloc(__hip_size_t __size);
93 return __hip_malloc(__size);
113#if !defined(__HIPCC_RTC__)
123#if __has_include("hip/hip_version.h")
124#include "hip/hip_version.h"
127typedef __SIZE_TYPE__
size_t;
132#pragma push_macro("NULL")
133#pragma push_macro("uint32_t")
134#pragma push_macro("uint64_t")
135#pragma push_macro("CHAR_BIT")
136#pragma push_macro("INT_MAX")
137#pragma push_macro("INT_MIN")
138#define NULL (void *)0
139#define uint32_t __UINT32_TYPE__
140#define uint64_t __UINT64_TYPE__
141#define CHAR_BIT __CHAR_BIT__
142#define INT_MAX __INTMAX_MAX__
143#define INT_MIN (-__INT_MAX__ - 1)
150#if defined(__HIPCC_RTC__)
160#define __CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__ 1
161#if defined(__HIPCC_RTC__)
162#pragma pop_macro("NULL")
163#pragma pop_macro("uint32_t")
164#pragma pop_macro("uint64_t")
165#pragma pop_macro("CHAR_BIT")
166#pragma pop_macro("INT_MAX")
167#pragma pop_macro("INT_MIN")
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.