FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
component_invert.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_COMPONENT_INVERT_HPP
8#define KERNEL_LAFEM_ARCH_COMPONENT_INVERT_HPP 1
9
10// includes, FEAT
12#include <kernel/backend.hpp>
13#include <kernel/util/half.hpp>
14
15namespace FEAT
16{
17 namespace LAFEM
18 {
19 namespace Arch
20 {
22 {
23 template<typename DT_>
24 static void value(DT_* r, const DT_* const x, const DT_ s, const Index size)
25 {
26 value_generic(r, x, s, size);
27 }
28
29#ifdef FEAT_HAVE_HALFMATH
30 static void value(Half * r, const Half * const x, const Half s, const Index size)
31 {
32 BACKEND_SKELETON_VOID(value_cuda, value_generic, value_generic, r, x, s, size)
33 }
34#endif
35
36 static void value(float * r, const float * const x, const float s, const Index size)
37 {
38 BACKEND_SKELETON_VOID(value_cuda, value_generic, value_generic, r, x, s, size)
39 }
40
41 static void value(double * r, const double * const x, const double s, const Index size)
42 {
43 BACKEND_SKELETON_VOID(value_cuda, value_generic, value_generic, r, x, s, size)
44 }
45
46 template<typename DT_>
47 static void value_generic(DT_* r, const DT_* const x, const DT_ s, const Index size);
48
49 template<typename DT_>
50 static void value_cuda(DT_* r, const DT_* const x, const DT_ s, const Index size);
51 };
52
53#ifdef FEAT_EICKT
54 extern template void ComponentInvert::value_generic(float*, const float* const, const float, const Index);
55 extern template void ComponentInvert::value_generic(double*, const double* const, const double, const Index);
56#endif
57
58 } // namespace Arch
59 } // namespace LAFEM
60} // namespace FEAT
61
62#ifndef __CUDACC__
63#include <kernel/lafem/arch/component_invert_generic.hpp>
64#endif
65#endif // KERNEL_LAFEM_ARCH_COMPONENT_INVERT_HPP
FEAT Kernel base header.
FEAT namespace.
Definition: adjactor.hpp:12
__half Half
Half data type.
Definition: half.hpp:25
@ value
specifies whether the space should supply basis function values
std::uint64_t Index
Index data type.