Debian Codegraph @

src/aslGenerators.h

raw
1 /*
2 * Advanced Simulation Library <http://asl.org.il>
3 *
4 * Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5 *
6 *
7 * This file is part of Advanced Simulation Library (ASL).
8 *
9 * ASL is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU Affero General Public License as
11 * published by the Free Software Foundation, version 3 of the License.
12 *
13 * ASL is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with ASL. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23
24 #ifndef ASLGENERATORS_H
25 #define ASLGENERATORS_H
26
27 #include <memory>
28 //#include <acl/aclHardware.h>
29 #include "acl/aclTypes.h"
30
31 namespace cl
32 {
33 class CommandQueue;
34 }
35
36 namespace acl
37 {
38 class VectorOfElementsData;
39 class VectorOfElements;
40 typedef std::shared_ptr<cl::CommandQueue> CommandQueue;
41 }
42
43 namespace asl
44 {
45 template <typename V> class DataWithGhostNodes;
46 typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
47 typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
48 typedef DataWithGhostNodes<acl::VectorOfElements> DataWithGhostNodesACL;
49 typedef std::shared_ptr<DataWithGhostNodesACL> SPDataWithGhostNodesACL;
50 class AbstractDataWithGhostNodes;
51 typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
52 template <typename V> class DataWrapper;
53 typedef DataWrapper<acl::VectorOfElementsData> DataWrapperACLData;
54 typedef std::shared_ptr<DataWrapperACLData> SPDataWrapperACLData;
55 typedef DataWrapper<acl::VectorOfElements> DataWrapperACL;
56 typedef std::shared_ptr<DataWrapperACL> SPDataWrapperACL;
57 class Block;
58
59
60 /// generates pointer to ACL Data field with \p n components
61 /**
62 \ingroup DataFields
63 */
64 template <typename T> SPDataWrapperACLData generateDataContainerACL_SP(const Block &b,
65 unsigned int n = 1);
66
67 /// generates pointer to ACL Data field with \p n components and \p gN ghost nodes
68 /**
69 \ingroup DataFields
70 */
71 template <typename T> SPDataWithGhostNodesACLData generateDataContainerACL_SP(const Block &b,
72 unsigned int n,
73 unsigned int gN);
74
75 /// generates pointer to ACL Data field with \p n components and \p gN ghost nodes
76 /**
77 \ingroup DataFields
78 */
79 template <typename T> SPDataWithGhostNodesACLData generateDataContainerACL_SP(const Block &b,
80 unsigned int n,
81 unsigned int gN,
82 acl::CommandQueue queue);
83
84 /// generates pointer to ACL Data field with \p n components of type \p t and \p gN ghost nodes
85 /**
86 \ingroup DataFields
87 */
88 SPDataWithGhostNodesACLData generateDataContainerACL_SP(const Block &b,
89 acl::TypeID t,
90 unsigned int n,
91 unsigned int gN,
92 acl::CommandQueue queue);
93
94 /// generates pointer to ACL Data field with \p n components of type \p t and \p gN ghost nodes
95 /**
96 \ingroup DataFields
97 */
98 SPDataWithGhostNodesACLData generateDataContainerACL_SP(const Block &b,
99 acl::TypeID t,
100 unsigned int n,
101 unsigned int gN);
102
103 /// \ingroup DataFields
104 SPDataWrapperACL generateDataContainer_SP(const Block &b, const acl::VectorOfElements & a);
105
106 /// generates pointer to ACL Data field with container \p a and \p gN ghost nodes
107 /**
108 \ingroup DataFields
109 */
110 SPDataWithGhostNodesACL generateDataContainer_SP(const Block &b,
111 const acl::VectorOfElements & a,
112 unsigned int gN);
113
114
115 /// \ingroup DataFields
116 template <typename T> SPDataWithGhostNodesACL generateDataContainerConst_SP(const Block &b, T a, unsigned int gN);
117
118 /// generates data container without ghost nodes and safe outOfboundary element acces \ingroup DataFields
119 SPAbstractDataWithGhostNodes generateDCFullSafe(SPAbstractDataWithGhostNodes d);
120
121 /// generates data container without ghost nodes and safe outOfboundary element acces \ingroup DataFields
122 SPAbstractDataWithGhostNodes generateDCFullSafe(SPAbstractDataWithGhostNodes d, double outVal);
123
124
125
126
127 } //namespace acl
128
129 #endif // ASLGenerator_H