10 #ifndef EIGEN_ADLOC_FORWARD_MODULE_H
11 #define EIGEN_ADLOC_FORWARD_MODULE_H
24 #define ADOLC_TAPELESS
25 #ifndef NUMBER_DIRECTIONS
26 # define NUMBER_DIRECTIONS 2
28 #include <adolc/adtl.h>
43 #include "../../Eigen/Core"
71 inline const adouble&
conj(
const adouble&
x) {
return x; }
72 inline const adouble&
real(
const adouble&
x) {
return x; }
73 inline adouble
imag(
const adouble&) {
return 0.; }
74 inline adouble
abs(
const adouble&
x) {
return fabs(
x); }
75 inline adouble
abs2(
const adouble&
x) {
return x*
x; }
87 typedef adtl::adouble
Real;
110 template<
typename T0>
112 template<
typename T0,
typename T1>
114 template<
typename T0,
typename T1,
typename T2>
129 Functor::operator()(
x,
v);
138 for (
int j=0;
j<jac.cols();
j++)
139 for (
int i=0;
i<jac.cols();
i++)
140 ax[
i].setADValue(
j,
i==
j ? 1 : 0);
142 Functor::operator()(ax, &av);
144 for (
int i=0;
i<jac.rows();
i++)
146 (*v)[
i] = av[
i].getValue();
147 for (
int j=0;
j<jac.cols();
j++)
Array< int, Dynamic, 1 > v
void operator()(const InputType &x, ValueType *v, JacobianType *_jac) const
Matrix< ActiveScalar, InputType::SizeAtCompileTime, 1 > ActiveInput
Matrix< ActiveScalar, ValueType::SizeAtCompileTime, 1 > ActiveValue
Functor::InputType InputType
AdolcForwardJacobian(const Functor &f)
Functor::JacobianType JacobianType
AdolcForwardJacobian(const T0 &a0, const T1 &a1, const T1 &a2)
AdolcForwardJacobian(const T0 &a0, const T1 &a1)
Functor::ValueType ValueType
adtl::adouble ActiveScalar
AdolcForwardJacobian(const T0 &a0)
constexpr Scalar & coeffRef(Index index)
EIGEN_ALWAYS_INLINE bool() isinf(const Eigen::bfloat16 &h)
EIGEN_ALWAYS_INLINE bool() isnan(const Eigen::bfloat16 &h)
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend
adouble abs(const adouble &x)
bool() isnan(const adouble &x)
bool() isinf(const adouble &x)
const adouble & real(const adouble &x)
adouble imag(const adouble &)
const adouble & conj(const adouble &x)
adouble abs2(const adouble &x)