|
Boost-Commit : |
From: arseny.kapoulkine_at_[hidden]
Date: 2007-08-05 15:44:46
Author: zeux
Date: 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
New Revision: 38461
URL: http://svn.boost.org/trac/boost/changeset/38461
Log:
Small FFT bug fix, tests now work even without GMP (or well, they will, once ugly #pragma hack is removed)
Text files modified:
sandbox/SOC/2007/bigint/boost/bigint/bigint_fft_multiplicator.hpp | 2 ++
sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/can_convert_to.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/comparison.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/functions.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/serialization.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/stream.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp | 9 ++++++++-
sandbox/SOC/2007/bigint/libs/bigint/test/unary.cpp | 9 ++++++++-
10 files changed, 74 insertions(+), 9 deletions(-)
Modified: sandbox/SOC/2007/bigint/boost/bigint/bigint_fft_multiplicator.hpp
==============================================================================
--- sandbox/SOC/2007/bigint/boost/bigint/bigint_fft_multiplicator.hpp (original)
+++ sandbox/SOC/2007/bigint/boost/bigint/bigint_fft_multiplicator.hpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -318,6 +318,7 @@
// fix N depending on limb_type
N = N * sizeof(limb_t) / sizeof(uint16_t);
+ if (N == 0) N = 1;
// destination size
N *= 2;
@@ -372,6 +373,7 @@
// fix N depending on limb_type
N = N * sizeof(limb_t) / sizeof(uint16_t);
+ if (N == 0) N = 1;
// destination size
N *= 2;
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -356,10 +359,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/can_convert_to.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/can_convert_to.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/can_convert_to.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -153,10 +156,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/comparison.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/comparison.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/comparison.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -299,10 +302,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/functions.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/functions.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/functions.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -137,10 +140,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/number_conversion.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -147,10 +150,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/serialization.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/serialization.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/serialization.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -14,7 +14,10 @@
#include <boost/bigint/bigint.hpp>
#include <boost/bigint/bigint_serialize.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -64,10 +67,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/stream.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/stream.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/stream.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -283,10 +286,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -117,10 +120,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/unary.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/unary.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/unary.cpp 2007-08-05 15:44:36 EDT (Sun, 05 Aug 2007)
@@ -13,7 +13,10 @@
#include <boost/bigint/bigint.hpp>
-#include <boost/bigint/bigint_gmp.hpp>
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
+# include <boost/bigint/bigint_gmp.hpp>
+#endif
+
#include <boost/bigint/bigint_default.hpp>
#include <boost/bigint/bigint_storage_vector.hpp>
#include <boost/bigint/bigint_storage_fixed.hpp>
@@ -103,10 +106,14 @@
int test_main(int argc, char* argv[])
{
+#ifdef BOOST_BIGINT_HAS_GMP_SUPPORT
test<boost::detail::bigint_gmp_implementation>();
+#endif
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_vector, 32> >();
+
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 8> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 16> >();
test<boost::detail::bigint_default_implementation<boost::detail::bigint_storage_fixed<1024>::type, 32> >();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk