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