32 #ifndef SACADO_FAD_OPS_MP_VECTOR_HPP
33 #define SACADO_FAD_OPS_MP_VECTOR_HPP
35 #include "Sacado_Fad_Ops.hpp"
36 #include "Sacado_mpl_enable_if.hpp"
39 #define FAD_UNARYOP_MACRO(OPNAME,OP,MPVALUE,VALUE,DX,FASTACCESSDX) \
43 template <typename ExprT> \
44 class Expr< OP<ExprT>,ExprSpecMPVector > { \
47 typedef typename ExprT::value_type value_type; \
48 typedef typename ExprT::scalar_type scalar_type; \
49 typedef typename ExprT::base_expr_type base_expr_type; \
51 typedef typename value_type::value_type val_type; \
53 KOKKOS_INLINE_FUNCTION \
54 Expr(const ExprT& expr_) : expr(expr_) {} \
56 KOKKOS_INLINE_FUNCTION \
57 int size() const { return expr.size(); } \
59 KOKKOS_INLINE_FUNCTION \
60 bool hasFastAccess() const { return expr.hasFastAccess(); } \
62 KOKKOS_INLINE_FUNCTION \
63 bool isPassive() const { return expr.isPassive();} \
65 KOKKOS_INLINE_FUNCTION \
66 bool updateValue() const { return expr.updateValue(); } \
68 KOKKOS_INLINE_FUNCTION \
69 value_type val() const { \
73 KOKKOS_INLINE_FUNCTION \
74 val_type val(int j) const { \
78 KOKKOS_INLINE_FUNCTION \
79 val_type dx(int i, int j) const { \
83 KOKKOS_INLINE_FUNCTION \
84 val_type fastAccessDx(int i, int j) const { \
85 return FASTACCESSDX; \
101 expr.fastAccessDx(i,
j))
107 -expr.fastAccessDx(i,
j))
118 expr.dx(i,
j)/expr.val(
j),
119 expr.fastAccessDx(i,
j)/expr.val(
j))
125 expr.fastAccessDx(i,
j) / (
std::log(val_type(10))*expr.val(
j)))
128 std::sqrt(expr.
val()),
129 std::sqrt(expr.val(
j)),
130 expr.
dx(i,j)/(val_type(2)* std::sqrt(expr.val(j))),
131 expr.
fastAccessDx(i,j)/(val_type(2)* std::sqrt(expr.val(j))))
134 std::cos(expr.val()),
135 std::cos(expr.val(j)),
136 -expr.
dx(i,j)* std::
sin(expr.val(j)),
140 std::sin(expr.val()),
141 std::sin(expr.val(j)),
142 expr.
dx(i,j)* std::cos(expr.val(j)),
146 std::tan(expr.val()),
147 std::tan(expr.val(j)),
149 (val_type(1)+ std::tan(expr.val(j))* std::tan(expr.val(j))),
151 (val_type(1)+ std::tan(expr.val(j))* std::tan(expr.val(j))))
154 std::acos(expr.val()),
155 std::acos(expr.val(j)),
156 -expr.
dx(i,j)/ std::sqrt(val_type(1)-expr.val(j)*expr.val(j)),
158 std::sqrt(val_type(1)-expr.val(j)*expr.val(j)))
161 std::asin(expr.val()),
162 std::asin(expr.val(j)),
163 expr.
dx(i,j)/ std::sqrt(val_type(1)-expr.val(j)*expr.val(j)),
165 std::sqrt(val_type(1)-expr.val(j)*expr.val(j)))
168 std::atan(expr.val()),
169 std::atan(expr.val(j)),
170 expr.
dx(i,j)/(val_type(1)+expr.val(j)*expr.val(j)),
171 expr.
fastAccessDx(i,j)/(val_type(1)+expr.val(j)*expr.val(j)))
174 std::cosh(expr.val()),
175 std::cosh(expr.val(j)),
176 expr.
dx(i,j)* std::
sinh(expr.val(j)),
180 std::sinh(expr.val()),
181 std::sinh(expr.val(j)),
182 expr.
dx(i,j)* std::cosh(expr.val(j)),
186 std::tanh(expr.val()),
187 std::tanh(expr.val(j)),
188 expr.
dx(i,j)/( std::cosh(expr.val(j))* std::cosh(expr.val(j))),
190 ( std::cosh(expr.val(j))* std::cosh(expr.val(j))))
193 std::acosh(expr.val()),
194 std::acosh(expr.val(j)),
195 expr.
dx(i,j)/ std::sqrt((expr.val(j)-val_type(1)) *
196 (expr.val(j)+val_type(1))),
197 expr.
fastAccessDx(i,j)/ std::sqrt((expr.val(j)-val_type(1)) *
198 (expr.val(j)+val_type(1))))
201 std::asinh(expr.val()),
202 std::asinh(expr.val(j)),
203 expr.
dx(i,j)/ std::sqrt(val_type(1)+expr.val(j)*expr.val(j)),
205 expr.val(j)*expr.val(j)))
208 std::atanh(expr.val()),
209 std::atanh(expr.val(j)),
210 expr.
dx(i,j)/(val_type(1)-expr.val(j)*expr.val(j)),
212 expr.val(j)*expr.val(j)))
215 std::abs(expr.val()),
216 std::abs(expr.val(j)),
217 expr.val(j) >= 0 ? val_type(+expr.
dx(i,j)) :
218 val_type(-expr.
dx(i,j)),
223 std::fabs(expr.val()),
224 std::fabs(expr.val(j)),
225 expr.val(j) >= 0 ? val_type(+expr.
dx(i,j)) :
226 val_type(-expr.
dx(i,j)),
231 std::cbrt(expr.val()),
232 std::cbrt(expr.val(j)),
233 expr.
dx(i,j)/(val_type(3)*std::cbrt(expr.val(j)*expr.val(j))),
234 expr.
fastAccessDx(i,j)/(val_type(3)*std::cbrt(expr.val(j)*expr.val(j))))
236 #undef FAD_UNARYOP_MACRO
238 #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) \
242 template <typename ExprT1, typename ExprT2> \
243 class Expr< OP< ExprT1, ExprT2 >,ExprSpecMPVector > { \
247 typedef typename ExprT1::value_type value_type_1; \
248 typedef typename ExprT2::value_type value_type_2; \
249 typedef typename Sacado::Promote<value_type_1, \
250 value_type_2>::type value_type; \
252 typedef typename ExprT1::scalar_type scalar_type_1; \
253 typedef typename ExprT2::scalar_type scalar_type_2; \
254 typedef typename Sacado::Promote<scalar_type_1, \
255 scalar_type_2>::type scalar_type; \
257 typedef typename ExprT1::base_expr_type base_expr_type_1; \
258 typedef typename ExprT2::base_expr_type base_expr_type_2; \
259 typedef typename Sacado::Promote<base_expr_type_1, \
260 base_expr_type_2>::type base_expr_type; \
262 typedef typename value_type::value_type val_type; \
264 KOKKOS_INLINE_FUNCTION \
265 Expr(const ExprT1& expr1_, const ExprT2& expr2_) : \
266 expr1(expr1_), expr2(expr2_) {} \
268 KOKKOS_INLINE_FUNCTION \
270 int sz1 = expr1.size(), sz2 = expr2.size(); \
271 return sz1 > sz2 ? sz1 : sz2; \
274 KOKKOS_INLINE_FUNCTION \
275 bool hasFastAccess() const { \
276 return expr1.hasFastAccess() && expr2.hasFastAccess(); \
279 KOKKOS_INLINE_FUNCTION \
280 bool isPassive() const { \
281 return expr1.isPassive() && expr2.isPassive(); \
284 KOKKOS_INLINE_FUNCTION \
285 bool updateValue() const { \
286 return expr1.updateValue() && expr2.updateValue(); \
289 KOKKOS_INLINE_FUNCTION \
290 const value_type val() const { \
294 KOKKOS_INLINE_FUNCTION \
295 const val_type val(int j) const { \
299 KOKKOS_INLINE_FUNCTION \
300 const val_type dx(int i, int j) const { \
304 KOKKOS_INLINE_FUNCTION \
305 const val_type fastAccessDx(int i, int j) const { \
306 return FASTACCESSDX; \
311 const ExprT1& expr1; \
312 const ExprT2& expr2; \
316 template <typename ExprT1, typename T2> \
317 class Expr< OP< ExprT1, ConstExpr<T2> >,ExprSpecMPVector > { \
321 typedef ConstExpr<T2> ConstT; \
322 typedef ConstExpr<T2> ExprT2; \
323 typedef typename ExprT1::value_type value_type_1; \
324 typedef typename ExprT2::value_type value_type_2; \
325 typedef typename Sacado::Promote<value_type_1, \
326 value_type_2>::type value_type; \
328 typedef typename ExprT1::scalar_type scalar_type_1; \
329 typedef typename ExprT2::scalar_type scalar_type_2; \
330 typedef typename Sacado::Promote<scalar_type_1, \
331 scalar_type_2>::type scalar_type; \
333 typedef typename ExprT1::base_expr_type base_expr_type_1; \
334 typedef typename ExprT2::base_expr_type base_expr_type_2; \
335 typedef typename Sacado::Promote<base_expr_type_1, \
336 base_expr_type_2>::type base_expr_type; \
338 typedef typename value_type::value_type val_type; \
340 KOKKOS_INLINE_FUNCTION \
341 Expr(const ExprT1& expr1_, const ConstT& c_) : \
342 expr1(expr1_), c(c_) {} \
344 KOKKOS_INLINE_FUNCTION \
346 return expr1.size(); \
349 KOKKOS_INLINE_FUNCTION \
350 bool hasFastAccess() const { \
351 return expr1.hasFastAccess(); \
354 KOKKOS_INLINE_FUNCTION \
355 bool isPassive() const { \
356 return expr1.isPassive(); \
359 KOKKOS_INLINE_FUNCTION \
360 bool updateValue() const { return expr1.updateValue(); } \
362 KOKKOS_INLINE_FUNCTION \
363 const value_type val() const { \
364 return MPVAL_CONST_DX_2; \
367 KOKKOS_INLINE_FUNCTION \
368 const val_type val(int j) const { \
369 return VAL_CONST_DX_2; \
372 KOKKOS_INLINE_FUNCTION \
373 const val_type dx(int i, int j) const { \
377 KOKKOS_INLINE_FUNCTION \
378 const val_type fastAccessDx(int i, int j) const { \
379 return CONST_FASTACCESSDX_2; \
384 const ExprT1& expr1; \
388 template <typename T1, typename ExprT2> \
389 class Expr< OP< ConstExpr<T1>, ExprT2 >,ExprSpecMPVector > { \
393 typedef ConstExpr<T1> ConstT; \
394 typedef ConstExpr<T1> ExprT1; \
395 typedef typename ExprT1::value_type value_type_1; \
396 typedef typename ExprT2::value_type value_type_2; \
397 typedef typename Sacado::Promote<value_type_1, \
398 value_type_2>::type value_type; \
400 typedef typename ExprT1::scalar_type scalar_type_1; \
401 typedef typename ExprT2::scalar_type scalar_type_2; \
402 typedef typename Sacado::Promote<scalar_type_1, \
403 scalar_type_2>::type scalar_type; \
405 typedef typename ExprT1::base_expr_type base_expr_type_1; \
406 typedef typename ExprT2::base_expr_type base_expr_type_2; \
407 typedef typename Sacado::Promote<base_expr_type_1, \
408 base_expr_type_2>::type base_expr_type; \
410 typedef typename value_type::value_type val_type; \
412 KOKKOS_INLINE_FUNCTION \
413 Expr(const ConstT& c_, const ExprT2& expr2_) : \
414 c(c_), expr2(expr2_) {} \
416 KOKKOS_INLINE_FUNCTION \
418 return expr2.size(); \
421 KOKKOS_INLINE_FUNCTION \
422 bool hasFastAccess() const { \
423 return expr2.hasFastAccess(); \
426 KOKKOS_INLINE_FUNCTION \
427 bool isPassive() const { \
428 return expr2.isPassive(); \
431 KOKKOS_INLINE_FUNCTION \
432 bool updateValue() const { return expr2.updateValue(); } \
434 KOKKOS_INLINE_FUNCTION \
435 const value_type val() const { \
436 return MPVAL_CONST_DX_1; \
439 KOKKOS_INLINE_FUNCTION \
440 const val_type val(int j) const { \
441 return VAL_CONST_DX_1; \
444 KOKKOS_INLINE_FUNCTION \
445 const val_type dx(int i, int j) const { \
449 KOKKOS_INLINE_FUNCTION \
450 const val_type fastAccessDx(int i, int j) const { \
451 return CONST_FASTACCESSDX_1; \
457 const ExprT2& expr2; \
466 expr1.val() + expr2.val(),
467 expr1.val(j) + expr2.val(j),
468 expr1.dx(i,j) + expr2.dx(i,j),
469 expr1.fastAccessDx(i,j) + expr2.fastAccessDx(i,j),
470 c.val() + expr2.val(),
471 expr1.val() + c.val(),
472 c.val(j) + expr2.val(j),
473 expr1.val(j) + c.val(j),
476 expr2.fastAccessDx(i,j),
477 expr1.fastAccessDx(i,j))
480 expr1.val() - expr2.val(),
481 expr1.val(j) - expr2.val(j),
482 expr1.dx(i,j) - expr2.dx(i,j),
483 expr1.fastAccessDx(i,j) - expr2.fastAccessDx(i,j),
484 c.val() - expr2.val(),
485 expr1.val() - c.val(),
486 c.val(j) - expr2.val(j),
487 expr1.val(j) - c.val(j),
490 -expr2.fastAccessDx(i,j),
491 expr1.fastAccessDx(i,j))
509 expr1.val() / expr2.val(),
510 expr1.val(j) / expr2.val(j),
511 (expr1.dx(i,j)*expr2.val(j) - expr2.dx(i,j)*expr1.val(j)) /
512 (expr2.val(j)*expr2.val(j)),
513 (expr1.fastAccessDx(i,j)*expr2.val(j) -
514 expr2.fastAccessDx(i,j)*expr1.val(j)) /
515 (expr2.val(j)*expr2.val(j)),
516 c.val() / expr2.val(),
517 expr1.val() / c.val(),
518 c.val(j) / expr2.val(j),
519 expr1.val(j) / c.val(j),
520 -expr2.dx(i,j)*c.val(j) / (expr2.val(j)*expr2.val(j)),
521 expr1.dx(i,j)/c.val(j),
522 -expr2.fastAccessDx(i,j)*c.val(j) / (expr2.val(j)*expr2.val(j)),
523 expr1.fastAccessDx(i,j)/c.val(j))
528 (expr2.val(j)*expr1.dx(i,j) - expr1.val(j)*expr2.dx(i,j))/
529 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
530 (expr2.val(j)*expr1.fastAccessDx(i,j) - expr1.val(j)*expr2.fastAccessDx(i,j))/
531 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
536 (-c.val(j)*expr2.dx(i,j)) / (c.val(j)*c.val(j) + expr2.val(j)*expr2.val(j)),
537 (c.val(j)*expr1.dx(i,j))/ (expr1.val(j)*expr1.val(j) + c.val(j)*c.val(j)),
538 (-c.val(j)*expr2.fastAccessDx(i,j))/ (c.val(j)*c.val(j) + expr2.val(j)*expr2.val(j)),
539 (c.val(j)*expr1.fastAccessDx(i,j))/ (expr1.val(j)*expr1.val(j) + c.val(j)*c.val(j)))
542 std::pow(expr1.val(), expr2.val()),
543 std::pow(expr1.val(j), expr2.val(j)),
544 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))),
545 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))),
546 std::pow(c.val(), expr2.val()),
547 std::pow(expr1.val(), c.val()),
548 std::pow(c.val(j), expr2.val(j)),
549 std::pow(expr1.val(j), c.val(j)),
550 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))),
551 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))),
552 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))),
553 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))))
556 std::max(expr1.val(), expr2.val()),
557 std::max(expr1.val(j), expr2.val(j)),
558 expr1.val(j) >= expr2.val(j) ? expr1.
dx(i,j) : expr2.
dx(i,j),
559 expr1.val(j) >= expr2.val(j) ? expr1.
fastAccessDx(i,j) :
561 std::max(c.val(), expr2.val()),
562 std::max(expr1.val(), c.val()),
563 std::max(c.val(j), expr2.val(j)),
564 std::max(expr1.val(j), c.val(j)),
565 c.val(j) >= expr2.val(j) ? val_type(0) : expr2.
dx(i,j),
566 expr1.val(j) >= c.val(j) ? expr1.
dx(i,j) : val_type(0),
567 c.val(j) >= expr2.val(j) ? val_type(0) : expr2.
fastAccessDx(i,j),
568 expr1.val(j) >= c.val(j) ? expr1.
fastAccessDx(i,j) : val_type(0))
571 std::min(expr1.val(), expr2.val()),
572 std::min(expr1.val(j), expr2.val(j)),
573 expr1.val(j) <= expr2.val(j) ? expr1.
dx(i,j) : expr2.
dx(i,j),
574 expr1.val(j) <= expr2.val(j) ? expr1.
fastAccessDx(i,j) :
576 std::min(c.val(), expr2.val()),
577 std::min(expr1.val(), c.val()),
578 std::min(c.val(j), expr2.val(j)),
579 std::min(expr1.val(j), c.val(j)),
580 c.val(j) <= expr2.val(j) ? val_type(0) : expr2.
dx(i,j),
581 expr1.val(j) <= c.val(j) ? expr1.
dx(i,j) : val_type(0),
582 c.val(j) <= expr2.val(j) ? val_type(0) : expr2.
fastAccessDx(i,j),
583 expr1.val(j) <= c.val(j) ? expr1.
fastAccessDx(i,j) : val_type(0))
586 #undef FAD_BINARYOP_MACRO
591 template <
typename ExprT1,
typename ExprT2>
592 class Expr< MultiplicationOp< ExprT1, ExprT2 >,ExprSpecMPVector > {
598 typedef typename Sacado::Promote<value_type_1,
603 typedef typename Sacado::Promote<scalar_type_1,
606 typedef typename ExprT1::base_expr_type base_expr_type_1;
607 typedef typename ExprT2::base_expr_type base_expr_type_2;
608 typedef typename Sacado::Promote<base_expr_type_1,
609 base_expr_type_2>::type base_expr_type;
613 KOKKOS_INLINE_FUNCTION
614 Expr(
const ExprT1& expr1_,
const ExprT2& expr2_) :
615 expr1(expr1_), expr2(expr2_) {}
617 KOKKOS_INLINE_FUNCTION
619 int sz1 = expr1.size(), sz2 = expr2.size();
620 return sz1 > sz2 ? sz1 : sz2;
623 KOKKOS_INLINE_FUNCTION
624 bool hasFastAccess()
const {
625 return expr1.hasFastAccess() && expr2.hasFastAccess();
628 KOKKOS_INLINE_FUNCTION
629 bool isPassive()
const {
630 return expr1.isPassive() && expr2.isPassive();
633 KOKKOS_INLINE_FUNCTION
634 bool updateValue()
const {
635 return expr1.updateValue() && expr2.updateValue();
638 KOKKOS_INLINE_FUNCTION
640 return expr1.val()*expr2.val();
643 KOKKOS_INLINE_FUNCTION
644 const val_type
val(
int j)
const {
645 return expr1.val(j)*expr2.val(j);
648 KOKKOS_INLINE_FUNCTION
649 const val_type
dx(
int i,
int j)
const {
650 if (expr1.size() > 0 && expr2.size() > 0)
651 return expr1.val(j)*expr2.dx(i,j) + expr1.dx(i,j)*expr2.val(j);
652 else if (expr1.size() > 0)
653 return expr1.dx(i,j)*expr2.val(j);
655 return expr1.val(j)*expr2.dx(i,j);
658 KOKKOS_INLINE_FUNCTION
660 return expr1.val(j)*expr2.fastAccessDx(i,j) +
661 expr1.fastAccessDx(i,j)*expr2.val(j);
671 template <
typename ExprT1,
typename T2>
672 class Expr< MultiplicationOp< ExprT1, ConstExpr<T2> >,ExprSpecMPVector > {
695 KOKKOS_INLINE_FUNCTION
697 expr1(expr1_), c(c_) {}
699 KOKKOS_INLINE_FUNCTION
704 KOKKOS_INLINE_FUNCTION
706 return expr1.hasFastAccess();
709 KOKKOS_INLINE_FUNCTION
711 return expr1.isPassive();
714 KOKKOS_INLINE_FUNCTION
717 KOKKOS_INLINE_FUNCTION
719 return expr1.val()*c.val();
722 KOKKOS_INLINE_FUNCTION
723 const val_type
val(
int j)
const {
724 return expr1.val(j)*c.val(j);
727 KOKKOS_INLINE_FUNCTION
728 const val_type
dx(
int i,
int j)
const {
729 return expr1.dx(i,j)*c.val(j);
732 KOKKOS_INLINE_FUNCTION
734 return expr1.fastAccessDx(i,j)*c.val(j);
743 template <
typename T1,
typename ExprT2>
744 class Expr< MultiplicationOp< ConstExpr<T1>, ExprT2 >,ExprSpecMPVector > {
767 KOKKOS_INLINE_FUNCTION
769 c(c_), expr2(expr2_) {}
771 KOKKOS_INLINE_FUNCTION
776 KOKKOS_INLINE_FUNCTION
778 return expr2.hasFastAccess();
781 KOKKOS_INLINE_FUNCTION
783 return expr2.isPassive();
786 KOKKOS_INLINE_FUNCTION
789 KOKKOS_INLINE_FUNCTION
791 return c.val()*expr2.val();
794 KOKKOS_INLINE_FUNCTION
795 const val_type
val(
int j)
const {
796 return c.val(j)*expr2.val(j);
799 KOKKOS_INLINE_FUNCTION
800 const val_type
dx(
int i,
int j)
const {
801 return c.val(j)*expr2.dx(i,j);
804 KOKKOS_INLINE_FUNCTION
806 return c.val(j)*expr2.fastAccessDx(i,j);
815 template <
typename ExprT>
816 KOKKOS_INLINE_FUNCTION
817 bool toBool(
const Expr<ExprT,ExprSpecMPVector>& x) {
818 bool is_zero = (x.val() == 0.0);
819 for (
int i=0; i<x.size(); i++)
820 for (
int j=0; j<x.val().size(); ++
j)
821 is_zero = is_zero && (x.dx(i,j) == 0.0);
825 template <
typename ExprT>
826 std::ostream& operator << (std::ostream& os, const Expr<ExprT,ExprSpecMPVector>& x) {
827 os << x.val() <<
" [";
829 for (
int i=0; i< x.size(); i++) {
831 for (
int j=0; j<x.val().size(); ++
j) {
832 os <<
" " << x.dx(i,j);
843 #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)
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)