• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Thread Safety</title>
5<link rel="stylesheet" href="../../math.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Math Toolkit 2.12.0">
8<link rel="up" href="../double_exponential.html" title="Double-exponential quadrature">
9<link rel="prev" href="de_levels.html" title="Setting the Maximum Interval Halvings and Memory Requirements">
10<link rel="next" href="de_caveats.html" title="Caveats">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="de_levels.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../double_exponential.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="de_caveats.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="math_toolkit.double_exponential.de_thread"></a><a class="link" href="de_thread.html" title="Thread Safety">Thread Safety</a>
28</h3></div></div></div>
29<p>
30        All three of the double-exponential integrators are thread safe as long as
31        BOOST_MATH_NO_ATOMIC_INT is not set. Since the integrators store a large
32        amount of fairly hard to compute data, it is recommended that these objects
33        are stored and reused as much as possible.
34      </p>
35<p>
36        Internally all three of the double-exponential integrators use the same caching
37        strategy: they allocate all the vectors needed to store the maximum permitted
38        levels, but only populate the first few levels when constructed. This means
39        a minimal amount of memory is actually allocated when the integrator is first
40        constructed, and already populated levels can be accessed via a lockfree
41        atomic read, and only populating new levels requires a thread lock.
42      </p>
43<p>
44        In addition, the three built in types (plus <code class="computeroutput"><span class="identifier">__float128</span></code>
45        when available), have the first 7 levels pre-computed: this is generally
46        sufficient for the vast majority of integrals - even at quad precision -
47        and means that integrators for these types are relatively cheap to construct.
48      </p>
49</div>
50<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
51<td align="left"></td>
52<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar
53      Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
54      Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
55      Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
56      Daryle Walker and Xiaogang Zhang<p>
57        Distributed under the Boost Software License, Version 1.0. (See accompanying
58        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
59      </p>
60</div></td>
61</tr></table>
62<hr>
63<div class="spirit-nav">
64<a accesskey="p" href="de_levels.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../double_exponential.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="de_caveats.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
65</div>
66</body>
67</html>
68