Skip to content

Commit

Permalink
core: Remove unused CUDA global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Jan 15, 2021
1 parent 11d9489 commit fe8ddaa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions src/core/cuda_common_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,10 @@ pinned_vector<float> particle_torques_host;
/**cuda streams for parallel computing on cpu and gpu */
cudaStream_t stream[1];

cudaError_t _err;
cudaError_t CU_err;

void _cuda_check_errors(const dim3 &block, const dim3 &grid,
const char *function, const char *file,
unsigned int line) {
CU_err = cudaGetLastError();
cudaError_t CU_err = cudaGetLastError();
if (CU_err != cudaSuccess) {
fprintf(stderr,
"%d: error \"%s\" calling %s with dim %d %d %d, grid %d %d "
Expand Down
3 changes: 0 additions & 3 deletions src/core/cuda_init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,5 @@ std::vector<EspressoGpuDevice> cuda_gather_gpus();
*/
void cuda_get_device_props(int dev, EspressoGpuDevice &d);

/** Current error message of CUDA. */
extern const char *cuda_error;

#endif // ifdef CUDA
#endif
2 changes: 0 additions & 2 deletions src/core/cuda_init_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ static const int computeCapabilityMinMajor = 3;
static const int computeCapabilityMinMinor = 0;
/**@}*/

const char *cuda_error;

void cuda_init() {
cudaError_t error = cudaStreamCreate(&stream[0]);
if (error != cudaSuccess) {
Expand Down

0 comments on commit fe8ddaa

Please sign in to comment.