GiNaC  1.8.0
excompiler.h
Go to the documentation of this file.
1 
6 /*
7  * GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 #ifndef GINAC_EXCOMPILER_H
25 #define GINAC_EXCOMPILER_H
26 
27 #include "lst.h"
28 
29 #include <string>
30 
31 namespace GiNaC {
32 
33 class ex;
34 class symbol;
35 
39 typedef double (*FUNCP_1P) (double);
40 
44 typedef double (*FUNCP_2P) (double, double);
45 
49 typedef void (*FUNCP_CUBA) (const int*, const double[], const int*, double[]);
50 
61 void compile_ex(const ex& expr, const symbol& sym, FUNCP_1P& fp, const std::string filename = "");
62 
73 void compile_ex(const ex& expr, const symbol& sym1, const symbol& sym2, FUNCP_2P& fp, const std::string filename = "");
74 
85 void compile_ex(const lst& exprs, const lst& syms, FUNCP_CUBA& fp, const std::string filename = "");
86 
95 void link_ex(const std::string filename, FUNCP_1P& fp);
96 
105 void link_ex(const std::string filename, FUNCP_2P& fp);
106 
115 void link_ex(const std::string filename, FUNCP_CUBA& fp);
116 
122 void unlink_ex(const std::string filename);
123 
124 } // namespace GiNaC
125 
126 #endif // ndef GINAC_EXCOMPILER_H
exset syms
Definition: factor.cpp:2434
Definition: add.cpp:38
void(* FUNCP_CUBA)(const int *, const double[], const int *, double[])
Function pointer for use with the CUBA library (http://www.feynarts.de/cuba).
Definition: excompiler.h:49
double(* FUNCP_2P)(double, double)
Function pointer with two function parameters.
Definition: excompiler.h:44
Definition of GiNaC&#39;s lst.
Lightweight wrapper for GiNaC&#39;s symbolic objects.
Definition: ex.h:72
Basic CAS symbol.
Definition: symbol.h:38
double(* FUNCP_1P)(double)
Function pointer with one function parameter.
Definition: excompiler.h:39
Wrapper template for making GiNaC classes out of STL containers.
Definition: container.h:73
void link_ex(const std::string filename, FUNCP_1P &fp)
Opens an existing so-file and returns a function pointer of type FUNCP_1P to the contained function...
Definition: excompiler.cpp:338
void compile_ex(const ex &expr, const symbol &sym, FUNCP_1P &fp, const std::string filename)
Takes an expression and produces a function pointer to the compiled and linked C code equivalent in d...
Definition: excompiler.cpp:323
void unlink_ex(const std::string filename)
Closes all linked .so files that have the supplied filename.
Definition: excompiler.cpp:353

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.