imate
C++/CUDA Reference
cudart_types.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3  * SPDX-License-Identifier: BSD-3-Clause
4  * SPDX-FileType: SOURCE
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the license found in the LICENSE.txt file in the root
8  * directory of this source tree.
9  */
10 
11 
12 #ifndef _CUDA_DYNAMIC_LOADING_CUDART_TYPES_H_
13 #define _CUDA_DYNAMIC_LOADING_CUDART_TYPES_H_
14 
15 
16 // =======
17 // Headers
18 // =======
19 
20 #include <cuda_runtime_api.h> // cudaError_t, cudaEvent_t, cudaStream_t,
21  // cudaDeviceProp, cudaMemcpyKind
22 
23 
24 // =====
25 // Types
26 // =====
27 
28 typedef cudaError_t (*cudaEventCreate_type)(cudaEvent_t* event);
29 typedef cudaError_t (*cudaEventDestroy_type)(cudaEvent_t event);
30 typedef cudaError_t (*cudaEventElapsedTime_type)(float* ms, cudaEvent_t start,
31  cudaEvent_t end);
32 typedef cudaError_t (*cudaEventRecord_type)(cudaEvent_t event,
33  cudaStream_t stream);
34 typedef cudaError_t (*cudaEventSynchronize_type)(cudaEvent_t event);
35 typedef cudaError_t (*cudaGetDevice_type)(int* device);
36 typedef cudaError_t (*cudaGetDeviceCount_type)(int* count);
37 typedef cudaError_t (*cudaGetDeviceProperties_type)(cudaDeviceProp* prop,
38  int device);
39 typedef cudaError_t (*cudaFree_type)(void* devPtr);
40 typedef cudaError_t (*cudaMalloc_type)(void** devPtr, size_t size);
41 typedef cudaError_t (*cudaMemcpy_type)(void* dst, const void* src,
42  size_t count, cudaMemcpyKind kind);
43 typedef cudaError_t (*cudaSetDevice_type)(int device);
44 typedef void** (*__cudaRegisterFatBinary_type)(void *fatCubin);
45 typedef void (*__cudaRegisterFatBinaryEnd_type)(void **fatCubinHandle);
46 typedef void (*__cudaUnregisterFatBinary_type)(void **fatCubinHandle);
47 
48 
49 #endif // _CUDA_DYNAMIC_LOADING_CUDART_TYPES_H_
void(* __cudaRegisterFatBinaryEnd_type)(void **fatCubinHandle)
Definition: cudart_types.h:45
cudaError_t(* cudaGetDeviceCount_type)(int *count)
Definition: cudart_types.h:36
cudaError_t(* cudaEventSynchronize_type)(cudaEvent_t event)
Definition: cudart_types.h:34
cudaError_t(* cudaGetDevice_type)(int *device)
Definition: cudart_types.h:35
cudaError_t(* cudaSetDevice_type)(int device)
Definition: cudart_types.h:43
cudaError_t(* cudaEventRecord_type)(cudaEvent_t event, cudaStream_t stream)
Definition: cudart_types.h:32
cudaError_t(* cudaFree_type)(void *devPtr)
Definition: cudart_types.h:39
cudaError_t(* cudaGetDeviceProperties_type)(cudaDeviceProp *prop, int device)
Definition: cudart_types.h:37
void(* __cudaUnregisterFatBinary_type)(void **fatCubinHandle)
Definition: cudart_types.h:46
cudaError_t(* cudaEventDestroy_type)(cudaEvent_t event)
Definition: cudart_types.h:29
cudaError_t(* cudaEventCreate_type)(cudaEvent_t *event)
Definition: cudart_types.h:28
cudaError_t(* cudaMemcpy_type)(void *dst, const void *src, size_t count, cudaMemcpyKind kind)
Definition: cudart_types.h:41
cudaError_t(* cudaMalloc_type)(void **devPtr, size_t size)
Definition: cudart_types.h:40
cudaError_t(* cudaEventElapsedTime_type)(float *ms, cudaEvent_t start, cudaEvent_t end)
Definition: cudart_types.h:30