MicroModelicaCCompiler
4.5.3
built_in_functions.cpp
Go to the documentation of this file.
1
/*****************************************************************************
2
3
This file is part of QSS Solver.
4
5
QSS Solver is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
QSS Solver is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with QSS Solver. If not, see <http://www.gnu.org/licenses/>.
17
18
******************************************************************************/
19
20
#include <sstream>
21
22
#include "
built_in_functions.hpp
"
23
24
#include <
util/error.hpp
>
25
26
namespace
MicroModelica
{
27
using namespace
Util;
28
namespace
IR {
29
30
BuiltInFunction::BuiltInFunction
() : _functions()
31
{
32
SymbolTable
s;
33
_functions.
insert
(
"reinit"
, CompiledFunction(
"reinit"
,
""
,
""
, s,
""
));
34
_functions.insert(
"terminate"
, CompiledFunction(
"terminate"
,
""
,
""
, s,
""
));
35
_functions.insert(
"abs"
, CompiledFunction(
"abs"
,
""
,
""
, s,
""
));
36
_functions.insert(
"sign"
, CompiledFunction(
"sign"
,
""
,
""
, s,
""
));
37
_functions.insert(
"sqrt"
, CompiledFunction(
"sqrt"
,
""
,
""
, s,
""
));
38
_functions.insert(
"ceil"
, CompiledFunction(
"ceil"
,
""
,
""
, s,
""
));
39
_functions.insert(
"floor"
, CompiledFunction(
"floor"
,
""
,
""
, s,
""
));
40
_functions.insert(
"sin"
, CompiledFunction(
"sin"
,
""
,
""
, s,
""
));
41
_functions.insert(
"cos"
, CompiledFunction(
"cos"
,
""
,
""
, s,
""
));
42
_functions.insert(
"tan"
, CompiledFunction(
"tan"
,
""
,
""
, s,
""
));
43
_functions.insert(
"asin"
, CompiledFunction(
"asin"
,
""
,
""
, s,
""
));
44
_functions.insert(
"acos"
, CompiledFunction(
"acos"
,
""
,
""
, s,
""
));
45
_functions.insert(
"atan"
, CompiledFunction(
"atan"
,
""
,
""
, s,
""
));
46
_functions.insert(
"atan2"
, CompiledFunction(
"atan2"
,
""
,
""
, s,
""
));
47
_functions.insert(
"sinh"
,
CompiledFunction
(
"sinh"
,
""
,
""
, s,
""
));
48
_functions.insert(
"cosh"
,
CompiledFunction
(
"cosh"
,
""
,
""
, s,
""
));
49
_functions.insert(
"tanh"
,
CompiledFunction
(
"tanh"
,
""
,
""
, s,
""
));
50
_functions.insert(
"exp"
,
CompiledFunction
(
"exp"
,
""
,
""
, s,
""
));
51
_functions.insert(
"log"
,
CompiledFunction
(
"log"
,
""
,
""
, s,
""
));
52
_functions.insert(
"log10"
,
CompiledFunction
(
"log10"
,
""
,
""
, s,
""
));
53
_functions.insert(
"pre"
,
CompiledFunction
(
"pre"
,
""
,
""
, s,
""
));
54
_functions.insert(
"GQLink_GetB"
,
CompiledFunction
(
"GQLink_GetB"
,
""
,
""
, s,
""
));
55
_functions.insert(
"GQLink_GetBx"
,
CompiledFunction
(
"GKLink_GetBx"
,
""
,
""
, s,
""
));
56
_functions.insert(
"GQLink_GetBy"
,
CompiledFunction
(
"GKLink_GetBy"
,
""
,
""
, s,
""
));
57
_functions.insert(
"GQLink_GetBz"
,
CompiledFunction
(
"GKLink_GetBz"
,
""
,
""
, s,
""
));
58
}
59
60
}
// namespace IR
61
}
// namespace MicroModelica
MicroModelica::IR::CompiledFunction
Definition:
helpers.hpp:87
MicroModelica::Util::SymbolTable
ModelTable< std::string, std::string > SymbolTable
Definition:
equation.hpp:62
MicroModelica
Definition:
files.cpp:45
built_in_functions.hpp
ModelTable::insert
void insert(Key k, Value v)
Definition:
table.hpp:48
MicroModelica::IR::BuiltInFunction::BuiltInFunction
BuiltInFunction()
Definition:
built_in_functions.cpp:47
error.hpp
ir
built_in_functions.cpp
Generated on Fri Feb 21 2025 11:43:43 for MicroModelicaCCompiler by
1.8.17