Realm
Version 25.6.1-rc.4+77e872a5
A distributed, event-based tasking library
Main Page
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
hip_cuda.h
Go to the documentation of this file.
1
/*
2
* Copyright 2025 Stanford University, NVIDIA Corporation
3
* SPDX-License-Identifier: Apache-2.0
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef HIP_CUDA_H
19
#define HIP_CUDA_H
20
21
#include <hip/hip_runtime_api.h>
22
23
// types
24
#define cudaDeviceProp hipDeviceProp_t
25
#define cudaError_t hipError_t
26
#define cudaEvent_t hipEvent_t
27
#define cudaStream_t hipStream_t
28
#define cudaSurfaceObject_t hipSurfaceObject_t
29
30
// functions
31
#define cudaDeviceReset hipDeviceReset
32
#define cudaDeviceSynchronize hipDeviceSynchronize
33
#define cudaEventCreate hipEventCreate
34
#define cudaEventDestroy hipEventDestroy
35
#define cudaEventElapsedTime hipEventElapsedTime
36
#define cudaEventRecord hipEventRecord
37
#define cudaEventSynchronize hipEventSynchronize
38
#define cudaFree hipFree
39
#define cudaFreeHost hipHostFree
// hipFreeHost is deprecated
40
#define cudaGetDevice hipGetDevice
41
#define cudaGetDeviceProperties hipGetDeviceProperties
42
#define cudaGetErrorName hipGetErrorName
43
#define cudaGetErrorString hipGetErrorString
44
#define cudaGetLastError hipGetLastError
45
#define cudaMalloc hipMalloc
46
#define cudaMallocHost hipHostMalloc
// hipMallocHost is deprecated
47
#define cudaMemAdvise hipMemAdvise
48
#define cudaMemPrefetchAsync hipMemPrefetchAsync
49
#define cudaMemcpy hipMemcpy
50
#define cudaMemset hipMemset
51
#define cudaSetDevice hipSetDevice
52
#define cudaStreamCreate hipStreamCreate
53
#define cudaStreamDestroy hipStreamDestroy
54
55
// enum values
56
#define cudaBoundaryModeClamp hipBoundaryModeClamp
57
#define cudaBoundaryModeTrap hipBoundaryModeTrap
58
#define cudaBoundaryModeZero hipBoundaryModeZero
59
#define cudaMemAdviseSetReadMostly hipMemAdviseSetReadMostly
60
#define cudaMemcpyDeviceToHost hipMemcpyDeviceToHost
61
#define cudaMemcpyHostToDevice hipMemcpyHostToDevice
62
#define cudaSuccess hipSuccess
63
64
#endif
src
hip_cuda_compat
hip_cuda.h
Generated by
1.9.8