From 649cb77d052addc43dc865e3addbc1cc993387d8 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 20 Nov 2018 23:03:45 +0100 Subject: [PATCH] Document CUDA::Handle better --- include/deal.II/base/cuda.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/include/deal.II/base/cuda.h b/include/deal.II/base/cuda.h index ad74e99284..0e6eafbb7b 100644 --- a/include/deal.II/base/cuda.h +++ b/include/deal.II/base/cuda.h @@ -36,13 +36,14 @@ namespace Utilities namespace CUDA { /** - * This structure creates, stores, and destroys the handles of the different - * CUDA libraries used inside deal.II. + * Various CUDA APIs need an object to store internal data. This structure + * creates, initializes, stores, and destroys these so-called handles for + * the respective CUDA libraries used inside deal.II. */ struct Handle { /** - * Constructor. Create the handles for the different libraries. + * Constructor. Initialize the handles for the different libraries. */ Handle(); @@ -52,17 +53,25 @@ namespace Utilities Handle(Handle const &) = delete; /** - * Destructor. Destroy the handles and free all the memory allocated by - * GrowingVectorMemory. + * Destructor. Destroy the handles. */ ~Handle(); + /** + * Pointer to an opaque cuSolverDN context. + * The handle must be passed to every cuSolverDN library function. + */ cusolverDnHandle_t cusolver_dn_handle; + /** + * Pointer to an opaque cuSolverSP context. + * The handle must be passed to every cuSolverSP library function. + */ cusolverSpHandle_t cusolver_sp_handle; /** - * Handle to the cuSPARSE library. + * Pointer to an opaque cuSPARSE context. + * The handle must be passed to every cuSPARSE library function. */ cusparseHandle_t cusparse_handle; }; -- 2.39.5