*/
/*
- * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2008 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
{
if (filename.empty()) {
// fill filename with unique random word
- const char* filename_pattern = "GiNaCXXXXXX";
+ const char* filename_pattern = "./GiNaCXXXXXX";
char* new_filename = new char[strlen(filename_pattern)+1];
strcpy(new_filename, filename_pattern);
if (!mktemp(new_filename)) {
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));
}
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;