mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-01-19 04:22:11 +00:00
performance: split up miller_rabin_performance, move some files around.
[CI SKIP]
This commit is contained in:
@@ -44,7 +44,7 @@ else
|
||||
TOMMATH = tommath ;
|
||||
}
|
||||
|
||||
exe performance_test : performance_test.cpp /boost/system//boost_system [ GLOB performance_test : *.cpp ]
|
||||
exe performance_test : performance_test.cpp /boost/system//boost_system [ GLOB performance_test_files : *.cpp ]
|
||||
: release
|
||||
[ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <define>TEST_MPQ <source>gmp : ]
|
||||
[ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
|
||||
@@ -55,11 +55,11 @@ exe performance_test : performance_test.cpp /boost/system//boost_system [ GLOB p
|
||||
<define>TEST_CPP_INT_RATIONAL
|
||||
;
|
||||
|
||||
exe miller_rabin_performance : miller_rabin_performance.cpp /boost/system//boost_system /boost/chrono//boost_chrono
|
||||
exe miller_rabin_performance : miller_rabin_performance.cpp [ GLOB miller_rabin_performance_files : *.cpp ] /boost/system//boost_system /boost/chrono//boost_chrono
|
||||
: 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 : ]
|
||||
#[ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
|
||||
[ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
|
||||
<define>TEST_CPP_DEC_FLOAT
|
||||
<define>TEST_CPP_INT
|
||||
;
|
||||
|
||||
@@ -3,47 +3,7 @@
|
||||
// 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;
|
||||
};
|
||||
#include "miller_rabin_performance.hpp"
|
||||
|
||||
unsigned allocation_count = 0;
|
||||
|
||||
@@ -90,37 +50,6 @@ boost::chrono::duration<double> test_miller_rabin_gmp()
|
||||
std::map<std::string, double> results;
|
||||
double min_time = (std::numeric_limits<double>::max)();
|
||||
|
||||
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 generate_quickbook()
|
||||
{
|
||||
std::cout << "[table\n[[Integer Type][Relative Performance (Actual time in parenthesis)]]\n";
|
||||
@@ -139,26 +68,18 @@ void generate_quickbook()
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace boost::multiprecision;
|
||||
#ifdef TEST_CPP_INT
|
||||
test_miller_rabin<number<cpp_int_backend<>, et_off> >("cpp_int (no Expression templates)");
|
||||
test_miller_rabin<cpp_int>("cpp_int");
|
||||
test_miller_rabin<number<cpp_int_backend<128> > >("cpp_int (128-bit cache)");
|
||||
test_miller_rabin<number<cpp_int_backend<256> > >("cpp_int (256-bit cache)");
|
||||
test_miller_rabin<number<cpp_int_backend<512> > >("cpp_int (512-bit cache)");
|
||||
test_miller_rabin<number<cpp_int_backend<1024> > >("cpp_int (1024-bit cache)");
|
||||
test_miller_rabin<int1024_t>("int1024_t");
|
||||
test_miller_rabin<checked_int1024_t>("checked_int1024_t");
|
||||
#endif
|
||||
#ifdef TEST_MPZ
|
||||
test_miller_rabin<number<gmp_int, et_off> >("mpz_int (no Expression templates)");
|
||||
test_miller_rabin<mpz_int>("mpz_int");
|
||||
std::cout << "Time for mpz_int (native Miller Rabin Test) = " << test_miller_rabin_gmp() << std::endl;
|
||||
#endif
|
||||
#ifdef TEST_TOMMATH
|
||||
test_miller_rabin<number<boost::multiprecision::tommath_int, et_off> >("tom_int (no Expression templates)");
|
||||
test_miller_rabin<boost::multiprecision::tom_int>("tom_int");
|
||||
#endif
|
||||
test01();
|
||||
test02();
|
||||
test03();
|
||||
test04();
|
||||
test05();
|
||||
test06();
|
||||
test07();
|
||||
test08();
|
||||
test09();
|
||||
test10();
|
||||
test11();
|
||||
test12();
|
||||
|
||||
generate_quickbook();
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user