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