Loading [MathJax]/extensions/TeX/newcommand.js
Reference documentation for deal.II version 9.6.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\}}
Toggle main menu visibility
Main Page
Tutorial
Code gallery
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerations
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
v
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
b
c
d
e
f
g
i
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Related Symbols
:
a
b
c
d
f
g
i
l
m
n
o
p
r
s
t
u
v
Related Pages
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
v
Variables
a
c
d
e
f
g
h
i
k
l
m
n
o
p
s
t
u
v
Typedefs
Enumerations
Enumerator
m
u
Macros
a
b
d
e
f
h
i
m
p
s
t
dealii.org
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
source
base
cuda.cc
Go to the documentation of this file.
1
// ------------------------------------------------------------------------
2
//
3
// SPDX-License-Identifier: LGPL-2.1-or-later
4
// Copyright (C) 2018 - 2022 by the deal.II authors
5
//
6
// This file is part of the deal.II library.
7
//
8
// Part of the source code is dual licensed under Apache-2.0 WITH
9
// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10
// governing the source code and code contributions can be found in
11
// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12
//
13
// ------------------------------------------------------------------------
14
15
#include <
deal.II/base/cuda.h
>
16
#include <
deal.II/base/exceptions.h
>
17
#include <
deal.II/base/memory_space.h
>
18
19
#include <
deal.II/lac/cuda_vector.h
>
20
#include <
deal.II/lac/la_parallel_vector.h
>
21
#include <
deal.II/lac/vector_memory.h
>
22
#include <deal.II/lac/vector_memory.templates.h>
23
24
DEAL_II_NAMESPACE_OPEN
25
26
namespace
Utilities
27
{
28
namespace
CUDA
29
{
30
Handle::Handle
()
31
{
32
cusolverStatus_t cusolver_error_code =
33
cusolverDnCreate(&
cusolver_dn_handle
);
34
AssertCusolver
(cusolver_error_code);
35
36
cusolver_error_code = cusolverSpCreate(&
cusolver_sp_handle
);
37
AssertCusolver
(cusolver_error_code);
38
39
cusparseStatus_t cusparse_error_code = cusparseCreate(&
cusparse_handle
);
40
AssertCusparse
(cusparse_error_code);
41
}
30
Handle::Handle
() {
…
}
42
43
44
45
Handle::~Handle
()
46
{
47
cusolverStatus_t cusolver_error_code =
48
cusolverDnDestroy(
cusolver_dn_handle
);
49
AssertCusolver
(cusolver_error_code);
50
51
cusolver_error_code = cusolverSpDestroy(
cusolver_sp_handle
);
52
AssertCusolver
(cusolver_error_code);
53
54
cusparseStatus_t cusparse_error_code = cusparseDestroy(
cusparse_handle
);
55
AssertCusparse
(cusparse_error_code);
56
}
45
Handle::~Handle
() {
…
}
57
}
// namespace CUDA
58
}
// namespace Utilities
59
60
DEAL_II_NAMESPACE_CLOSE
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition
config.h:503
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition
config.h:504
cuda_vector.h
AssertCusparse
#define AssertCusparse(error_code)
Definition
exceptions.h:2235
AssertCusolver
#define AssertCusolver(error_code)
Definition
exceptions.h:2300
cuda.h
exceptions.h
vector_memory.h
la_parallel_vector.h
memory_space.h
MemorySpace::CUDA
Default CUDA
Definition
memory_space.h:52
Utilities
Definition
communication_pattern_base.h:30
Utilities::CUDA::Handle::cusolver_dn_handle
cusolverDnHandle_t cusolver_dn_handle
Definition
cuda.h:64
Utilities::CUDA::Handle::cusolver_sp_handle
cusolverSpHandle_t cusolver_sp_handle
Definition
cuda.h:70
Utilities::CUDA::Handle::Handle
Handle()
Definition
cuda.cc:30
Utilities::CUDA::Handle::~Handle
~Handle()
Definition
cuda.cc:45
Utilities::CUDA::Handle::cusparse_handle
cusparseHandle_t cusparse_handle
Definition
cuda.h:76
Generated by
1.11.0