FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
component_copy.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_COPY_HPP
8#define KERNEL_LAFEM_ARCH_COMPONENT_COPY_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 int stride, const int block, const Index size)
25 {
26 BACKEND_SKELETON_VOID(value_cuda, value_generic, value_generic, r, x, stride, block, size)
27 }
28
29 template <typename DT_>
30 static void value_to(const DT_ * const r, DT_ * x, const int stride, const int block, const Index size)
31 {
32 BACKEND_SKELETON_VOID(value_to_cuda, value_to_generic, value_to_generic, r, x, stride, block, size)
33 }
34
35 template <typename DT_>
36 static void value_generic(DT_ * r, const DT_ * const x, const int stride, const int block, const Index size);
37
38 template <typename DT_>
39 static void value_to_generic(const DT_ * const r, DT_ * x, const int stride, const int block, const Index size);
40
41 static void value_mkl(float * r, const float * const x, const int stride, const int block, const Index size);
42
43 static void value_mkl(double * r, const double * const x, const int stride, const int block, const Index size);
44
45 static void value_to_mkl(const float * const r, float * x, const int stride, const int block, const Index size);
46
47 static void value_to_mkl(const double * const r, double * x, const int stride, const int block, const Index size);
48
49
50 static void value_cuda(float * r, const float * const x, const int stride, const int block, const Index size);
51 static void value_to_cuda(const float * const r, float * x, const int stride, const int block, const Index size);
52
53 static void value_cuda(double * r, const double * const x, const int stride, const int block, const Index size);
54 static void value_to_cuda(const double * const r, double * x, const int stride, const int block, const Index size);
55#ifdef FEAT_HAVE_HALFMATH
56 static void value_cuda(Half * r, const Half * const x, const int stride, const int block, const Index size);
57 static void value_to_cuda(const Half * const r, Half * x, const int stride, const int block, const Index size);
58#endif
59 };
60
61#ifdef FEAT_EICKT
62 extern template void ComponentCopy::value_generic(float *, const float * const, const int, const int, const Index);
63 extern template void ComponentCopy::value_generic(double *, const double * const, const int, const int, const Index);
64 extern template void ComponentCopy::value_to_generic(const float * const, float *, const int, const int, const Index);
65 extern template void ComponentCopy::value_to_generic(const double * const, double *, const int, const int, const Index);
66#endif
67 } // namespace Arch
68 } // namespace LAFEM
69} // namespace FEAT
70
71#ifndef __CUDACC__
72#include <kernel/lafem/arch/component_copy_generic.hpp>
73#endif
74#endif // KERNEL_LAFEM_ARCH_COMPONENT_COPY_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.