]> www.ginac.de Git - ginac.git/blobdiff - ginac/excompiler.cpp
Prettified source code.
[ginac.git] / ginac / excompiler.cpp
index a148f38f4cf2d68dcf13474084b747f6deb7922e..fc04d5d4414ddcbdcbb3801fc68723665c873af2 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
 
 #include "excompiler.h"
 
-#include <stdexcept>
-#include <ios>
-#include <fstream>
-#include <sstream>
-#include <string>
-#include <vector>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#ifdef HAVE_LIBDL
-#include <dlfcn.h>
-#endif // def HAVE_LIBDL
-
 #include "ex.h"
 #include "lst.h"
 #include "operators.h"
 #include "relational.h"
 #include "symbol.h"
 
+#ifdef HAVE_LIBDL
+#include <dlfcn.h>
+#endif // def HAVE_LIBDL
+#include <fstream>
+#include <ios>
+#include <sstream>
+#include <stdexcept>
+#include <string>
+#include <vector>
+
 namespace GiNaC {
 
 #ifdef HAVE_LIBDL
@@ -246,14 +245,14 @@ void compile_ex(const ex& expr, const symbol& sym1, const symbol& sym2, FUNCP_2P
 void compile_ex(const lst& exprs, const lst& syms, FUNCP_CUBA& fp, const std::string filename)
 {
        lst replacements;
-       for (int count=0; count<syms.nops(); ++count) {
+       for (std::size_t count=0; count<syms.nops(); ++count) {
                std::ostringstream s;
                s << "a[" << count << "]";
                replacements.append(syms.op(count) == symbol(s.str()));
        }
 
        std::vector<ex> expr_with_cname;
-       for (int count=0; count<exprs.nops(); ++count) {
+       for (std::size_t count=0; count<exprs.nops(); ++count) {
                expr_with_cname.push_back(exprs.op(count).subs(replacements));
        }
 
@@ -263,7 +262,7 @@ void compile_ex(const lst& exprs, const lst& syms, FUNCP_CUBA& fp, const std::st
 
        ofs << "void compiled_ex(const int* an, const double a[], const int* fn, double f[])" << std::endl;
        ofs << "{" << std::endl;
-       for (int count=0; count<exprs.nops(); ++count) {
+       for (std::size_t count=0; count<exprs.nops(); ++count) {
                ofs << "f[" << count << "] = ";
                expr_with_cname[count].print(GiNaC::print_csrc_double(ofs));
                ofs << ";" << std::endl;