diff options
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_api.h | 4 | ||||
| -rw-r--r-- | libcuda/cuda_api_object.h | 8 | ||||
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 9 |
3 files changed, 8 insertions, 13 deletions
diff --git a/libcuda/cuda_api.h b/libcuda/cuda_api.h index 5a970ba..52f36eb 100644 --- a/libcuda/cuda_api.h +++ b/libcuda/cuda_api.h @@ -2607,12 +2607,12 @@ typedef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st { /** * Device that represents the CPU */ -#define CU_DEVICE_CPU ((CUdevice)-1) +#define CU_DEVICE_CPU ((CUdevice) - 1) /** * Device that represents an invalid device */ -#define CU_DEVICE_INVALID ((CUdevice)-2) +#define CU_DEVICE_INVALID ((CUdevice) - 2) /** @} */ /* END CUDA_TYPES */ diff --git a/libcuda/cuda_api_object.h b/libcuda/cuda_api_object.h index e620e57..3e34641 100644 --- a/libcuda/cuda_api_object.h +++ b/libcuda/cuda_api_object.h @@ -35,9 +35,7 @@ struct _cuda_device_id { m_next = NULL; m_gpgpu = gpu; } - struct _cuda_device_id *next() { - return m_next; - } + struct _cuda_device_id *next() { return m_next; } unsigned num_shader() const { return m_gpgpu->get_config().num_shader(); } int num_devices() const { if (m_next == NULL) @@ -158,9 +156,7 @@ class kernel_config { void set_grid_dim(dim3 *d) { m_GridDim = *d; } void set_block_dim(dim3 *d) { m_BlockDim = *d; } gpgpu_ptx_sim_arg_list_t get_args() { return m_args; } - struct CUstream_st *get_stream() { - return m_stream; - } + struct CUstream_st *get_stream() { return m_stream; } private: dim3 m_GridDim; diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 3574fc1..502b941 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -3046,8 +3046,7 @@ __host__ cudaError_t CUDARTAPI cudaEventSynchronize(cudaEvent_t event) { printf("GPGPU-Sim API: cudaEventSynchronize ** waiting for event\n"); fflush(stdout); CUevent_st *e = (CUevent_st *)event; - while (!e->done()) - ; + while (!e->done()); printf("GPGPU-Sim API: cudaEventSynchronize ** event detected\n"); fflush(stdout); return g_last_cudaError = cudaSuccess; @@ -3171,7 +3170,7 @@ __host__ cudaError_t CUDARTAPI cudaGetExportTable( * * *******************************************************************************/ -//#include "../../cuobjdump_to_ptxplus/cuobjdump_parser.h" +// #include "../../cuobjdump_to_ptxplus/cuobjdump_parser.h" // extracts all ptx files from binary and dumps into // prog_name.unique_no.sm_<>.ptx files @@ -4068,9 +4067,9 @@ __host__ cudaError_t CUDARTAPI cudaDeviceSetLimit(enum cudaLimit limit, return g_last_cudaError = cudaSuccess; } -//#if CUDART_VERSION >= 9000 +// #if CUDART_VERSION >= 9000 //__host__ cudaError_t cudaFuncSetAttribute ( const void* func, enum -// cudaFuncAttribute attr, int value ) { +// cudaFuncAttribute attr, int value ) { // ignore this Attribute for now, and the default is that carveout = // cudaSharedmemCarveoutDefault; // (-1) |
