Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
cuda.cc
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2018 - 2022 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#include <deal.II/base/cuda.h>
19
23#include <deal.II/lac/vector_memory.templates.h>
24
26
27namespace Utilities
28{
29 namespace CUDA
30 {
32 {
33 cusolverStatus_t cusolver_error_code =
34 cusolverDnCreate(&cusolver_dn_handle);
35 AssertCusolver(cusolver_error_code);
36
37 cusolver_error_code = cusolverSpCreate(&cusolver_sp_handle);
38 AssertCusolver(cusolver_error_code);
39
40 cusparseStatus_t cusparse_error_code = cusparseCreate(&cusparse_handle);
41 AssertCusparse(cusparse_error_code);
42 }
43
44
45
47 {
48 cusolverStatus_t cusolver_error_code =
49 cusolverDnDestroy(cusolver_dn_handle);
50 AssertCusolver(cusolver_error_code);
51
52 cusolver_error_code = cusolverSpDestroy(cusolver_sp_handle);
53 AssertCusolver(cusolver_error_code);
54
55 cusparseStatus_t cusparse_error_code = cusparseDestroy(cusparse_handle);
56 AssertCusparse(cusparse_error_code);
57 }
58 } // namespace CUDA
59} // namespace Utilities
60
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
#define AssertCusparse(error_code)
#define AssertCusolver(error_code)
Default CUDA
cusolverDnHandle_t cusolver_dn_handle
Definition cuda.h:65
cusolverSpHandle_t cusolver_sp_handle
Definition cuda.h:71
cusparseHandle_t cusparse_handle
Definition cuda.h:77