HIP: Heterogenous-computing Interface for Portability
Macros | Functions | Variables
hip_runtime.h File Reference

Contains definitions of APIs for HIP runtime. More...

#include <math.h>
#include <string.h>
#include <stddef.h>
#include <hip/hip_runtime_api.h>
#include <grid_launch.h>
#include <hip/hcc_detail/host_defines.h>
#include <hip/hcc_detail/math_functions.h>
#include <hip/hcc_detail/device_functions.h>

Go to the source code of this file.

Macros

#define NVCC_COMPAT
 
#define CUDA_SUCCESS   hipSuccess
 
#define ADDRESS_SPACE_1   __attribute__((address_space(1)))
 
#define ADDRESS_SPACE_3   __attribute__((address_space(3)))
 
#define hipLaunchParm   grid_launch_parm
 
#define launch_bounds_impl0(requiredMaxThreadsPerBlock)   __attribute__((amdgpu_flat_work_group_size(1, requiredMaxThreadsPerBlock)))
 
#define launch_bounds_impl1(requiredMaxThreadsPerBlock, minBlocksPerMultiprocessor)
 
#define select_impl_(_1, _2, impl_, ...)   impl_
 
#define __launch_bounds__(...)
 
#define clock_t   long long int
 
#define hipThreadIdx_x   (hc_get_workitem_id(0))
 
#define hipThreadIdx_y   (hc_get_workitem_id(1))
 
#define hipThreadIdx_z   (hc_get_workitem_id(2))
 
#define hipBlockIdx_x   (hc_get_group_id(0))
 
#define hipBlockIdx_y   (hc_get_group_id(1))
 
#define hipBlockIdx_z   (hc_get_group_id(2))
 
#define hipBlockDim_x   (hc_get_group_size(0))
 
#define hipBlockDim_y   (hc_get_group_size(1))
 
#define hipBlockDim_z   (hc_get_group_size(2))
 
#define hipGridDim_x   (hc_get_num_groups(0))
 
#define hipGridDim_y   (hc_get_num_groups(1))
 
#define hipGridDim_z   (hc_get_num_groups(2))
 
#define __syncthreads()   hc_barrier(CLK_LOCAL_MEM_FENCE)
 
#define HIP_KERNEL_NAME(...)   (__VA_ARGS__)
 
#define HIP_SYMBOL(X)   #X
 
#define HIP_DYNAMIC_SHARED(type, var)
 
#define HIP_DYNAMIC_SHARED_ATTRIBUTE
 

Functions

__device__ long long int clock64 ()
 
__device__ clock_t clock ()
 
__device__ void abort ()
 
__device__ int atomicAdd (int *address, int val)
 
__device__ unsigned int atomicAdd (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicAdd (unsigned long long int *address, unsigned long long int val)
 
__device__ float atomicAdd (float *address, float val)
 
__device__ int atomicSub (int *address, int val)
 
__device__ unsigned int atomicSub (unsigned int *address, unsigned int val)
 
__device__ int atomicExch (int *address, int val)
 
__device__ unsigned int atomicExch (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicExch (unsigned long long int *address, unsigned long long int val)
 
__device__ float atomicExch (float *address, float val)
 
__device__ int atomicMin (int *address, int val)
 
__device__ unsigned int atomicMin (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicMin (unsigned long long int *address, unsigned long long int val)
 
__device__ int atomicMax (int *address, int val)
 
__device__ unsigned int atomicMax (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicMax (unsigned long long int *address, unsigned long long int val)
 
__device__ int atomicCAS (int *address, int compare, int val)
 
__device__ unsigned int atomicCAS (unsigned int *address, unsigned int compare, unsigned int val)
 
__device__ unsigned long long int atomicCAS (unsigned long long int *address, unsigned long long int compare, unsigned long long int val)
 
__device__ int atomicAnd (int *address, int val)
 
__device__ unsigned int atomicAnd (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicAnd (unsigned long long int *address, unsigned long long int val)
 
__device__ int atomicOr (int *address, int val)
 
__device__ unsigned int atomicOr (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicOr (unsigned long long int *address, unsigned long long int val)
 
__device__ int atomicXor (int *address, int val)
 
__device__ unsigned int atomicXor (unsigned int *address, unsigned int val)
 
__device__ unsigned long long int atomicXor (unsigned long long int *address, unsigned long long int val)
 
__device__ unsigned int atomicInc (unsigned int *address, unsigned int val)
 
__device__ unsigned int atomicDec (unsigned int *address, unsigned int val)
 
__device__ int __all (int input)
 
__device__ int __any (int input)
 
__device__ unsigned long long int __ballot (int input)
 
__device__ int __shfl (int input, int lane, int width)
 
__device__ int __shfl_up (int input, unsigned int lane_delta, int width)
 
__device__ int __shfl_down (int input, unsigned int lane_delta, int width)
 
__device__ int __shfl_xor (int input, int lane_mask, int width)
 
__device__ float __shfl (float input, int lane, int width)
 
__device__ float __shfl_up (float input, unsigned int lane_delta, int width)
 
__device__ float __shfl_down (float input, unsigned int lane_delta, int width)
 
__device__ float __shfl_xor (float input, int lane_mask, int width)
 
__device__ unsigned __hip_ds_bpermute (int index, unsigned src)
 
__device__ float __hip_ds_bpermutef (int index, float src)
 
__device__ unsigned __hip_ds_permute (int index, unsigned src)
 
__device__ float __hip_ds_permutef (int index, float src)
 
__device__ unsigned __hip_ds_swizzle (unsigned int src, int pattern)
 
__device__ float __hip_ds_swizzlef (float src, int pattern)
 
__device__ int __hip_move_dpp (int src, int dpp_ctrl, int row_mask, int bank_mask, bool bound_ctrl)
 
__host__ __device__ int min (int arg1, int arg2)
 
__host__ __device__ int max (int arg1, int arg2)
 
__device__ void * __get_dynamicgroupbaseptr ()
 
 __attribute__ ((const)) __device__ void __hip_hc_threadfence() __asm("__llvm_fence_sc_dev")
 
__device__ void __threadfence_system (void)
 threadfence_system makes writes to pinned system memory visible on host CPU. More...
 
__device__ void * __hip_hc_memcpy (void *dst, const void *src, size_t size)
 
__device__ void * __hip_hc_memset (void *ptr, uint8_t val, size_t size)
 
__device__ void * __hip_hc_malloc (size_t)
 
__device__ void * __hip_hc_free (void *ptr)
 

Variables

int HIP_TRACE_API
 

Detailed Description

Contains definitions of APIs for HIP runtime.

Macro Definition Documentation

#define __launch_bounds__ (   ...)
Value:
select_impl_(\
__VA_ARGS__, launch_bounds_impl1, launch_bounds_impl0)(__VA_ARGS__)
#define HIP_DYNAMIC_SHARED (   type,
  var 
)
Value:
type* var = \
(type*)__get_dynamicgroupbaseptr(); \

extern shared

#define launch_bounds_impl1 (   requiredMaxThreadsPerBlock,
  minBlocksPerMultiprocessor 
)
Value:
__attribute__((amdgpu_flat_work_group_size(1, requiredMaxThreadsPerBlock),\
amdgpu_waves_per_eu(minBlocksPerMultiprocessor)))