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 
10 
11 #include <boost/serialization/nvp.hpp>
12 #include <boost/multiprecision/mpfr.hpp>
13 
14 namespace pinocchio
15 {
16  template<
17  unsigned S_digits10,
18  boost::multiprecision::mpfr_allocation_type S_alloc,
19  boost::multiprecision::expression_template_option S_et,
20  unsigned C_digits10,
21  boost::multiprecision::mpfr_allocation_type C_alloc,
22  boost::multiprecision::expression_template_option C_et,
23  unsigned X_digits10,
24  boost::multiprecision::mpfr_allocation_type X_alloc,
25  boost::multiprecision::expression_template_option X_et>
26  struct SINCOSAlgo<
27  boost::multiprecision::
28  number<boost::multiprecision::mpfr_float_backend<X_digits10, X_alloc>, X_et>,
29  boost::multiprecision::
30  number<boost::multiprecision::mpfr_float_backend<S_digits10, S_alloc>, S_et>,
31  boost::multiprecision::
32  number<boost::multiprecision::mpfr_float_backend<C_digits10, C_alloc>, C_et>>
33  {
34  static void run(
35  boost::multiprecision::
36  number<boost::multiprecision::mpfr_float_backend<X_digits10, X_alloc>, X_et> const & a,
37  boost::multiprecision::
38  number<boost::multiprecision::mpfr_float_backend<S_digits10, S_alloc>, S_et> * sa,
39  boost::multiprecision::
40  number<boost::multiprecision::mpfr_float_backend<C_digits10, C_alloc>, C_et> * 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__
pinocchio::SINCOSAlgo
Generic evaluation of sin/cos functions.
Definition: sincos.hpp:15
sincos.hpp
boost
a
Vec3f a
multiprecision.hpp
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27
pinocchio::SINCOSAlgo< boost::multiprecision::number< boost::multiprecision::mpfr_float_backend< X_digits10, X_alloc >, X_et >, boost::multiprecision::number< boost::multiprecision::mpfr_float_backend< S_digits10, S_alloc >, S_et >, boost::multiprecision::number< boost::multiprecision::mpfr_float_backend< C_digits10, C_alloc >, C_et > >::run
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)
Definition: multiprecision-mpfr.hpp:34


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:12