6 #ifndef __pinocchio_math_sincos_hpp__ 7 #define __pinocchio_math_sincos_hpp__ 14 template<
typename S1,
typename S2 = S1,
typename S3 = S1>
struct SINCOSAlgo;
25 template<
typename S1,
typename S2,
typename S3>
26 void SINCOS(
const S1 &
a, S2 * sa, S3 * ca)
32 template<
typename S1,
typename S2,
typename S3>
35 static void run(
const S1 &
a, S2 * sa, S3 * ca)
37 using std::sin;
using std::cos;
38 (*sa) = sin(a); (*ca) = cos(a);
46 static void run(
const double &
a,
double * sa,
double * ca)
52 #else // if sincos specialization does not exist 53 (*sa) = std::sin(a); (*ca) = std::cos(a);
62 static void run(
const float &
a,
float * sa,
float * ca)
68 #else // if sincosf specialization does not exist 69 (*sa) = std::sin(a); (*ca) = std::cos(a);
78 static void run(
const long double &
a,
long double * sa,
long double * ca)
82 #else // if sincosl specialization does not exist 83 (*sa) = std::sin(a); (*ca) = std::cos(a);
90 #endif //#ifndef __pinocchio_math_sincos_hpp__ Generic evaluation of sin/cos functions.
static void run(const S1 &a, S2 *sa, S3 *ca)
static void run(const double &a, double *sa, double *ca)
void SINCOS(const S1 &a, S2 *sa, S3 *ca)
Computes sin/cos values of a given input scalar.
static void run(const long double &a, long double *sa, long double *ca)
Main pinocchio namespace.
static void run(const float &a, float *sa, float *ca)