Debian Codegraph @

src/acl/DataTypes/aclVariable.cxx

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 #include "aclVariable.h"
25 #include "../aclUtilities.h"
26 #include "../aclTypesList.h"
27 #include "../aclHardware.h"
28
29 namespace acl
30 {
31
32
33 template <> unsigned int Variable<cl_int>::id(0);
34 template <> const string Variable<cl_int>::prefix("v_i");
35
36 template <> unsigned int Variable<cl_uint>::id(0);
37 template <> const string Variable<cl_uint>::prefix("v_ui");
38
39 template <> unsigned int Variable<cl_float>::id(0);
40 template <> const string Variable<cl_float>::prefix("v_f");
41
42 template <> unsigned int Variable<cl_double>::id(0);
43 template <> const string Variable<cl_double>::prefix("v_d");
44
45 template <> unsigned int Variable<cl_long>::id(0);
46 template <> const string Variable<cl_long>::prefix("v_l");
47
48 template <typename T> string Variable<T>::getTypeSignature(const KernelConfiguration & kernelConfig) const
49 {
50 return TYPE[typeID] + " " + name;
51 }
52 #define BOOST_TT_rep_expression(r, data, T) \
53 template string Variable<T>::getTypeSignature(const KernelConfiguration & kernelConfig) const;
54 BOOST_PP_SEQ_FOR_EACH(BOOST_TT_rep_expression, ~, BOOST_TT_acl_types)
55 #undef BOOST_TT_rep_expression
56
57
58 } // namespace acl