Loading include/dca/linalg/util/cuda_stream.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -33,10 +33,10 @@ public: CudaStream(const CudaStream& other) = delete; CudaStream& operator=(const CudaStream& other) = delete; CudaStream(CudaStream&& other) { CudaStream(CudaStream&& other) noexcept { swap(other); } CudaStream& operator=(CudaStream&& other) { CudaStream& operator=(CudaStream&& other) noexcept { swap(other); return *this; } Loading @@ -54,7 +54,7 @@ public: return stream_; } void swap(CudaStream& other) { void swap(CudaStream& other) noexcept { std::swap(stream_, other.stream_); } Loading include/dca/linalg/util/magma_queue.hpp +10 −10 Original line number Diff line number Diff line Loading @@ -39,12 +39,13 @@ public: MagmaQueue(const MagmaQueue& rhs) = delete; MagmaQueue& operator=(const MagmaQueue& rhs) = delete; MagmaQueue(MagmaQueue&& rhs) { swap(rhs); MagmaQueue(MagmaQueue&& rhs) noexcept : CudaStream(std::move(rhs)) { swapMembers(rhs); } MagmaQueue& operator=(MagmaQueue&& rhs) { swap(rhs); MagmaQueue& operator=(MagmaQueue&& rhs) noexcept { CudaStream::operator=(std::move(rhs)); swapMembers(rhs); return *this; } Loading @@ -58,14 +59,13 @@ public: return queue_; } void swap(MagmaQueue& other) { static_cast<CudaStream&>(*this).swap(static_cast<CudaStream&>(other)); std::swap(cublas_handle_, other.cublas_handle_); std::swap(cusparse_handle_, other.cusparse_handle_); std::swap(queue_, other.queue_); private: void swapMembers(MagmaQueue& rhs) noexcept { std::swap(cublas_handle_, rhs.cublas_handle_); std::swap(cusparse_handle_, rhs.cusparse_handle_); std::swap(queue_, rhs.queue_); } private: magma_queue_t queue_ = nullptr; cublasHandle_t cublas_handle_ = nullptr; cusparseHandle_t cusparse_handle_ = nullptr; Loading Loading
include/dca/linalg/util/cuda_stream.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -33,10 +33,10 @@ public: CudaStream(const CudaStream& other) = delete; CudaStream& operator=(const CudaStream& other) = delete; CudaStream(CudaStream&& other) { CudaStream(CudaStream&& other) noexcept { swap(other); } CudaStream& operator=(CudaStream&& other) { CudaStream& operator=(CudaStream&& other) noexcept { swap(other); return *this; } Loading @@ -54,7 +54,7 @@ public: return stream_; } void swap(CudaStream& other) { void swap(CudaStream& other) noexcept { std::swap(stream_, other.stream_); } Loading
include/dca/linalg/util/magma_queue.hpp +10 −10 Original line number Diff line number Diff line Loading @@ -39,12 +39,13 @@ public: MagmaQueue(const MagmaQueue& rhs) = delete; MagmaQueue& operator=(const MagmaQueue& rhs) = delete; MagmaQueue(MagmaQueue&& rhs) { swap(rhs); MagmaQueue(MagmaQueue&& rhs) noexcept : CudaStream(std::move(rhs)) { swapMembers(rhs); } MagmaQueue& operator=(MagmaQueue&& rhs) { swap(rhs); MagmaQueue& operator=(MagmaQueue&& rhs) noexcept { CudaStream::operator=(std::move(rhs)); swapMembers(rhs); return *this; } Loading @@ -58,14 +59,13 @@ public: return queue_; } void swap(MagmaQueue& other) { static_cast<CudaStream&>(*this).swap(static_cast<CudaStream&>(other)); std::swap(cublas_handle_, other.cublas_handle_); std::swap(cusparse_handle_, other.cusparse_handle_); std::swap(queue_, other.queue_); private: void swapMembers(MagmaQueue& rhs) noexcept { std::swap(cublas_handle_, rhs.cublas_handle_); std::swap(cusparse_handle_, rhs.cusparse_handle_); std::swap(queue_, rhs.queue_); } private: magma_queue_t queue_ = nullptr; cublasHandle_t cublas_handle_ = nullptr; cusparseHandle_t cusparse_handle_ = nullptr; Loading