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#if !defined(__cplusplus) || __cplusplus < 201103L
49#if !defined(__HIPCC_RTC__)
50#if __has_include("hip/hip_version.h")
51#include "hip/hip_version.h"
55typedef __SIZE_TYPE__ __hip_size_t;
61#if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 405
62__device__ unsigned long long __ockl_dm_alloc(
unsigned long long __size);
63__device__ void __ockl_dm_dealloc(
unsigned long long __addr);
64#if __has_feature(address_sanitizer)
65__device__ unsigned long long __asan_malloc_impl(
unsigned long long __size,
66 unsigned long long __pc);
67__device__ void __asan_free_impl(
unsigned long long __addr,
68 unsigned long long __pc);
70 unsigned long long __pc = (
unsigned long long)__builtin_return_address(0);
71 return (
void *)__asan_malloc_impl(__size, __pc);
74 unsigned long long __pc = (
unsigned long long)__builtin_return_address(0);
75 __asan_free_impl((
unsigned long long)__ptr, __pc);
79 return (
void *) __ockl_dm_alloc(__size);
82 __ockl_dm_dealloc((
unsigned long long)__ptr);
86#if __HIP_ENABLE_DEVICE_MALLOC__
87__device__ void *__hip_malloc(__hip_size_t __size);
90 return __hip_malloc(__size);
110#if !defined(__HIPCC_RTC__)
114#if __has_include("hip/hip_version.h")
115#include "hip/hip_version.h"
118typedef __SIZE_TYPE__
size_t;
123#pragma push_macro("NULL")
124#pragma push_macro("uint32_t")
125#pragma push_macro("uint64_t")
126#pragma push_macro("CHAR_BIT")
127#pragma push_macro("INT_MAX")
128#define NULL (void *)0
129#define uint32_t __UINT32_TYPE__
130#define uint64_t __UINT64_TYPE__
131#define CHAR_BIT __CHAR_BIT__
132#define INT_MAX __INTMAX_MAX__
139#if defined(__HIPCC_RTC__)
150#define __CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__ 1
151#if defined(__HIPCC_RTC__)
152#pragma pop_macro("NULL")
153#pragma pop_macro("uint32_t")
154#pragma pop_macro("uint64_t")
155#pragma pop_macro("CHAR_BIT")
156#pragma pop_macro("INT_MAX")
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.