performance: continue improving the tests and splitting up into smaller chunks.

[CI SKIP]
This commit is contained in:
jzmaddock
2019-12-09 19:25:38 +00:00
parent ee02c4ef86
commit eadcbd4d4d
126 changed files with 1819 additions and 198 deletions
+4 -6
View File
@@ -65,17 +65,15 @@ exe miller_rabin_performance : miller_rabin_performance.cpp [ GLOB miller_rabin_
;
exe sf_performance : sf_performance.cpp sf_performance_basic.cpp sf_performance_bessel.cpp
sf_performance_bessel1.cpp sf_performance_bessel2.cpp sf_performance_bessel3.cpp
sf_performance_bessel4.cpp sf_performance_bessel5.cpp sf_performance_bessel6.cpp
sf_performance_nct.cpp sf_performance_nct1.cpp
sf_performance_nct2.cpp sf_performance_nct3.cpp sf_performance_nct4.cpp
sf_performance_nct5.cpp sf_performance_nct6.cpp
sf_performance_poly.cpp
sf_performance_nct.cpp sf_performance_poly.cpp
[ GLOB sf_performance_files : *.cpp ]
/boost/system//boost_system /boost/chrono//boost_chrono /boost/thread//boost_thread
: release
[ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <source>gmp : ]
[ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
<define>TEST_CPP_DEC_FLOAT
<define>TEST_CPP_BIN_FLOAT
<define>TEST_FLOAT
<toolset>msvc:<cxxflags>-bigobj
;
+102
View File
@@ -0,0 +1,102 @@
///////////////////////////////////////////////////////////////
// Copyright 2012 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#define BOOST_CHRONO_HEADER_ONLY
#if !defined(TEST_MPZ) && !defined(TEST_TOMMATH) && !defined(TEST_CPP_INT)
#define TEST_MPZ
#define TEST_TOMMATH
#define TEST_CPP_INT
#endif
#ifdef TEST_MPZ
#include <boost/multiprecision/gmp.hpp>
#endif
#ifdef TEST_TOMMATH
#include <boost/multiprecision/tommath.hpp>
#endif
#ifdef TEST_CPP_INT
#include <boost/multiprecision/cpp_int.hpp>
#endif
#include <boost/multiprecision/miller_rabin.hpp>
#include <boost/chrono.hpp>
#include <map>
template <class Clock>
struct stopwatch
{
typedef typename Clock::duration duration;
stopwatch()
{
m_start = Clock::now();
}
duration elapsed()
{
return Clock::now() - m_start;
}
void reset()
{
m_start = Clock::now();
}
private:
typename Clock::time_point m_start;
};
extern unsigned allocation_count;
extern std::map<std::string, double> results;
extern double min_time;
template <class IntType>
boost::chrono::duration<double> test_miller_rabin(const char* name)
{
using namespace boost::random;
stopwatch<boost::chrono::high_resolution_clock> c;
independent_bits_engine<mt11213b, 256, IntType> gen;
//
// We must use a different generator for the tests and number generation, otherwise
// we get false positives.
//
mt19937 gen2;
unsigned result_count = 0;
for (unsigned i = 0; i < 1000; ++i)
{
IntType n = gen();
if (boost::multiprecision::miller_rabin_test(n, 25, gen2))
++result_count;
}
boost::chrono::duration<double> t = c.elapsed();
double d = t.count();
if (d < min_time)
min_time = d;
results[name] = d;
std::cout << "Time for " << std::setw(30) << std::left << name << " = " << d << std::endl;
std::cout << "Number of primes found = " << result_count << std::endl;
return t;
}
void test01();
void test02();
void test03();
void test04();
void test05();
void test06();
void test07();
void test08();
void test09();
void test10();
void test11();
void test12();
void test13();
void test14();
void test15();
void test16();
void test17();
void test18();
void test19();
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test01()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<number<cpp_int_backend<>, et_off> >("cpp_int (no Expression templates)");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test02()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<cpp_int>("cpp_int");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test03()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<number<cpp_int_backend<128> > >("cpp_int (128-bit cache)");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test04()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<number<cpp_int_backend<256> > >("cpp_int (256-bit cache)");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test05()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<number<cpp_int_backend<512> > >("cpp_int (512-bit cache)");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test06()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<number<cpp_int_backend<1024> > >("cpp_int (1024-bit cache)");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test07()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<uint1024_t>("uint1024_t");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test08()
{
using namespace boost::multiprecision;
#ifdef TEST_CPP_INT
test_miller_rabin<checked_uint1024_t>("checked_uint1024_t");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test09()
{
using namespace boost::multiprecision;
#ifdef TEST_MPZ
test_miller_rabin<number<gmp_int, et_off> >("mpz_int (no Expression templates)");
#endif
}
@@ -0,0 +1,15 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test10()
{
using namespace boost::multiprecision;
#ifdef TEST_MPZ
test_miller_rabin<mpz_int>("mpz_int");
std::cout << "Time for mpz_int (native Miller Rabin Test) = " << test_miller_rabin_gmp() << std::endl;
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test11()
{
using namespace boost::multiprecision;
#ifdef TEST_TOMMATH
test_miller_rabin<number<boost::multiprecision::tommath_int, et_off> >("tom_int (no Expression templates)");
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../miller_rabin_performance.hpp"
void test12()
{
using namespace boost::multiprecision;
#ifdef TEST_TOMMATH
test_miller_rabin<boost::multiprecision::tom_int>("tom_int");
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
void test01()
{
#ifdef TEST_INT64
test<boost::uint64_t>("boost::uint64_t", 64);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPF)
#include <boost/multiprecision/gmp.hpp>
#endif
void test02()
{
#ifdef TEST_MPF
test<boost::multiprecision::mpf_float_50>("gmp_float", 50);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPF)
#include <boost/multiprecision/gmp.hpp>
#endif
void test03()
{
#ifdef TEST_MPF
test<boost::multiprecision::mpf_float_100>("gmp_float", 100);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPF)
#include <boost/multiprecision/gmp.hpp>
#endif
void test04()
{
#ifdef TEST_MPF
test<boost::multiprecision::mpf_float_500>("gmp_float", 500);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPZ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test05()
{
#ifdef TEST_MPZ
test<boost::multiprecision::mpz_int>("gmp_int", 128);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPZ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test06()
{
#ifdef TEST_MPZ
test<boost::multiprecision::mpz_int>("gmp_int", 256);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPZ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test07()
{
#ifdef TEST_MPZ
test<boost::multiprecision::mpz_int>("gmp_int", 512);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPZ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test08()
{
#ifdef TEST_MPZ
test<boost::multiprecision::mpz_int>("gmp_int", 1024);
#endif
}
@@ -0,0 +1,18 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test09()
{
#ifdef TEST_CPP_INT
//test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<64, 64, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off> >("cpp_int(unsigned, fixed)", 64);
//test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<64, 64, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off> >("cpp_int(fixed)", 64);
test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<128, 128, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off> >("cpp_int(fixed)", 128);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test10()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off> >("cpp_int(fixed)", 256);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test11()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off> >("cpp_int(fixed)", 512);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test12()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<1024, 1024, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off> >("cpp_int(fixed)", 1024);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test13()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::cpp_int>("cpp_int", 128);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test14()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::cpp_int>("cpp_int", 256);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test15()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::cpp_int>("cpp_int", 512);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test16()
{
#ifdef TEST_CPP_INT
test<boost::multiprecision::cpp_int>("cpp_int", 1024);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT_RATIONAL)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test17()
{
#ifdef TEST_CPP_INT_RATIONAL
test<boost::multiprecision::cpp_rational>("cpp_rational", 128);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT_RATIONAL)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test18()
{
#ifdef TEST_CPP_INT_RATIONAL
test<boost::multiprecision::cpp_rational>("cpp_rational", 256);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT_RATIONAL)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test19()
{
#ifdef TEST_CPP_INT_RATIONAL
test<boost::multiprecision::cpp_rational>("cpp_rational", 512);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_INT_RATIONAL)
#include <boost/multiprecision/cpp_int.hpp>
#endif
void test20()
{
#ifdef TEST_CPP_INT_RATIONAL
test<boost::multiprecision::cpp_rational>("cpp_rational", 1024);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPQ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test21()
{
#ifdef TEST_MPQ
test<boost::multiprecision::mpq_rational>("mpq_rational", 128);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPQ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test22()
{
#ifdef TEST_MPQ
test<boost::multiprecision::mpq_rational>("mpq_rational", 256);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPQ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test23()
{
#ifdef TEST_MPQ
test<boost::multiprecision::mpq_rational>("mpq_rational", 512);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPQ)
#include <boost/multiprecision/gmp.hpp>
#endif
void test24()
{
#ifdef TEST_MPQ
test<boost::multiprecision::mpq_rational>("mpq_rational", 1024);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_TOMMATH)
#include <boost/multiprecision/tommath.hpp>
#endif
void test25()
{
#ifdef TEST_TOMMATH
test<boost::multiprecision::tom_int>("tommath_int", 128);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_TOMMATH)
#include <boost/multiprecision/tommath.hpp>
#endif
void test26()
{
#ifdef TEST_TOMMATH
test<boost::multiprecision::tom_int>("tommath_int", 256);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_TOMMATH)
#include <boost/multiprecision/tommath.hpp>
#endif
void test27()
{
#ifdef TEST_TOMMATH
test<boost::multiprecision::tom_int>("tommath_int", 512);
#endif
}
@@ -0,0 +1,25 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_TOMMATH)
#include <boost/multiprecision/tommath.hpp>
#endif
void test28()
{
#ifdef TEST_TOMMATH
test<boost::multiprecision::tom_int>("tommath_int", 1024);
/*
//
// These are actually too slow to test!!!
//
test<boost::multiprecision::tom_rational>("tom_rational", 128);
test<boost::multiprecision::tom_rational>("tom_rational", 256);
test<boost::multiprecision::tom_rational>("tom_rational", 512);
test<boost::multiprecision::tom_rational>("tom_rational", 1024);
*/
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_DEC_FLOAT)
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
void test29()
{
#ifdef TEST_CPP_DEC_FLOAT
test<boost::multiprecision::cpp_dec_float_50>("cpp_dec_float", 50);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_DEC_FLOAT)
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
void test30()
{
#ifdef TEST_CPP_DEC_FLOAT
test<boost::multiprecision::cpp_dec_float_100>("cpp_dec_float", 100);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_DEC_FLOAT)
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
void test31()
{
#ifdef TEST_CPP_DEC_FLOAT
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<500> > >("cpp_dec_float", 500);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_BIN_FLOAT)
#include <boost/multiprecision/cpp_bin_float.hpp>
#endif
void test32()
{
#ifdef TEST_CPP_BIN_FLOAT
test<boost::multiprecision::cpp_bin_float_50>("cpp_bin_float", 50);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_BIN_FLOAT)
#include <boost/multiprecision/cpp_bin_float.hpp>
#endif
void test33()
{
#ifdef TEST_CPP_BIN_FLOAT
test<boost::multiprecision::cpp_bin_float_100>("cpp_bin_float", 100);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_CPP_BIN_FLOAT)
#include <boost/multiprecision/cpp_bin_float.hpp>
#endif
void test34()
{
#ifdef TEST_CPP_BIN_FLOAT
test<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<500> > >("cpp_bin_float", 500);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPFR)
#include <boost/multiprecision/mpfr.hpp>
#endif
void test35()
{
#ifdef TEST_MPFR
test<boost::multiprecision::mpfr_float_50>("mpfr_float", 50);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPFR)
#include <boost/multiprecision/mpfr.hpp>
#endif
void test36()
{
#ifdef TEST_MPFR
test<boost::multiprecision::mpfr_float_50>("mpfr_float", 50);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPFR)
#include <boost/multiprecision/mpfr.hpp>
#endif
void test37()
{
#ifdef TEST_MPFR
test<boost::multiprecision::mpfr_float_100>("mpfr_float", 100);
#endif
}
@@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////
// Copyright 2019 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../performance_test.hpp"
#if defined(TEST_MPFR)
#include <boost/multiprecision/mpfr.hpp>
#endif
void test38()
{
#ifdef TEST_MPFR
test<boost::multiprecision::mpfr_float_500>("mpfr_float", 500);
#endif
}
+9 -1
View File
@@ -37,7 +37,15 @@ int main()
mp_set_memory_functions(&alloc_func, &realloc_func, &free_func);
#endif
basic_tests();
basic_tests_1();
basic_tests_2();
basic_tests_3();
basic_tests_4();
basic_tests_5();
basic_tests_6();
basic_tests_7();
basic_tests_8();
basic_tests_9();
bessel_tests();
poly_tests();
nct_tests();
+18 -3
View File
@@ -16,6 +16,14 @@
#define TEST_FLOAT
#endif
#if defined(TEST_MPFR) && !defined(TEST_MPFR_CLASS)
#if defined(__has_include)
#if __has_include(<gmpfrxx.h>)
# define TEST_MPFR_CLASS
#endif
#endif
#endif
#ifdef TEST_FLOAT
#include "arithmetic_backend.hpp"
#endif
@@ -36,7 +44,6 @@
#endif
#ifdef TEST_CPP_BIN_FLOAT
#include <boost/multiprecision/cpp_bin_float.hpp>
#include <boost/multiprecision/mpfr.hpp>
#endif
#include <boost/math/special_functions/bessel.hpp>
#include <boost/math/tools/rational.hpp>
@@ -198,7 +205,7 @@ void time_proc(const char* name, Real (*proc)(), unsigned threads = 1)
g.create_thread(proc);
g.join_all();
time = c.elapsed();
std::cout << "Time for " << name << " (" << (thread_count + 1) << " threads) = " << time << std::endl;
std::cout << "Time for " << name << " (" << (thread_count + 1) << " theads) = " << time << std::endl;
std::cout << "Total allocations for " << name << " = " << allocation_count << std::endl;
}
}
@@ -210,7 +217,15 @@ void time_proc(const char* name, Real (*proc)(), unsigned threads = 1)
using namespace boost::multiprecision;
void basic_tests();
void basic_tests_1();
void basic_tests_2();
void basic_tests_3();
void basic_tests_4();
void basic_tests_5();
void basic_tests_6();
void basic_tests_7();
void basic_tests_8();
void basic_tests_9();
void bessel_tests();
void poly_tests();
void nct_tests();
+38 -12
View File
@@ -5,12 +5,25 @@
#include "sf_performance.hpp"
void bessel_tests_1();
void bessel_tests_2();
void bessel_tests_3();
void bessel_tests_4();
void bessel_tests_5();
void bessel_tests_6();
void bessel_tests_01();
void bessel_tests_02();
void bessel_tests_03();
void bessel_tests_04();
void bessel_tests_05();
void bessel_tests_06();
void bessel_tests_07();
void bessel_tests_08();
void bessel_tests_09();
void bessel_tests_10();
void bessel_tests_11();
void bessel_tests_12();
void bessel_tests_13();
void bessel_tests_14();
void bessel_tests_15();
void bessel_tests_16();
void bessel_tests_17();
void bessel_tests_18();
void bessel_tests_19();
void bessel_tests()
{
@@ -25,9 +38,16 @@ void bessel_tests()
mpfr::mpreal::set_default_prec(50 * 1000L / 301L);
#endif
bessel_tests_1();
bessel_tests_2();
bessel_tests_3();
bessel_tests_01();
bessel_tests_02();
bessel_tests_03();
bessel_tests_04();
bessel_tests_05();
bessel_tests_06();
bessel_tests_07();
bessel_tests_08();
bessel_tests_09();
bessel_tests_10();
//
// Then 100 digits:
@@ -36,7 +56,13 @@ void bessel_tests()
#if defined(TEST_MPFR) || defined(TEST_MPFR_CLASS)
mpfr_set_default_prec(100 * 1000L / 301L);
#endif
bessel_tests_4();
bessel_tests_5();
bessel_tests_6();
bessel_tests_11();
bessel_tests_12();
bessel_tests_13();
bessel_tests_14();
bessel_tests_15();
bessel_tests_16();
bessel_tests_17();
bessel_tests_18();
bessel_tests_19();
}
-23
View File
@@ -1,23 +0,0 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
void bessel_tests_1()
{
#ifdef TEST_MPFR
#if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0)
time_proc("mpfr_float_50", test_bessel<boost::multiprecision::mpfr_float_50>, 1);
time_proc("mpfr_float_50 (no expression templates)", test_bessel<number<mpfr_float_backend<50>, et_off> >, 1);
time_proc("static_mpfr_float_50", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_on> >, 1);
time_proc("static_mpfr_float_50 (no expression templates)", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_off> >, 1);
#else
time_proc("mpfr_float_50", test_bessel<boost::multiprecision::mpfr_float_50>, mpfr_buildopt_tls_p() ? 3 : 1);
time_proc("mpfr_float_50 (no expression templates", test_bessel<number<mpfr_float_backend<50>, et_off> >, mpfr_buildopt_tls_p() ? 3 : 1);
time_proc("static_mpfr_float_50", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_on> >, mpfr_buildopt_tls_p() ? 3 : 1);
time_proc("static_mpfr_float_50 (no expression templates)", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_off> >, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
#endif
}
@@ -0,0 +1,15 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_1()
{
std::cout << "Allocation Counts for Horner Evaluation:\n";
#ifdef TEST_MPFR
basic_allocation_test("mpfr_float_50", mpfr_float_50(2));
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_2()
{
#ifdef TEST_MPFR
basic_allocation_test("mpfr_float_50 - no expression templates", number<mpfr_float_backend<50>, et_off>(2));
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_3()
{
#ifdef TEST_MPFR_CLASS
basic_allocation_test("mpfr_class", mpfr_class(2));
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_4()
{
#ifdef TEST_MPREAL
basic_allocation_test("mpfr::mpreal", mpfr::mpreal(2));
#endif
}
@@ -0,0 +1,14 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_5()
{
std::cout << "Allocation Counts for boost::math::tools::evaluate_polynomial:\n";
#ifdef TEST_MPFR
poly_allocation_test("mpfr_float_50", mpfr_float_50(2));
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_6()
{
#ifdef TEST_MPFR
poly_allocation_test("mpfr_float_50 - no expression templates", number<mpfr_float_backend<50>, et_off>(2));
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_7()
{
#ifdef TEST_MPFR_CLASS
poly_allocation_test("mpfr_class", mpfr_class(2));
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_8()
{
#ifdef TEST_MPREAL
poly_allocation_test("mpfr::mpreal", mpfr::mpreal(2));
#endif
}
@@ -0,0 +1,21 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void basic_tests_9()
{
#ifdef TEST_FLOAT
time_proc("Bessel Functions - double", test_bessel<double>);
time_proc("Bessel Functions - real_concept", test_bessel<boost::math::concepts::real_concept>);
time_proc("Bessel Functions - arithmetic_backend<double>", test_bessel<number<arithmetic_backend<double>, et_on> >);
time_proc("Bessel Functions - arithmetic_backend<double> - no expression templates", test_bessel<number<arithmetic_backend<double>, et_off> >);
time_proc("Non-central T - double", test_nct<double>);
time_proc("Non-central T - real_concept", test_nct<boost::math::concepts::real_concept>);
time_proc("Non-central T - arithmetic_backend<double>", test_nct<number<arithmetic_backend<double>, et_on> >);
time_proc("Non-central T - arithmetic_backend<double> - no expression templates", test_nct<number<arithmetic_backend<double>, et_off> >);
#endif
}
@@ -0,0 +1,17 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_01()
{
#ifdef TEST_MPFR
#if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0)
time_proc("mpfr_float_50", test_bessel<boost::multiprecision::mpfr_float_50>, 1);
#else
time_proc("mpfr_float_50", test_bessel<boost::multiprecision::mpfr_float_50>, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
#endif
}
@@ -0,0 +1,17 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_02()
{
#ifdef TEST_MPFR
#if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0)
time_proc("mpfr_float_50 (no expression templates)", test_bessel<number<mpfr_float_backend<50>, et_off> >, 1);
#else
time_proc("mpfr_float_50 (no expression templates", test_bessel<number<mpfr_float_backend<50>, et_off> >, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
#endif
}
@@ -0,0 +1,17 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_03()
{
#ifdef TEST_MPFR
#if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0)
time_proc("static_mpfr_float_50", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_on> >, 1);
#else
time_proc("static_mpfr_float_50", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_on> >, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
#endif
}
@@ -0,0 +1,17 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_04()
{
#ifdef TEST_MPFR
#if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0)
time_proc("static_mpfr_float_50 (no expression templates)", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_off> >, 1);
#else
time_proc("static_mpfr_float_50 (no expression templates)", test_bessel<number<mpfr_float_backend<50, allocate_stack>, et_off> >, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_05()
{
#ifdef TEST_MPF
time_proc("mpf_float_50", test_bessel<mpf_float_50>, 3);
#endif
}
@@ -3,18 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void bessel_tests_2()
void bessel_tests_06()
{
#ifdef TEST_MPF
time_proc("mpf_float_50", test_bessel<mpf_float_50>, 3);
time_proc("mpf_float_50 (no expression templates", test_bessel<number<gmp_float<50>, et_off> >, 3);
#endif
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_bessel<cpp_dec_float_50>, 3);
#endif
#ifdef TEST_CPP_BIN_FLOAT
time_proc("cpp_bin_float_50", test_bessel<cpp_bin_float_50>, 3);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_07()
{
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_bessel<cpp_dec_float_50>, 3);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_08()
{
#ifdef TEST_CPP_BIN_FLOAT
time_proc("cpp_bin_float_50", test_bessel<cpp_bin_float_50>, 3);
#endif
}
@@ -3,14 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void bessel_tests_3()
void bessel_tests_09()
{
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_bessel<mpfr_class>, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_bessel<mpfr::mpreal>, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_10()
{
#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_bessel<mpfr::mpreal>, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_11()
{
#ifdef TEST_MPFR
time_proc("mpfr_float_100", test_bessel<mpfr_float_100>);
#endif
}
@@ -3,13 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void bessel_tests_4()
void bessel_tests_12()
{
#ifdef TEST_MPFR
time_proc("mpfr_float_100", test_bessel<mpfr_float_100>);
time_proc("mpfr_float_100 (no expression templates", test_bessel<number<mpfr_float_backend<100>, et_off> >);
time_proc("static_mpfr_float_100", test_bessel<static_mpfr_float_100>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_13()
{
#ifdef TEST_MPFR
time_proc("static_mpfr_float_100", test_bessel<static_mpfr_float_100>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_14()
{
#ifdef TEST_MPF
time_proc("mpf_float_100", test_bessel<mpf_float_100>);
#endif
}
@@ -3,15 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void bessel_tests_5()
void bessel_tests_15()
{
#ifdef TEST_MPREAL
mpfr::mpreal::set_default_prec(100 * 1000L / 301L);
#endif
#ifdef TEST_MPF
time_proc("mpf_float_100", test_bessel<mpf_float_100>);
time_proc("mpf_float_100 (no expression templates", test_bessel<number<gmp_float<100>, et_off> >);
#endif
}
@@ -3,20 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void bessel_tests_6()
void bessel_tests_16()
{
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_bessel<cpp_dec_float_100>);
#endif
#ifdef TEST_CPP_BIN_FLOAT
time_proc("cpp_bin_float_100", test_bessel<cpp_bin_float_100>);
#endif
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_bessel<mpfr_class>);
#endif
#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_bessel<mpfr::mpreal>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_17()
{
#ifdef TEST_CPP_BIN_FLOAT
time_proc("cpp_bin_float_100", test_bessel<cpp_bin_float_100>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_18()
{
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_bessel<mpfr_class>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void bessel_tests_19()
{
#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_bessel<mpfr::mpreal>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_01()
{
#ifdef TEST_MPFR
time_proc("mpfr_float_50", test_nct<mpfr_float_50>);
#endif
}
@@ -3,13 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void nct_tests_1()
void nct_tests_02()
{
#ifdef TEST_MPFR
time_proc("mpfr_float_50", test_nct<mpfr_float_50>);
time_proc("mpfr_float_50 (no expression templates", test_nct<number<mpfr_float_backend<50>, et_off> >);
time_proc("static_mpfr_float_50", test_nct<static_mpfr_float_50>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_03()
{
#ifdef TEST_MPFR
time_proc("static_mpfr_float_50", test_nct<static_mpfr_float_50>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_04()
{
#ifdef TEST_MPF
time_proc("mpf_float_50", test_nct<mpf_float_50>);
#endif
}
@@ -3,12 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void nct_tests_2()
void nct_tests_05()
{
#ifdef TEST_MPF
time_proc("mpf_float_50", test_nct<mpf_float_50>);
time_proc("mpf_float_50 (no expression templates", test_nct<number<gmp_float<50>, et_off> >);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_06()
{
#ifdef TEST_MPREAL
mpfr::mpreal::set_default_prec(50 * 1000L / 301L);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_07()
{
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_nct<cpp_dec_float_50>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_08()
{
#ifdef TEST_CPP_BIN_FLOAT
time_proc("cpp_bin_float_50", test_nct<cpp_bin_float_50>, 3);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_09()
{
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_nct<mpfr_class>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_10()
{
#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_nct<mpfr::mpreal>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_11()
{
#ifdef TEST_MPFR
time_proc("mpfr_float_100", test_nct<mpfr_float_100>);
#endif
}
@@ -3,13 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void nct_tests_4()
void nct_tests_12()
{
#ifdef TEST_MPFR
time_proc("mpfr_float_100", test_nct<mpfr_float_100>);
time_proc("mpfr_float_100 (no expression templates", test_nct<number<mpfr_float_backend<100>, et_off> >);
time_proc("static_mpfr_float_100", test_nct<static_mpfr_float_100>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_13()
{
#ifdef TEST_MPFR
time_proc("static_mpfr_float_100", test_nct<static_mpfr_float_100>);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_14()
{
#ifdef TEST_MPF
time_proc("mpf_float_100", test_nct<mpf_float_100>);
#endif
}
@@ -3,12 +3,11 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "sf_performance.hpp"
#include "../sf_performance.hpp"
void nct_tests_5()
void nct_tests_15()
{
#ifdef TEST_MPF
time_proc("mpf_float_100", test_nct<mpf_float_100>);
time_proc("mpf_float_100 (no expression templates", test_nct<number<gmp_float<100>, et_off> >);
#endif
}
@@ -0,0 +1,13 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include "../sf_performance.hpp"
void nct_tests_16()
{
#ifdef TEST_MPREAL
mpfr::mpreal::set_default_prec(100 * 1000L / 301L);
#endif
}

Some files were not shown because too many files have changed in this diff Show More