52 #ifndef SACADO_FAD_OPS_MP_VECTOR_HPP
53 #define SACADO_FAD_OPS_MP_VECTOR_HPP
55 #include "Sacado_Fad_Ops.hpp"
56 #include "Sacado_mpl_enable_if.hpp"
59 #define FAD_UNARYOP_MACRO(OPNAME,OP,MPVALUE,VALUE,DX,FASTACCESSDX) \
63 template <typename ExprT> \
64 class Expr< OP<ExprT>,ExprSpecMPVector > { \
67 typedef typename ExprT::value_type value_type; \
68 typedef typename ExprT::scalar_type scalar_type; \
69 typedef typename ExprT::base_expr_type base_expr_type; \
71 typedef typename value_type::value_type val_type; \
73 KOKKOS_INLINE_FUNCTION \
74 Expr(const ExprT& expr_) : expr(expr_) {} \
76 KOKKOS_INLINE_FUNCTION \
77 int size() const { return expr.size(); } \
79 KOKKOS_INLINE_FUNCTION \
80 bool hasFastAccess() const { return expr.hasFastAccess(); } \
82 KOKKOS_INLINE_FUNCTION \
83 bool isPassive() const { return expr.isPassive();} \
85 KOKKOS_INLINE_FUNCTION \
86 bool updateValue() const { return expr.updateValue(); } \
88 KOKKOS_INLINE_FUNCTION \
89 value_type val() const { \
93 KOKKOS_INLINE_FUNCTION \
94 val_type val(int j) const { \
98 KOKKOS_INLINE_FUNCTION \
99 val_type dx(int i, int j) const { \
103 KOKKOS_INLINE_FUNCTION \
104 val_type fastAccessDx(int i, int j) const { \
105 return FASTACCESSDX; \
121 expr.fastAccessDx(i,
j))
127 -expr.fastAccessDx(i,
j))
138 expr.dx(i,
j)/expr.val(
j),
139 expr.fastAccessDx(i,
j)/expr.val(
j))
145 expr.fastAccessDx(i,
j) / (
std::log(val_type(10))*expr.val(
j)))
148 std::sqrt(expr.
val()),
149 std::sqrt(expr.val(
j)),
150 expr.
dx(i,j)/(val_type(2)* std::sqrt(expr.val(j))),
151 expr.
fastAccessDx(i,j)/(val_type(2)* std::sqrt(expr.val(j))))
154 std::cos(expr.val()),
155 std::cos(expr.val(j)),
156 -expr.
dx(i,j)* std::
sin(expr.val(j)),
160 std::sin(expr.val()),
161 std::sin(expr.val(j)),
162 expr.
dx(i,j)* std::cos(expr.val(j)),
166 std::tan(expr.val()),
167 std::tan(expr.val(j)),
169 (val_type(1)+ std::tan(expr.val(j))* std::tan(expr.val(j))),
171 (val_type(1)+ std::tan(expr.val(j))* std::tan(expr.val(j))))
174 std::acos(expr.val()),
175 std::acos(expr.val(j)),
176 -expr.
dx(i,j)/ std::sqrt(val_type(1)-expr.val(j)*expr.val(j)),
178 std::sqrt(val_type(1)-expr.val(j)*expr.val(j)))
181 std::asin(expr.val()),
182 std::asin(expr.val(j)),
183 expr.
dx(i,j)/ std::sqrt(val_type(1)-expr.val(j)*expr.val(j)),
185 std::sqrt(val_type(1)-expr.val(j)*expr.val(j)))
188 std::atan(expr.val()),
189 std::atan(expr.val(j)),
190 expr.
dx(i,j)/(val_type(1)+expr.val(j)*expr.val(j)),
191 expr.
fastAccessDx(i,j)/(val_type(1)+expr.val(j)*expr.val(j)))
194 std::cosh(expr.val()),
195 std::cosh(expr.val(j)),
196 expr.
dx(i,j)* std::
sinh(expr.val(j)),
200 std::sinh(expr.val()),
201 std::sinh(expr.val(j)),
202 expr.
dx(i,j)* std::cosh(expr.val(j)),
206 std::tanh(expr.val()),
207 std::tanh(expr.val(j)),
208 expr.
dx(i,j)/( std::cosh(expr.val(j))* std::cosh(expr.val(j))),
210 ( std::cosh(expr.val(j))* std::cosh(expr.val(j))))
213 std::acosh(expr.val()),
214 std::acosh(expr.val(j)),
215 expr.
dx(i,j)/ std::sqrt((expr.val(j)-val_type(1)) *
216 (expr.val(j)+val_type(1))),
217 expr.
fastAccessDx(i,j)/ std::sqrt((expr.val(j)-val_type(1)) *
218 (expr.val(j)+val_type(1))))
221 std::asinh(expr.val()),
222 std::asinh(expr.val(j)),
223 expr.
dx(i,j)/ std::sqrt(val_type(1)+expr.val(j)*expr.val(j)),
225 expr.val(j)*expr.val(j)))
228 std::atanh(expr.val()),
229 std::atanh(expr.val(j)),
230 expr.
dx(i,j)/(val_type(1)-expr.val(j)*expr.val(j)),
232 expr.val(j)*expr.val(j)))
235 std::abs(expr.val()),
236 std::abs(expr.val(j)),
237 expr.val(j) >= 0 ? val_type(+expr.
dx(i,j)) :
238 val_type(-expr.
dx(i,j)),
243 std::fabs(expr.val()),
244 std::fabs(expr.val(j)),
245 expr.val(j) >= 0 ? val_type(+expr.
dx(i,j)) :
246 val_type(-expr.
dx(i,j)),
249 #ifdef HAVE_SACADO_CXX11
254 expr.dx(i,j)/(val_type(3)*
std::cbrt(expr.val(j)*expr.val(j))),
255 expr.fastAccessDx(i,j)/(val_type(3)*
std::cbrt(expr.val(j)*expr.val(j))))
260 #define
FAD_BINARYOP_MACRO(
OPNAME,OP,MPVALUE,VALUE,DX,FASTACCESSDX,MPVAL_CONST_DX_1,MPVAL_CONST_DX_2,VAL_CONST_DX_1,VAL_CONST_DX_2,CONST_DX_1,CONST_DX_2,CONST_FASTACCESSDX_1,CONST_FASTACCESSDX_2) \
264 template <typename ExprT1, typename ExprT2> \
265 class Expr< OP< ExprT1, ExprT2 >,ExprSpecMPVector > { \
271 typedef
typename Sacado::Promote<value_type_1, \
276 typedef
typename Sacado::Promote<scalar_type_1, \
279 typedef
typename ExprT1::base_expr_type base_expr_type_1; \
280 typedef
typename ExprT2::base_expr_type base_expr_type_2; \
281 typedef
typename Sacado::Promote<base_expr_type_1, \
282 base_expr_type_2>::type base_expr_type; \
286 KOKKOS_INLINE_FUNCTION \
287 Expr(
const ExprT1& expr1_,
const ExprT2& expr2_) : \
288 expr1(expr1_), expr2(expr2_) {} \
290 KOKKOS_INLINE_FUNCTION \
292 int sz1 = expr1.size(), sz2 = expr2.size(); \
293 return sz1 > sz2 ? sz1 : sz2; \
296 KOKKOS_INLINE_FUNCTION \
297 bool hasFastAccess()
const { \
298 return expr1.hasFastAccess() && expr2.hasFastAccess(); \
301 KOKKOS_INLINE_FUNCTION \
302 bool isPassive()
const { \
303 return expr1.isPassive() && expr2.isPassive(); \
306 KOKKOS_INLINE_FUNCTION \
307 bool updateValue()
const { \
308 return expr1.updateValue() && expr2.updateValue(); \
311 KOKKOS_INLINE_FUNCTION \
312 const value_type
val()
const { \
316 KOKKOS_INLINE_FUNCTION \
317 const val_type
val(
int j)
const { \
321 KOKKOS_INLINE_FUNCTION \
322 const val_type
dx(
int i,
int j)
const { \
326 KOKKOS_INLINE_FUNCTION \
328 return FASTACCESSDX; \
333 const ExprT1& expr1; \
334 const ExprT2& expr2; \
338 template <typename ExprT1, typename T2> \
339 class Expr< OP< ExprT1, ConstExpr<T2> >,ExprSpecMPVector > { \
343 typedef ConstExpr<T2> ConstT; \
344 typedef ConstExpr<T2> ExprT2; \
347 typedef
typename Sacado::Promote<value_type_1, \
352 typedef
typename Sacado::Promote<scalar_type_1, \
355 typedef
typename ExprT1::base_expr_type base_expr_type_1; \
356 typedef
typename ExprT2::base_expr_type base_expr_type_2; \
357 typedef
typename Sacado::Promote<base_expr_type_1, \
358 base_expr_type_2>::type base_expr_type; \
362 KOKKOS_INLINE_FUNCTION \
363 Expr(
const ExprT1& expr1_,
const ConstT& c_) : \
364 expr1(expr1_), c(c_) {} \
366 KOKKOS_INLINE_FUNCTION \
368 return expr1.size(); \
371 KOKKOS_INLINE_FUNCTION \
372 bool hasFastAccess()
const { \
373 return expr1.hasFastAccess(); \
376 KOKKOS_INLINE_FUNCTION \
377 bool isPassive()
const { \
378 return expr1.isPassive(); \
381 KOKKOS_INLINE_FUNCTION \
382 bool updateValue()
const {
return expr1.updateValue(); } \
384 KOKKOS_INLINE_FUNCTION \
385 const value_type
val()
const { \
386 return MPVAL_CONST_DX_2; \
389 KOKKOS_INLINE_FUNCTION \
390 const val_type
val(
int j)
const { \
391 return VAL_CONST_DX_2; \
394 KOKKOS_INLINE_FUNCTION \
395 const val_type
dx(
int i,
int j)
const { \
399 KOKKOS_INLINE_FUNCTION \
401 return CONST_FASTACCESSDX_2; \
406 const ExprT1& expr1; \
410 template <typename T1, typename ExprT2> \
411 class Expr< OP< ConstExpr<T1>, ExprT2 >,ExprSpecMPVector > { \
415 typedef ConstExpr<T1> ConstT; \
416 typedef ConstExpr<T1> ExprT1; \
419 typedef
typename Sacado::Promote<value_type_1, \
424 typedef
typename Sacado::Promote<scalar_type_1, \
427 typedef
typename ExprT1::base_expr_type base_expr_type_1; \
428 typedef
typename ExprT2::base_expr_type base_expr_type_2; \
429 typedef
typename Sacado::Promote<base_expr_type_1, \
430 base_expr_type_2>::type base_expr_type; \
434 KOKKOS_INLINE_FUNCTION \
435 Expr(
const ConstT& c_,
const ExprT2& expr2_) : \
436 c(c_), expr2(expr2_) {} \
438 KOKKOS_INLINE_FUNCTION \
440 return expr2.size(); \
443 KOKKOS_INLINE_FUNCTION \
444 bool hasFastAccess()
const { \
445 return expr2.hasFastAccess(); \
448 KOKKOS_INLINE_FUNCTION \
449 bool isPassive()
const { \
450 return expr2.isPassive(); \
453 KOKKOS_INLINE_FUNCTION \
454 bool updateValue()
const {
return expr2.updateValue(); } \
456 KOKKOS_INLINE_FUNCTION \
457 const value_type
val()
const { \
458 return MPVAL_CONST_DX_1; \
461 KOKKOS_INLINE_FUNCTION \
462 const val_type
val(
int j)
const { \
463 return VAL_CONST_DX_1; \
466 KOKKOS_INLINE_FUNCTION \
467 const val_type
dx(
int i,
int j)
const { \
471 KOKKOS_INLINE_FUNCTION \
473 return CONST_FASTACCESSDX_1; \
479 const ExprT2& expr2; \
488 expr1.val() + expr2.val(),
489 expr1.val(j) + expr2.val(j),
490 expr1.dx(i,j) + expr2.dx(i,j),
491 expr1.fastAccessDx(i,j) + expr2.fastAccessDx(i,j),
492 c.val() + expr2.val(),
493 expr1.val() + c.val(),
494 c.val(j) + expr2.val(j),
495 expr1.val(j) + c.val(j),
498 expr2.fastAccessDx(i,j),
499 expr1.fastAccessDx(i,j))
502 expr1.val() - expr2.val(),
503 expr1.val(j) - expr2.val(j),
504 expr1.dx(i,j) - expr2.dx(i,j),
505 expr1.fastAccessDx(i,j) - expr2.fastAccessDx(i,j),
506 c.val() - expr2.val(),
507 expr1.val() - c.val(),
508 c.val(j) - expr2.val(j),
509 expr1.val(j) - c.val(j),
512 -expr2.fastAccessDx(i,j),
513 expr1.fastAccessDx(i,j))
531 expr1.val() / expr2.val(),
532 expr1.val(j) / expr2.val(j),
533 (expr1.dx(i,j)*expr2.val(j) - expr2.dx(i,j)*expr1.val(j)) /
534 (expr2.val(j)*expr2.val(j)),
535 (expr1.fastAccessDx(i,j)*expr2.val(j) -
536 expr2.fastAccessDx(i,j)*expr1.val(j)) /
537 (expr2.val(j)*expr2.val(j)),
538 c.val() / expr2.val(),
539 expr1.val() / c.val(),
540 c.val(j) / expr2.val(j),
541 expr1.val(j) / c.val(j),
542 -expr2.dx(i,j)*c.val(j) / (expr2.val(j)*expr2.val(j)),
543 expr1.dx(i,j)/c.val(j),
544 -expr2.fastAccessDx(i,j)*c.val(j) / (expr2.val(j)*expr2.val(j)),
545 expr1.fastAccessDx(i,j)/c.val(j))
550 (expr2.val(j)*expr1.dx(i,j) - expr1.val(j)*expr2.dx(i,j))/
551 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
552 (expr2.val(j)*expr1.fastAccessDx(i,j) - expr1.val(j)*expr2.fastAccessDx(i,j))/
553 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
558 (-c.val(j)*expr2.dx(i,j)) / (c.val(j)*c.val(j) + expr2.val(j)*expr2.val(j)),
559 (c.val(j)*expr1.dx(i,j))/ (expr1.val(j)*expr1.val(j) + c.val(j)*c.val(j)),
560 (-c.val(j)*expr2.fastAccessDx(i,j))/ (c.val(j)*c.val(j) + expr2.val(j)*expr2.val(j)),
561 (c.val(j)*expr1.fastAccessDx(i,j))/ (expr1.val(j)*expr1.val(j) + c.val(j)*c.val(j)))
564 std::pow(expr1.val(), expr2.val()),
565 std::pow(expr1.val(j), expr2.val(j)),
566 expr1.val(j) == val_type(0) ? val_type(0) : val_type((expr2.
dx(i,j)*std::
log(expr1.val(j))+expr2.val(j)*expr1.
dx(i,j)/expr1.val(j))*std::pow(expr1.val(j),expr2.val(j))),
567 expr1.val(j) == val_type(0) ? val_type(0.0) : val_type((expr2.
fastAccessDx(i,j)*std::
log(expr1.val(j))+expr2.val(j)*expr1.
fastAccessDx(i,j)/expr1.val(j))*std::pow(expr1.val(j),expr2.val(j))),
568 std::pow(c.val(), expr2.val()),
569 std::pow(expr1.val(), c.val()),
570 std::pow(c.val(j), expr2.val(j)),
571 std::pow(expr1.val(j), c.val(j)),
572 c.val(j) == val_type(0) ? val_type(0) : val_type(expr2.
dx(i,j)*std::
log(c.val(j))*std::pow(c.val(j),expr2.val(j))),
573 expr1.val(j) == val_type(0) ? val_type(0.0) : val_type(c.val(j)*expr1.
dx(i,j)/expr1.val(j)*std::pow(expr1.val(j),c.val(j))),
574 c.val(j) == val_type(0) ? val_type(0) : val_type(expr2.
fastAccessDx(i,j)*std::
log(c.val(j))*std::pow(c.val(j),expr2.val(j))),
575 expr1.val(j) == val_type(0) ? val_type(0.0) : val_type(c.val(j)*expr1.
fastAccessDx(i,j)/expr1.val(j)*std::pow(expr1.val(j),c.val(j))))
578 std::max(expr1.val(), expr2.val()),
579 std::max(expr1.val(j), expr2.val(j)),
580 expr1.val(j) >= expr2.val(j) ? expr1.
dx(i,j) : expr2.
dx(i,j),
581 expr1.val(j) >= expr2.val(j) ? expr1.
fastAccessDx(i,j) :
583 std::max(c.val(), expr2.val()),
584 std::max(expr1.val(), c.val()),
585 std::max(c.val(j), expr2.val(j)),
586 std::max(expr1.val(j), c.val(j)),
587 c.val(j) >= expr2.val(j) ? val_type(0) : expr2.
dx(i,j),
588 expr1.val(j) >= c.val(j) ? expr1.
dx(i,j) : val_type(0),
589 c.val(j) >= expr2.val(j) ? val_type(0) : expr2.
fastAccessDx(i,j),
590 expr1.val(j) >= c.val(j) ? expr1.
fastAccessDx(i,j) : val_type(0))
593 std::min(expr1.val(), expr2.val()),
594 std::min(expr1.val(j), expr2.val(j)),
595 expr1.val(j) <= expr2.val(j) ? expr1.
dx(i,j) : expr2.
dx(i,j),
596 expr1.val(j) <= expr2.val(j) ? expr1.
fastAccessDx(i,j) :
598 std::min(c.val(), expr2.val()),
599 std::min(expr1.val(), c.val()),
600 std::min(c.val(j), expr2.val(j)),
601 std::min(expr1.val(j), c.val(j)),
602 c.val(j) <= expr2.val(j) ? val_type(0) : expr2.
dx(i,j),
603 expr1.val(j) <= c.val(j) ? expr1.
dx(i,j) : val_type(0),
604 c.val(j) <= expr2.val(j) ? val_type(0) : expr2.
fastAccessDx(i,j),
605 expr1.val(j) <= c.val(j) ? expr1.
fastAccessDx(i,j) : val_type(0))
608 #undef FAD_BINARYOP_MACRO
613 template <
typename ExprT1,
typename ExprT2>
620 typedef typename Sacado::Promote<value_type_1,
625 typedef typename Sacado::Promote<scalar_type_1,
628 typedef typename ExprT1::base_expr_type base_expr_type_1;
629 typedef typename ExprT2::base_expr_type base_expr_type_2;
630 typedef typename Sacado::Promote<base_expr_type_1,
631 base_expr_type_2>::type base_expr_type;
635 KOKKOS_INLINE_FUNCTION
636 Expr(
const ExprT1& expr1_,
const ExprT2& expr2_) :
637 expr1(expr1_), expr2(expr2_) {}
639 KOKKOS_INLINE_FUNCTION
641 int sz1 = expr1.size(), sz2 = expr2.size();
642 return sz1 > sz2 ? sz1 : sz2;
645 KOKKOS_INLINE_FUNCTION
646 bool hasFastAccess()
const {
647 return expr1.hasFastAccess() && expr2.hasFastAccess();
650 KOKKOS_INLINE_FUNCTION
651 bool isPassive()
const {
652 return expr1.isPassive() && expr2.isPassive();
655 KOKKOS_INLINE_FUNCTION
656 bool updateValue()
const {
657 return expr1.updateValue() && expr2.updateValue();
660 KOKKOS_INLINE_FUNCTION
662 return expr1.val()*expr2.val();
665 KOKKOS_INLINE_FUNCTION
666 const val_type
val(
int j)
const {
667 return expr1.val(j)*expr2.val(j);
670 KOKKOS_INLINE_FUNCTION
671 const val_type
dx(
int i,
int j)
const {
672 if (expr1.size() > 0 && expr2.size() > 0)
673 return expr1.val(j)*expr2.dx(i,j) + expr1.dx(i,j)*expr2.val(j);
674 else if (expr1.size() > 0)
675 return expr1.dx(i,j)*expr2.val(j);
677 return expr1.val(j)*expr2.dx(i,j);
680 KOKKOS_INLINE_FUNCTION
682 return expr1.val(j)*expr2.fastAccessDx(i,j) +
683 expr1.fastAccessDx(i,j)*expr2.val(j);
693 template <
typename ExprT1,
typename T2>
717 KOKKOS_INLINE_FUNCTION
719 expr1(expr1_), c(c_) {}
721 KOKKOS_INLINE_FUNCTION
726 KOKKOS_INLINE_FUNCTION
728 return expr1.hasFastAccess();
731 KOKKOS_INLINE_FUNCTION
733 return expr1.isPassive();
736 KOKKOS_INLINE_FUNCTION
739 KOKKOS_INLINE_FUNCTION
741 return expr1.val()*c.val();
744 KOKKOS_INLINE_FUNCTION
745 const val_type
val(
int j)
const {
746 return expr1.val(j)*c.val(j);
749 KOKKOS_INLINE_FUNCTION
750 const val_type
dx(
int i,
int j)
const {
751 return expr1.dx(i,j)*c.val(j);
754 KOKKOS_INLINE_FUNCTION
756 return expr1.fastAccessDx(i,j)*c.val(j);
765 template <
typename T1,
typename ExprT2>
789 KOKKOS_INLINE_FUNCTION
791 c(c_), expr2(expr2_) {}
793 KOKKOS_INLINE_FUNCTION
798 KOKKOS_INLINE_FUNCTION
800 return expr2.hasFastAccess();
803 KOKKOS_INLINE_FUNCTION
805 return expr2.isPassive();
808 KOKKOS_INLINE_FUNCTION
811 KOKKOS_INLINE_FUNCTION
813 return c.val()*expr2.val();
816 KOKKOS_INLINE_FUNCTION
817 const val_type
val(
int j)
const {
818 return c.val(j)*expr2.val(j);
821 KOKKOS_INLINE_FUNCTION
822 const val_type
dx(
int i,
int j)
const {
823 return c.val(j)*expr2.dx(i,j);
826 KOKKOS_INLINE_FUNCTION
828 return c.val(j)*expr2.fastAccessDx(i,j);
837 template <
typename ExprT>
838 KOKKOS_INLINE_FUNCTION
839 bool toBool(
const Expr<ExprT,ExprSpecMPVector>& x) {
840 bool is_zero = (x.val() == 0.0);
841 for (
int i=0; i<x.size(); i++)
842 for (
int j=0; j<x.val().size(); ++
j)
843 is_zero = is_zero && (x.dx(i,j) == 0.0);
847 template <
typename ExprT>
848 std::ostream& operator << (std::ostream& os, const Expr<ExprT,ExprSpecMPVector>& x) {
849 os << x.val() <<
" [";
851 for (
int i=0; i< x.size(); i++) {
853 for (
int j=0; j<x.val().size(); ++
j) {
854 os <<
" " << x.dx(i,j);
865 #endif // SACADO_FAD_OPS_MP_VECTOR_HPP
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
ExprT2::base_expr_type base_expr_type_2
KOKKOS_INLINE_FUNCTION PCE< Storage > fabs(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > tan(const PCE< Storage > &a)
value_type::value_type val_type
KOKKOS_INLINE_FUNCTION Expr(const ExprT1 &expr1_, const ConstT &c_)
KOKKOS_INLINE_FUNCTION PCE< Storage > sinh(const PCE< Storage > &a)
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 MultiplicationOp
ExprT2::scalar_type scalar_type_2
ExprT1::scalar_type scalar_type_1
KOKKOS_INLINE_FUNCTION int size() const
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 j expr1 expr1 expr1 expr1 j expr1 c *expr2 expr1 c expr1 c expr1 c expr1 DivisionOp
KOKKOS_INLINE_FUNCTION bool isPassive() const
KOKKOS_INLINE_FUNCTION PCE< Storage > pow(const PCE< Storage > &a, const PCE< Storage > &b)
KOKKOS_INLINE_FUNCTION bool isPassive() const
KOKKOS_INLINE_FUNCTION const val_type val(int j) const
Sacado::Promote< value_type_1, value_type_2 >::type value_type
ExprT2::value_type value_type_2
KOKKOS_INLINE_FUNCTION const value_type val() const
ExprT2::base_expr_type base_expr_type_2
KOKKOS_INLINE_FUNCTION bool updateValue() const
KOKKOS_INLINE_FUNCTION const val_type fastAccessDx(int i, int j) const
KOKKOS_INLINE_FUNCTION int size() const
ExprT1::value_type value_type_1
KOKKOS_INLINE_FUNCTION PCE< Storage > tanh(const PCE< Storage > &a)
#define FAD_BINARYOP_MACRO(OPNAME, OP, USING, MPVALUE, VALUE, DX, CDX1, CDX2, FASTACCESSDX, MPVAL_CONST_DX_1, MPVAL_CONST_DX_2, VAL_CONST_DX_1, VAL_CONST_DX_2, CONST_DX_1, CONST_DX_2, CONST_FASTACCESSDX_1, CONST_FASTACCESSDX_2)
KOKKOS_INLINE_FUNCTION PCE< Storage > cbrt(const PCE< Storage > &a)
value_type::value_type val_type
KOKKOS_INLINE_FUNCTION PCE< Storage > acos(const PCE< Storage > &a)
atan2(expr1.val(), expr2.val())
KOKKOS_INLINE_FUNCTION PCE< Storage > min(const typename PCE< Storage >::value_type &a, const PCE< Storage > &b)
KOKKOS_INLINE_FUNCTION bool toBool(const Expr< ExprT, ExprSpecMPVector > &x)
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MaxOp
KOKKOS_INLINE_FUNCTION const val_type val(int j) const
ExprT1::base_expr_type base_expr_type_1
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 j expr1 expr1 expr1 expr1 j expr1 c *expr2 expr1 c expr1 c expr1 c expr1 expr1 expr1 expr1 j *expr1 expr2 expr1 expr1 j *expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 Atan2Op
KOKKOS_INLINE_FUNCTION const val_type dx(int i, int j) const
KOKKOS_INLINE_FUNCTION const value_type val() const
ExprT2::scalar_type scalar_type_2
KOKKOS_INLINE_FUNCTION bool hasFastAccess() const
KOKKOS_INLINE_FUNCTION PCE< Storage > max(const typename PCE< Storage >::value_type &a, const PCE< Storage > &b)
expr expr expr expr fastAccessDx(i, j)) FAD_UNARYOP_MACRO(exp
ExprT1::base_expr_type base_expr_type_1
ExprT1::value_type value_type_1
KOKKOS_INLINE_FUNCTION PCE< Storage > cosh(const PCE< Storage > &a)
ExprT1::scalar_type scalar_type_1
#define FAD_UNARYOP_MACRO(OPNAME, OP, USING, MPVALUE, VALUE, DX, FASTACCESSDX)
KOKKOS_INLINE_FUNCTION PCE< Storage > abs(const PCE< Storage > &a)
ExprT2::value_type value_type_2
Sacado::Promote< scalar_type_1, scalar_type_2 >::type scalar_type
KOKKOS_INLINE_FUNCTION PCE< Storage > atan(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > exp(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION Expr(const ConstT &c_, const ExprT2 &expr2_)
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MinOp
KOKKOS_INLINE_FUNCTION bool updateValue() const
KOKKOS_INLINE_FUNCTION bool hasFastAccess() const
expr expr expr expr ExpOp
KOKKOS_INLINE_FUNCTION PCE< Storage > sin(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION const val_type fastAccessDx(int i, int j) const
Sacado::Promote< value_type_1, value_type_2 >::type value_type
Sacado::Promote< base_expr_type_1, base_expr_type_2 >::type base_expr_type
KOKKOS_INLINE_FUNCTION PCE< Storage > log(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > log10(const PCE< Storage > &a)
Sacado::Promote< scalar_type_1, scalar_type_2 >::type scalar_type
Sacado::Promote< base_expr_type_1, base_expr_type_2 >::type base_expr_type
KOKKOS_INLINE_FUNCTION const val_type dx(int i, int j) const
KOKKOS_INLINE_FUNCTION PCE< Storage > asin(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > cos(const PCE< Storage > &a)