C++ Mathematical Expression Library (ExprTk) https://www.partow.net/programming/exprtk/index.html

This commit is contained in:
Arash Partow
2021-01-01 00:00:00 +00:00
committed by ArashPartow
parent 93a9f44f99
commit 17ba4d15e2
26 changed files with 4516 additions and 3259 deletions

View File

@ -3,7 +3,7 @@
* C++ Mathematical Expression Toolkit Library *
* *
* ExprTk vs Native Benchmarks *
* Author: Arash Partow (1999-2020) *
* Author: Arash Partow (1999-2021) *
* URL: http://www.partow.net/programming/exprtk/index.html *
* *
* Copyright notice: *
@ -150,7 +150,7 @@ template <typename T>
bool run_parse_benchmark(exprtk::symbol_table<T>& symbol_table)
{
static const std::size_t rounds = 100000;
exprtk::parser<double> parser;
exprtk::parser<double> parser;
exprtk::expression<double> expression;
expression.register_symbol_table(symbol_table);
@ -288,7 +288,7 @@ struct native
}
};
void pgo_primer();
double pgo_primer();
void perform_file_based_benchmark(const std::string& file_name, const std::size_t& rounds = 100000);
int main(int argc, char* argv[])
@ -359,7 +359,7 @@ int main(int argc, char* argv[])
return 0;
}
void pgo_primer()
double pgo_primer()
{
exprtk::pgo_primer<double>();
@ -394,6 +394,8 @@ void pgo_primer()
total += native<double>::func16(x,y);
}
}
return total;
}
std::size_t load_expression_file(const std::string& file_name, std::deque<std::string>& expression_list)
@ -431,8 +433,8 @@ void perform_file_based_benchmark(const std::string& file_name, const std::size_
}
typedef exprtk::symbol_table<double> symbol_table_t;
typedef exprtk::expression<double> expression_t;
typedef exprtk::parser<double> parser_t;
typedef exprtk::expression<double> expression_t;
typedef exprtk::parser<double> parser_t;
std::deque<expression_t> expression_list;