# sym_compile.h

    00001 /*
    00002  *             Copyright (C) 2005 Maarten Keijzer
    00003  *
    00004  *          This program is free software; you can redistribute it and/or modify
    00005  *          it under the terms of version 2 of the GNU General Public License as
    00006  *          published by the Free Software Foundation.
    00007  *
    00008  *          This program is distributed in the hope that it will be useful,
    00009  *          but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010  *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00011  *          GNU General Public License for more details.
    00012  *
    00013  *          You should have received a copy of the GNU General Public License
    00014  *          along with this program; if not, write to the Free Software
    00015  *          Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00016  */
    00017
    00018 #ifndef SYMCOMPILE_H_
    00019 #define SYMCOMPILE_H_
    00020
    00021 #include <vector>
    00022
    00023
    00024 typedef double (*single_function)(const double []);
    00025 typedef double (*multi_function)(const double[], double[]);
    00026
    00027 /*
    00028  * Important, after every call of the functions below, the function pointers of the previous
    00029  * call are invalidated. Sorry, but that's the way the cookie crumbles (in tcc)
    00030  * */
    00031
    00032 single_function compile(Sym sym);
    00033 multi_function  compile(const std::vector<Sym>& sym);
    00034 void compile(const std::vector<Sym>& sym, std::vector<single_function>& functions);
    00035
    00036 #endif