FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
diagonal.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7#ifndef KERNEL_LAFEM_ARCH_DIAGONAL_HPP
8#define KERNEL_LAFEM_ARCH_DIAGONAL_HPP 1
9
10// includes, FEAT
12#include <kernel/backend.hpp>
13
14
15namespace FEAT
16{
17 namespace LAFEM
18 {
19 namespace Arch
20 {
21 struct Diagonal
22 {
23 template <typename IT_>
24 static void csr(IT_ * diag, const IT_ * const col_ind, const IT_ * const row_ptr, const Index rows)
25 {
26 csr_generic(diag, col_ind, row_ptr, rows);
27 }
28
29 static void csr(std::uint64_t * diag, const std::uint64_t * const col_ind, const std::uint64_t * const row_ptr, const Index rows)
30 {
31 BACKEND_SKELETON_VOID(csr_cuda, csr_generic, csr_generic, diag, col_ind, row_ptr, rows)
32 }
33
34 static void csr(std::uint32_t * diag, const std::uint32_t * const col_ind, const std::uint32_t * const row_ptr, const Index rows)
35 {
36 BACKEND_SKELETON_VOID(csr_cuda, csr_generic, csr_generic, diag, col_ind, row_ptr, rows)
37 }
38
39 template <typename IT_>
40 static void csr_generic(IT_ * diag, const IT_ * const col_ind, const IT_ * const row_ptr, const Index rows);
41
42 template <typename IT_>
43 static void csr_cuda(IT_ * diag, const IT_ * const col_ind, const IT_ * const row_ptr, const Index rows);
44
45 };
46
47#ifdef FEAT_EICKT
48 extern template void Diagonal::csr_generic(std::uint64_t *, const std::uint64_t * const, const std::uint64_t * const, const Index);
49 extern template void Diagonal::csr_generic(std::uint32_t *, const std::uint32_t * const, const std::uint32_t * const, const Index);
50#endif
51
52 } // namespace Arch
53 } // namespace LAFEM
54} // namespace FEAT
55
56#ifndef __CUDACC__
57#include <kernel/lafem/arch/diagonal_generic.hpp>
58#endif
59#endif // KERNEL_LAFEM_ARCH_DIAGONAL_HPP
FEAT Kernel base header.
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.