1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Configuration Macros</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="../overview.html" title="Chapter 1. Overview"> 9<link rel="prev" href="compilers_overview.html" title="Compilers"> 10<link rel="next" href="intro_pol_overview.html" title="Policies"> 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="compilers_overview.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.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="intro_pol_overview.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 27<a name="math_toolkit.config_macros"></a><a class="link" href="config_macros.html" title="Configuration Macros">Configuration Macros</a> 28</h2></div></div></div> 29<p> 30 Almost all configuration details are set up automatically by <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">\</span><span class="identifier">math</span><span class="special">\</span><span class="identifier">tools</span><span class="special">\</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>. 31 </p> 32<p> 33 In normal use, only policy configuration macros are likely to be used. See 34 <a class="link" href="pol_ref.html" title="Policy Reference">policy reference</a>. 35 </p> 36<p> 37 For reference, information on Boost.Math macros used internally are described 38 briefly below. 39 </p> 40<div class="table"> 41<a name="math_toolkit.config_macros.boost_math_macros"></a><p class="title"><b>Table 1.11. Boost.Math Macros</b></p> 42<div class="table-contents"><table class="table" summary="Boost.Math Macros"> 43<colgroup> 44<col> 45<col> 46</colgroup> 47<thead><tr> 48<th> 49 <p> 50 MACRO 51 </p> 52 </th> 53<th> 54 <p> 55 Notes 56 </p> 57 </th> 58</tr></thead> 59<tbody> 60<tr> 61<td> 62 <p> 63 <code class="computeroutput"><span class="identifier">BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS</span></code> 64 </p> 65 </td> 66<td> 67 <p> 68 Do not produce or use long double functions: this macro gets set 69 when the platform's long double or standard library long double support 70 is absent or buggy. 71 </p> 72 </td> 73</tr> 74<tr> 75<td> 76 <p> 77 <code class="computeroutput"><span class="identifier">BOOST_MATH_USE_FLOAT128</span></code> 78 </p> 79 </td> 80<td> 81 <p> 82 When set the numeric constants support the <code class="computeroutput"><span class="identifier">__float128</span></code> 83 data type with constants having the <code class="computeroutput"><span class="identifier">Q</span></code> 84 suffix. 85 </p> 86 </td> 87</tr> 88<tr> 89<td> 90 <p> 91 <code class="computeroutput"><span class="identifier">BOOST_MATH_DISABLE_FLOAT128</span></code> 92 </p> 93 </td> 94<td> 95 <p> 96 When set the numeric constants do not use the <code class="computeroutput"><span class="identifier">__float128</span></code> 97 data type even if the compiler appears to support it. 98 </p> 99 </td> 100</tr> 101<tr> 102<td> 103 <p> 104 <code class="computeroutput"><span class="identifier">BOOST_MATH_NO_REAL_CONCEPT_TESTS</span></code> 105 </p> 106 </td> 107<td> 108 <p> 109 Do not try to use real concept tests (hardware or software does not 110 support real_concept type). 111 </p> 112 </td> 113</tr> 114<tr> 115<td> 116 <p> 117 <code class="computeroutput"><span class="identifier">BOOST_MATH_CONTROL_FP</span></code> 118 </p> 119 </td> 120<td> 121 <p> 122 Controls FP hardware exceptions - our tests don't support hardware 123 exceptions on MSVC. May get set to something like: <code class="computeroutput"> <span class="identifier">_control87</span><span class="special">(</span><span class="identifier">MCW_EM</span><span class="special">,</span><span class="identifier">MCW_EM</span><span class="special">)</span></code>. 124 </p> 125 </td> 126</tr> 127<tr> 128<td> 129 <p> 130 <code class="computeroutput"><span class="identifier">BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS</span></code> 131 </p> 132 </td> 133<td> 134 <p> 135 This macro is used by our test cases, it is set when an assignment 136 of a function template to a function pointer requires explicit template 137 arguments to be provided on the function name. 138 </p> 139 </td> 140</tr> 141<tr> 142<td> 143 <p> 144 <code class="computeroutput"><span class="identifier">BOOST_MATH_USE_C99</span></code> 145 </p> 146 </td> 147<td> 148 <p> 149 Use C99 math functions. 150 </p> 151 </td> 152</tr> 153<tr> 154<td> 155 <p> 156 <code class="computeroutput"><span class="identifier">BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY</span></code> 157 </p> 158 </td> 159<td> 160 <p> 161 define if no native (or buggy) <code class="computeroutput"><span class="identifier">fpclassify</span><span class="special">(</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">)</span></code> 162 even though the other C99 functions are present. 163 </p> 164 </td> 165</tr> 166<tr> 167<td> 168 <p> 169 <code class="computeroutput"><span class="identifier">BOOST_MATH_SMALL_CONSTANT</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> 170 </p> 171 </td> 172<td> 173 <p> 174 Helper macro used in our test cases to set underflowing constants 175 set to zero if this would cause compiler issues. 176 </p> 177 </td> 178</tr> 179<tr> 180<td> 181 <p> 182 <code class="computeroutput"><span class="identifier">BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS</span></code> 183 </p> 184 </td> 185<td> 186 <p> 187 Set if constants too large for a float, will cause "bad" 188 values to be stored in the data, rather than infinity or a suitably 189 large value. 190 </p> 191 </td> 192</tr> 193<tr> 194<td> 195 <p> 196 <code class="computeroutput"><span class="identifier">BOOST_MATH_STD_USING</span></code> 197 </p> 198 </td> 199<td> 200 <p> 201 Provides <code class="computeroutput"><span class="keyword">using</span></code> statements 202 for many std:: (abs to sqrt) and boost::math (rounds, modf) functions. 203 This allows these functions to be called unqualified so that if 204 <a href="http://en.wikipedia.org/wiki/Argument-dependent_name_lookup" target="_top">argument-dependent 205 Argument Dependent Lookup</a> fails to find a suitable overload, 206 then the std:: versions will also be considered. 207 </p> 208 </td> 209</tr> 210<tr> 211<td> 212 <p> 213 <code class="computeroutput"><span class="identifier">BOOST_FPU_EXCEPTION_GUARD</span></code> 214 </p> 215 </td> 216<td> 217 <p> 218 Used at the entrypoint to each special function to reset all FPU 219 exception flags prior to internal calculations, and then merge the 220 old and new exception flags on function exit. Used as a workaround 221 on platforms or hardware that behave strangely if any FPU exception 222 flags are set when calling standard library functions. 223 </p> 224 </td> 225</tr> 226<tr> 227<td> 228 <p> 229 <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT</span></code> 230 </p> 231 </td> 232<td> 233 <p> 234 Define to output diagnostics for math functions. This is rather 'global' 235 to Boost.Math and so coarse-grained that it will probably produce 236 copious output! (Especially because full precision values are output). 237 Designed primarily for internal use and development. 238 </p> 239 </td> 240</tr> 241<tr> 242<td> 243 <p> 244 <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT_CODE</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> 245 </p> 246 </td> 247<td> 248 <p> 249 Output selected named variable, for example <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT_CODE</span><span class="special">(</span><span class="string">"guess = "</span> 250 <span class="special"><<</span> <span class="identifier">guess</span><span class="special">)</span></code>; Used by <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT</span></code> 251 </p> 252 </td> 253</tr> 254<tr> 255<td> 256 <p> 257 <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT_VARIABLE</span><span class="special">(</span><span class="identifier">name</span><span class="special">)</span></code> 258 </p> 259 </td> 260<td> 261 <p> 262 Output selected variable, for example <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT_VARIABLE</span><span class="special">(</span><span class="identifier">result</span><span class="special">);</span></code> Used by <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT</span></code> 263 </p> 264 </td> 265</tr> 266<tr> 267<td> 268 <p> 269 <code class="computeroutput"><span class="identifier">BOOST_MATH_INSTRUMENT_FPU</span></code> 270 </p> 271 </td> 272<td> 273 <p> 274 Output the state of the FPU's control flags. 275 </p> 276 </td> 277</tr> 278</tbody> 279</table></div> 280</div> 281<br class="table-break"><div class="table"> 282<a name="math_toolkit.config_macros.boost_math_tuning"></a><p class="title"><b>Table 1.12. Boost.Math Tuning</b></p> 283<div class="table-contents"><table class="table" summary="Boost.Math Tuning"> 284<colgroup> 285<col> 286<col> 287</colgroup> 288<thead><tr> 289<th> 290 <p> 291 Macros for Tuning performance options for specific compilers 292 </p> 293 </th> 294<th> 295 <p> 296 Notes 297 </p> 298 </th> 299</tr></thead> 300<tbody> 301<tr> 302<td> 303 <p> 304 <code class="computeroutput"><span class="identifier">BOOST_MATH_POLY_METHOD</span></code> 305 </p> 306 </td> 307<td> 308 <p> 309 See the <a class="link" href="tuning.html" title="Performance Tuning Macros">performance tuning section</a>. 310 </p> 311 </td> 312</tr> 313<tr> 314<td> 315 <p> 316 <code class="computeroutput"><span class="identifier">BOOST_MATH_RATIONAL_METHOD</span></code> 317 </p> 318 </td> 319<td> 320 <p> 321 See the <a class="link" href="tuning.html" title="Performance Tuning Macros">performance tuning section</a>. 322 </p> 323 </td> 324</tr> 325<tr> 326<td> 327 <p> 328 <code class="computeroutput"><span class="identifier">BOOST_MATH_MAX_POLY_ORDER</span></code> 329 </p> 330 </td> 331<td> 332 <p> 333 See the <a class="link" href="tuning.html" title="Performance Tuning Macros">performance tuning section</a>. 334 </p> 335 </td> 336</tr> 337<tr> 338<td> 339 <p> 340 <code class="computeroutput"><span class="identifier">BOOST_MATH_INT_TABLE_TYPE</span></code> 341 </p> 342 </td> 343<td> 344 <p> 345 See the <a class="link" href="tuning.html" title="Performance Tuning Macros">performance tuning section</a>. 346 </p> 347 </td> 348</tr> 349<tr> 350<td> 351 <p> 352 <code class="computeroutput"><span class="identifier">BOOST_MATH_INT_VALUE_SUFFIX</span></code> 353 </p> 354 </td> 355<td> 356 <p> 357 Helper macro for appending the correct suffix to integer constants 358 which may actually be stored as reals depending on the value of BOOST_MATH_INT_TABLE_TYPE. 359 </p> 360 </td> 361</tr> 362</tbody> 363</table></div> 364</div> 365<br class="table-break"> 366</div> 367<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 368<td align="left"></td> 369<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar 370 Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, 371 Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan 372 Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, 373 Daryle Walker and Xiaogang Zhang<p> 374 Distributed under the Boost Software License, Version 1.0. (See accompanying 375 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>) 376 </p> 377</div></td> 378</tr></table> 379<hr> 380<div class="spirit-nav"> 381<a accesskey="p" href="compilers_overview.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.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="intro_pol_overview.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 382</div> 383</body> 384</html> 385