diff --git a/src/cudamatrix/cu-device.cc b/src/cudamatrix/cu-device.cc index 6abba7fba6b..37912ea8adf 100644 --- a/src/cudamatrix/cu-device.cc +++ b/src/cudamatrix/cu-device.cc @@ -514,7 +514,6 @@ CuDevice::CuDevice(): cusparse_handle_(NULL) { } - CuDevice::~CuDevice() { if (cublas_handle_) CUBLAS_SAFE_CALL(cublasDestroy(cublas_handle_)); diff --git a/src/cudamatrix/cu-device.h b/src/cudamatrix/cu-device.h index 4967ccb5045..dc3df7e347d 100644 --- a/src/cudamatrix/cu-device.h +++ b/src/cudamatrix/cu-device.h @@ -184,10 +184,10 @@ class CuDevice { /// (i.e. from outside the class), call this only if Enabled() returns true. bool IsComputeExclusive(); - CuDevice(); - ~CuDevice(); private: + // Default constructor used to initialize this_thread_device_ + CuDevice(); CuDevice(CuDevice&); // Disallow. CuDevice &operator=(CuDevice&); // Disallow.