|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78806 - in sandbox/big_number/libs/multiprecision: doc doc/html doc/html/boost_multiprecision doc/html/boost_multiprecision/indexes performance
From: john_at_[hidden]
Date: 2012-06-04 11:25:23
Author: johnmaddock
Date: 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
New Revision: 78806
URL: http://svn.boost.org/trac/boost/changeset/78806
Log:
Documentation update - address Marc Glisse's comments on the overview section.
Text files modified:
sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html | 4 ++--
sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html | 4 ++--
sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html | 4 ++--
sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html | 4 ++--
sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html | 37 ++++++++++++++++++++++++++-----------
sandbox/big_number/libs/multiprecision/doc/html/index.html | 2 +-
sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk | 20 +++++++++++++++-----
sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp | 11 +++++++++--
8 files changed, 59 insertions(+), 27 deletions(-)
Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -13,9 +13,9 @@
<div class="spirit-nav">
<a accesskey="p" href="../indexes.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s02.html"><img src="../../images/next.png" alt="Next"></a>
</div>
-<div class="section id904139">
+<div class="section id930933">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id904139"></a>Function Index</h3></div></div></div>
+<a name="id930933"></a>Function Index</h3></div></div></div>
<p><a class="link" href="s01.html#idx_id_0">A</a> <a class="link" href="s01.html#idx_id_1">B</a> <a class="link" href="s01.html#idx_id_2">C</a> <a class="link" href="s01.html#idx_id_3">D</a> <a class="link" href="s01.html#idx_id_4">E</a> <a class="link" href="s01.html#idx_id_5">F</a> <a class="link" href="s01.html#idx_id_7">I</a> <a class="link" href="s01.html#idx_id_8">L</a> <a class="link" href="s01.html#idx_id_9">M</a> <a class="link" href="s01.html#idx_id_12">P</a> <a class="link" href="s01.html#idx_id_13">R</a> <a class="link" href="s01.html#idx_id_14">S</a> <a class="link" href="s01.html#idx_id_15">T</a> <a class="link" href="s01.html#idx_id_16">Z</a></p>
<div class="variablelist"><dl>
<dt>
Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -13,9 +13,9 @@
<div class="spirit-nav">
<a accesskey="p" href="s01.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../images/next.png" alt="Next"></a>
</div>
-<div class="section id905111">
+<div class="section id931905">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id905111"></a>Class Index</h3></div></div></div>
+<a name="id931905"></a>Class Index</h3></div></div></div>
<p><a class="link" href="s02.html#idx_id_19">C</a> <a class="link" href="s02.html#idx_id_23">G</a> <a class="link" href="s02.html#idx_id_26">M</a> <a class="link" href="s02.html#idx_id_27">N</a> <a class="link" href="s02.html#idx_id_32">T</a></p>
<div class="variablelist"><dl>
<dt>
Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -13,9 +13,9 @@
<div class="spirit-nav">
<a accesskey="p" href="s02.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../images/next.png" alt="Next"></a>
</div>
-<div class="section id905344">
+<div class="section id932138">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id905344"></a>Typedef Index</h3></div></div></div>
+<a name="id932138"></a>Typedef Index</h3></div></div></div>
<p><a class="link" href="s03.html#idx_id_36">C</a> <a class="link" href="s03.html#idx_id_41">I</a> <a class="link" href="s03.html#idx_id_42">L</a> <a class="link" href="s03.html#idx_id_43">M</a> <a class="link" href="s03.html#idx_id_49">T</a></p>
<div class="variablelist"><dl>
<dt>
Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -12,9 +12,9 @@
<div class="spirit-nav">
<a accesskey="p" href="s03.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
</div>
-<div class="section id908786">
+<div class="section id935985">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id908786"></a>Index</h3></div></div></div>
+<a name="id935985"></a>Index</h3></div></div></div>
<p><a class="link" href="s04.html#idx_id_51">A</a> <a class="link" href="s04.html#idx_id_52">B</a> <a class="link" href="s04.html#idx_id_53">C</a> <a class="link" href="s04.html#idx_id_54">D</a> <a class="link" href="s04.html#idx_id_55">E</a> <a class="link" href="s04.html#idx_id_56">F</a> <a class="link" href="s04.html#idx_id_57">G</a> <a class="link" href="s04.html#idx_id_58">I</a> <a class="link" href="s04.html#idx_id_59">L</a> <a class="link" href="s04.html#idx_id_60">M</a> <a class="link" href="s04.html#idx_id_61">N</a> <a class="link" href="s04.html#idx_id_62">O</a> <a class="link" href="s04.html#idx_id_63">P</a> <a class="link" href="s04.html#idx_id_64">R</a> <a class="link" href="s04.html#idx_id_65">S</a> <a class="link" href="s04.html#idx_id_66">T</a> <a class="link" href="s04.html#idx_id_67">Z</a></p>
<div class="variablelist"><dl>
<dt>
Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -132,16 +132,19 @@
<p>
If type <code class="computeroutput"><span class="identifier">T</span></code> is an <code class="computeroutput"><span class="identifier">mp_number</span></code>, then this expression is evaluated
<span class="emphasis"><em>without creating a single temporary value</em></span>. In contrast,
- if we were using the C++ wrapper that ships with GMP
- - mpfr_class
- - then this expression would result in no less than 11 temporaries (this is
- true even though mpfr_class
- does use expression templates to reduce the number of temporaries somewhat).
- Had we used an even simpler wrapper around GMP
- or MPFR like <code class="computeroutput"><span class="identifier">mpclass</span></code>
- things would have been even worse and no less that 24 temporaries are created
- for this simple expression (note - we actually measure the number of memory
- allocations performed rather than the number of temporaries directly).
+ if we were using the mpfr_class
+ C++ wrapper for MPFR - then this expression
+ would result in no less than 11 temporaries (this is true even though mpfr_class does
+ use expression templates to reduce the number of temporaries somewhat). Had
+ we used an even simpler wrapper around MPFR
+ like mpreal things
+ would have been even worse and no less that 24 temporaries are created for
+ this simple expression (note - we actually measure the number of memory allocations
+ performed rather than the number of temporaries directly, note also that the
+ mpf_class
+ wrapper that will be supplied with GMP-5.1 reduces the number of temporaries
+ to pretty much zero). Finally if we use this library with expression templates
+ disabled, we still only generate 11 temporaries <sup>[<a name="boost_multiprecision.intro.f0" href="#ftn.boost_multiprecision.intro.f0" class="footnote">1</a>]</sup> <sup>[<a name="boost_multiprecision.intro.f1" href="#ftn.boost_multiprecision.intro.f1" class="footnote">2</a>]</sup>.
</p>
<p>
This library also extends expression template support to standard library functions
@@ -504,7 +507,19 @@
</tbody>
</table></div>
</div>
-<br class="table-break">
+<br class="table-break"><div class="footnotes">
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.boost_multiprecision.intro.f0" href="#boost_multiprecision.intro.f0" class="para">1</a>] </sup>
+ The actual number generated will depend on the compiler, how well it optimises
+ the code, and whether it supports rvalue references. The number of 11 temporaries
+ was generated with Visual C++ 10
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.boost_multiprecision.intro.f1" href="#boost_multiprecision.intro.f1" class="para">2</a>] </sup>
+ Marc Glisse suggested pre-review that this could be reduced still further
+ by careful use of rvalue-references and move semantics in the operator overloads.
+ This will be investigated further at a later date.
+ </p></div>
+</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: sandbox/big_number/libs/multiprecision/doc/html/index.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/index.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/index.html 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -117,7 +117,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: May 09, 2012 at 18:07:25 GMT</small></p></td>
+<td align="left"><p><small>Last revised: June 04, 2012 at 15:17:54 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk (original)
+++ sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -29,7 +29,7 @@
[template mpfr[] [@http://www.mpfr.org MPFR]]
[template gmp[] [@http://gmplib.org GMP]]
-[template mpf_class[] [@http://gmplib.org/manual/C_002b_002b-Interface-Floats.html#C_002b_002b-Interface-Floats mpfr_class]]
+[template mpf_class[] [@http://gmplib.org/manual/C_002b_002b-Interface-Floats.html#C_002b_002b-Interface-Floats mpf_class]]
[template mpfr_class[] [@http://math.berkeley.edu/~wilken/code/gmpfrxx/ mpfr_class]]
[template mpreal[] [@http://www.holoborodko.com/pavel/mpfr/ mpreal]]
[template mpir[] [@http://mpir.org/ MPIR]]
@@ -133,11 +133,17 @@
y = (((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0];
If type `T` is an `mp_number`, then this expression is evaluated ['without creating a single temporary value]. In contrast,
-if we were using the C++ wrapper that ships with [gmp] - [mpf_class] - then this expression would result in no less than 11
-temporaries (this is true even though [mpf_class] does use expression templates to reduce the number of temporaries somewhat). Had
-we used an even simpler wrapper around [gmp] or [mpfr] like `mpclass` things would have been even worse and no less that 24 temporaries
+if we were using the [mpfr_class] C++ wrapper for [mpfr] - then this expression would result in no less than 11
+temporaries (this is true even though [mpfr_class] does use expression templates to reduce the number of temporaries somewhat). Had
+we used an even simpler wrapper around [mpfr] like [mpreal] things would have been even worse and no less that 24 temporaries
are created for this simple expression (note - we actually measure the number of memory allocations performed rather than
-the number of temporaries directly).
+the number of temporaries directly, note also that the [mpf_class] wrapper that will be supplied with GMP-5.1 reduces the number of
+temporaries to pretty much zero). Finally if we use this library with expression templates disabled, we still only generate 11
+temporaries
+[footnote The actual number generated will depend on the compiler, how well it optimises the code, and whether it supports
+rvalue references. The number of 11 temporaries was generated with Visual C++ 10]
+[footnote Marc Glisse suggested pre-review that this could be reduced still further by careful use of rvalue-references
+and move semantics in the operator overloads. This will be investigated further at a later date.].
This library also extends expression template support to standard library functions like `abs` or `sin` with `mp_number`
arguments. This means that an expression such as:
@@ -982,6 +988,8 @@
};
// Non member operators:
+ ``['unmentionable-expression-template-type]`` operator+(const ``['see-below]``&);
+ ``['unmentionable-expression-template-type]`` operator-(const ``['see-below]``&);
``['unmentionable-expression-template-type]`` operator+(const ``['see-below]``&, const ``['see-below]``&);
``['unmentionable-expression-template-type]`` operator-(const ``['see-below]``&, const ``['see-below]``&);
``['unmentionable-expression-template-type]`` operator*(const ``['see-below]``&, const ``['see-below]``&);
@@ -1218,6 +1226,8 @@
[h4 Non-member operators]
// Non member operators:
+ ``['unmentionable-expression-template-type]`` operator+(const ``['see-below]``&);
+ ``['unmentionable-expression-template-type]`` operator-(const ``['see-below]``&);
``['unmentionable-expression-template-type]`` operator+(const ``['see-below]``&, const ``['see-below]``&);
``['unmentionable-expression-template-type]`` operator-(const ``['see-below]``&, const ``['see-below]``&);
``['unmentionable-expression-template-type]`` operator*(const ``['see-below]``&, const ``['see-below]``&);
Modified: sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp (original)
+++ sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp 2012-06-04 11:25:22 EDT (Mon, 04 Jun 2012)
@@ -228,6 +228,7 @@
std::cout << "Allocation Counts for Horner Evaluation:\n";
#ifdef TEST_MPFR
basic_allocation_test("mpfr_float_50", mpfr_float_50(2));
+ basic_allocation_test("mpfr_float_50 - no expression templates", mp_number<mpfr_float_backend<50>, false>(2));
#endif
#ifdef TEST_MPFR_CLASS
basic_allocation_test("mpfr_class", mpfr_class(2));
@@ -239,6 +240,7 @@
std::cout << "Allocation Counts for boost::math::tools::evaluate_polynomial:\n";
#ifdef TEST_MPFR
poly_allocation_test("mpfr_float_50", mpfr_float_50(2));
+ poly_allocation_test("mpfr_float_50 - no expression templates", mp_number<mpfr_float_backend<50>, false>(2));
#endif
#ifdef TEST_MPFR_CLASS
poly_allocation_test("mpfr_class", mpfr_class(2));
@@ -270,7 +272,7 @@
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_bessel<mpfr_class>, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
-#ifdef TEST_MP_REAL
+#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_bessel<mpfr::mpreal>, mpfr_buildopt_tls_p() ? 3 : 1);
#endif
//
@@ -288,6 +290,7 @@
#endif
#ifdef TEST_MPF
time_proc("mpf_float_100", test_bessel<mpf_float_100>);
+ time_proc("mpf_float_100 (no expression templates", test_bessel<mp_number<gmp_float<100>, false> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_bessel<cpp_dec_float_100>);
@@ -314,6 +317,7 @@
#endif
#ifdef TEST_MPF
time_proc("mpf_float_50", test_polynomial<mpf_float_50>);
+ time_proc("mpf_float_50 (no expression templates", test_polynomial<mp_number<gmp_float<50>, false> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_polynomial<cpp_dec_float_50>);
@@ -339,6 +343,7 @@
#endif
#ifdef TEST_MPF
time_proc("mpf_float_100", test_polynomial<mpf_float_100>);
+ time_proc("mpf_float_100 (no expression templates", test_polynomial<mp_number<gmp_float<100>, false> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_polynomial<cpp_dec_float_100>);
@@ -364,6 +369,7 @@
#endif
#ifdef TEST_MPF
time_proc("mpf_float_50", test_nct<mpf_float_50>);
+ time_proc("mpf_float_50 (no expression templates", test_nct<mp_number<gmp_float<50>, false> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_nct<cpp_dec_float_50>);
@@ -371,7 +377,7 @@
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_nct<mpfr_class>);
#endif
-#ifdef TEST_MP_REAL
+#ifdef TEST_MPREAL
time_proc("mpfr::mpreal", test_nct<mpfr::mpreal>);
#endif
//
@@ -389,6 +395,7 @@
#endif
#ifdef TEST_MPF
time_proc("mpf_float_100", test_nct<mpf_float_100>);
+ time_proc("mpf_float_100 (no expression templates", test_nct<mp_number<gmp_float<100>, false> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_nct<cpp_dec_float_100>);
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