multiprecision-mpfr.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 INRIA
3 //
4 
5 #ifndef __pinocchio_math_mutliprecision_mpfr_hpp__
6 #define __pinocchio_math_mutliprecision_mpfr_hpp__
7 
8 #include "pinocchio/math/multiprecision.hpp"
9 #include "pinocchio/math/sincos.hpp"
10 
11 #include <boost/serialization/nvp.hpp>
12 #include <boost/multiprecision/mpfr.hpp>
13 
14 namespace pinocchio
15 {
16 template <
17  unsigned S_digits10, boost::multiprecision::mpfr_allocation_type S_alloc,
18  boost::multiprecision::expression_template_option S_et, unsigned C_digits10,
19  boost::multiprecision::mpfr_allocation_type C_alloc,
20  boost::multiprecision::expression_template_option C_et, unsigned X_digits10,
21  boost::multiprecision::mpfr_allocation_type X_alloc,
22  boost::multiprecision::expression_template_option X_et>
23 struct SINCOSAlgo<
24  boost::multiprecision::number<
25  boost::multiprecision::mpfr_float_backend<X_digits10, X_alloc>, X_et>,
26  boost::multiprecision::number<
27  boost::multiprecision::mpfr_float_backend<S_digits10, S_alloc>, S_et>,
28  boost::multiprecision::number<
29  boost::multiprecision::mpfr_float_backend<C_digits10, C_alloc>, C_et>>
30 {
31  static void run(
32  boost::multiprecision::number<
33  boost::multiprecision::mpfr_float_backend<X_digits10, X_alloc>,
34  X_et> const& a,
35  boost::multiprecision::number<
36  boost::multiprecision::mpfr_float_backend<S_digits10, S_alloc>, S_et>*
37  sa,
38  boost::multiprecision::number<
39  boost::multiprecision::mpfr_float_backend<C_digits10, C_alloc>, C_et>*
40  ca)
41  {
42  mpfr_srcptr x_mpfr((a.backend().data()));
43  mpfr_ptr s_mpfr(sa->backend().data());
44  mpfr_ptr c_mpfr(ca->backend().data());
45  mpfr_sin_cos(s_mpfr, c_mpfr, x_mpfr, MPFR_RNDN);
46  }
47 };
48 } // namespace pinocchio
49 
50 #endif // ifndef __pinocchio_math_mutliprecision_hpp__
Generic evaluation of sin/cos functions.
Definition: sincos.hpp:14
Vec3f a
static void run(boost::multiprecision::number< boost::multiprecision::mpfr_float_backend< X_digits10, X_alloc >, X_et > const &a, boost::multiprecision::number< boost::multiprecision::mpfr_float_backend< S_digits10, S_alloc >, S_et > *sa, boost::multiprecision::number< boost::multiprecision::mpfr_float_backend< C_digits10, C_alloc >, C_et > *ca)
Main pinocchio namespace.
Definition: timings.cpp:28


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:32