42 #ifndef SACADO_FAD_EXP_MP_VECTOR_HPP
43 #define SACADO_FAD_EXP_MP_VECTOR_HPP
64 typename std::enable_if<
65 Sacado::is_mp_vector<typename T::value_type>::value >::type
85 KOKKOS_INLINE_FUNCTION
89 KOKKOS_INLINE_FUNCTION
93 KOKKOS_INLINE_FUNCTION
95 return this->size() ? this->dx_[i].fastAccessCoeff(j) :
val_type(0.0);
99 KOKKOS_INLINE_FUNCTION
101 return this->dx_[i].fastAccessCoeff(j);
105 KOKKOS_INLINE_FUNCTION
107 return this->dx_[i].fastAccessCoeff(j);
113 template <
typename DstType>
116 typename std::enable_if<
117 std::is_same< typename DstType::expr_spec_type, ExprSpecMPVector >::value
126 static const int VecNum = Sacado::StaticSize<value_type>::value;
129 template <
typename SrcType>
130 KOKKOS_INLINE_FUNCTION
133 const int xsz = x.size();
135 if (xsz != dst.size())
136 dst.resizeAndZero(xsz);
138 const int sz = dst.size();
146 if (x.hasFastAccess()) {
147 SACADO_FAD_DERIV_LOOP(i,sz)
148 for (
int j=0;
j<VecNum; ++
j)
149 dst.fastAccessDx(i,
j) = x.fastAccessDx(i,
j);
152 SACADO_FAD_DERIV_LOOP(i,sz)
153 for (
int j=0;
j<VecNum; ++
j)
154 dst.fastAccessDx(i,
j) = x.dx(i,
j);
157 for (
int j=0;
j<VecNum; ++
j)
158 dst.val(
j) = x.val(
j);
162 template <
typename SrcType>
163 KOKKOS_INLINE_FUNCTION
166 const int xsz = x.size(), sz = dst.size();
168 #if defined(SACADO_DEBUG) && !defined(__CUDA_ARCH__ )
169 if ((xsz != sz) && (xsz != 0) && (sz != 0))
170 throw "Fad Error: Attempt to assign with incompatible sizes";
175 if (x.hasFastAccess())
176 SACADO_FAD_DERIV_LOOP(i,sz)
177 for (
int j=0;
j<VecNum; ++
j)
178 dst.fastAccessDx(i,
j) += x.fastAccessDx(i,
j);
180 for (
int i=0; i<sz; ++i)
181 for (
int j=0;
j<VecNum; ++
j)
182 dst.fastAccessDx(i,
j) += x.dx(i,
j);
185 dst.resizeAndZero(xsz);
186 if (x.hasFastAccess())
187 SACADO_FAD_DERIV_LOOP(i,xsz)
188 for (
int j=0;
j<VecNum; ++
j)
189 dst.fastAccessDx(i,
j) = x.fastAccessDx(i,
j);
191 SACADO_FAD_DERIV_LOOP(i,xsz)
192 for (
int j=0;
j<VecNum; ++
j)
193 dst.fastAccessDx(i,
j) = x.dx(i,
j);
197 for (
int j=0;
j<VecNum; ++
j)
198 dst.val(
j) += x.val(
j);
202 template <
typename SrcType>
203 KOKKOS_INLINE_FUNCTION
206 const int xsz = x.size(), sz = dst.size();
208 #if defined(SACADO_DEBUG) && !defined(__CUDA_ARCH__ )
209 if ((xsz != sz) && (xsz != 0) && (sz != 0))
210 throw "Fad Error: Attempt to assign with incompatible sizes";
215 if (x.hasFastAccess())
216 SACADO_FAD_DERIV_LOOP(i,sz)
217 for (
int j=0;
j<VecNum; ++
j)
218 dst.fastAccessDx(i,
j) -= x.fastAccessDx(i,
j);
220 SACADO_FAD_DERIV_LOOP(i,sz)
221 for (
int j=0;
j<VecNum; ++
j)
222 dst.fastAccessDx(i,
j) -= x.dx(i,
j);
225 dst.resizeAndZero(xsz);
226 if (x.hasFastAccess())
227 SACADO_FAD_DERIV_LOOP(i,xsz)
228 for (
int j=0;
j<VecNum; ++
j)
229 dst.fastAccessDx(i,
j) = -x.fastAccessDx(i,
j);
231 SACADO_FAD_DERIV_LOOP(i,xsz)
232 for (
int j=0;
j<VecNum; ++
j)
233 dst.fastAccessDx(i,
j) = -x.dx(i,
j);
237 for (
int j=0;
j<VecNum; ++
j)
238 dst.val(
j) -= x.val(
j);
242 template <
typename SrcType>
243 KOKKOS_INLINE_FUNCTION
246 const int xsz = x.size(), sz = dst.size();
250 #if defined(SACADO_DEBUG) && !defined(__CUDA_ARCH__ )
251 if ((xsz != sz) && (xsz != 0) && (sz != 0))
252 throw "Fad Error: Attempt to assign with incompatible sizes";
257 if (x.hasFastAccess())
258 SACADO_FAD_DERIV_LOOP(i,sz)
259 for (
int j=0;
j<VecNum; ++
j)
260 dst.fastAccessDx(i) = v.fastAccessCoeff(
j)*x.fastAccessDx(i,
j) + dst.fastAccessDx(i,
j)*xval.fastAccessCoeff(
j);
262 SACADO_FAD_DERIV_LOOP(i,sz)
263 for (
int j=0;
j<VecNum; ++
j)
264 dst.fastAccessDx(i) = v.fastAccessCoeff(
j)*x.dx(i,
j) + dst.fastAccessDx(i,
j)*xval.fastAccessCoeff(
j);
267 dst.resizeAndZero(xsz);
268 if (x.hasFastAccess())
269 SACADO_FAD_DERIV_LOOP(i,xsz)
270 for (
int j=0;
j<VecNum; ++
j)
271 dst.fastAccessDx(i,
j) = v.fastAccessCoeff(
j)*x.fastAccessDx(i,
j);
273 SACADO_FAD_DERIV_LOOP(i,xsz)
274 for (
int j=0;
j<VecNum; ++
j)
275 dst.fastAccessDx(i,
j) = v.fastAccessCoeff(
j)*x.dx(i,
j);
280 SACADO_FAD_DERIV_LOOP(i,sz)
281 for (
int j=0;
j<VecNum; ++
j)
282 dst.fastAccessDx(i,
j) *= xval.fastAccessCoeff(
j);
286 for (
int j=0;
j<VecNum; ++
j)
287 dst.val(
j) *= xval.fastAccessCoeff(
j);
291 template <
typename SrcType>
292 KOKKOS_INLINE_FUNCTION
295 const int xsz = x.size(), sz = dst.size();
299 #if defined(SACADO_DEBUG) && !defined(__CUDA_ARCH__ )
300 if ((xsz != sz) && (xsz != 0) && (sz != 0))
301 throw "Fad Error: Attempt to assign with incompatible sizes";
307 if (x.hasFastAccess())
308 SACADO_FAD_DERIV_LOOP(i,sz)
309 for (
int j=0;
j<VecNum; ++
j)
310 dst.fastAccessDx(i,
j) =
311 ( dst.fastAccessDx(i,
j)*xval.fastAccessCoeff(
j) - v.fastAccessCoeff(
j)*x.fastAccessDx(i,
j) ) / xval2.fastAccessCoeff(
j);
313 SACADO_FAD_DERIV_LOOP(i,sz)
314 for (
int j=0;
j<VecNum; ++
j)
315 dst.fastAccessDx(i,
j) =
316 ( dst.fastAccessDx(i,
j)*xval.fastAccessCoeff(
j) - v.fastAccessCoeff(
j)*x.dx(i,
j) ) / xval2.fastAccessCoeff(
j);
319 dst.resizeAndZero(xsz);
320 if (x.hasFastAccess())
321 SACADO_FAD_DERIV_LOOP(i,xsz)
322 for (
int j=0;
j<VecNum; ++
j)
323 dst.fastAccessDx(i,
j) = - v.fastAccessCoeff(
j)*x.fastAccessDx(i,
j) / xval2.fastAccessCoeff(
j);
325 SACADO_FAD_DERIV_LOOP(i,xsz)
326 for (
int j=0;
j<VecNum; ++
j)
327 dst.fastAccessDx(i,
j) = -v.fastAccessCoeff(
j)*x.dx(i,
j) / xval2.fastAccessCoeff(
j);
332 SACADO_FAD_DERIV_LOOP(i,sz)
333 for (
int j=0;
j<VecNum; ++
j)
334 dst.fastAccessDx(i,
j) /= xval.fastAccessCoeff(
j);
338 for (
int j=0;
j<VecNum; ++
j)
339 dst.val(
j) /= xval.fastAccessCoeff(
j);
348 template <
typename DstType>
351 typename std::enable_if<
352 Sacado::IsStaticallySized<DstType>::value &&
353 std::is_same< typename DstType::expr_spec_type, ExprSpecMPVector >::value
362 static const int VecNum = Sacado::StaticSize<value_type>::value;
365 template <
typename SrcType>
366 KOKKOS_INLINE_FUNCTION
369 const int sz = dst.size();
370 SACADO_FAD_DERIV_LOOP(i,sz)
371 for (
int j=0;
j<VecNum; ++
j)
372 dst.fastAccessDx(i,
j) = x.fastAccessDx(i,
j);
373 for (
int j=0;
j<VecNum; ++
j)
374 dst.val(
j) = x.val(
j);
378 template <
typename SrcType>
379 KOKKOS_INLINE_FUNCTION
382 const int sz = dst.size();
383 SACADO_FAD_DERIV_LOOP(i,sz)
384 for (
int j=0;
j<VecNum; ++
j)
385 dst.fastAccessDx(i,
j) += x.fastAccessDx(i,
j);
386 for (
int j=0;
j<VecNum; ++
j)
387 dst.val(
j) += x.val(
j);
391 template <
typename SrcType>
392 KOKKOS_INLINE_FUNCTION
395 const int sz = dst.size();
396 SACADO_FAD_DERIV_LOOP(i,sz)
397 for (
int j=0;
j<VecNum; ++
j)
398 dst.fastAccessDx(i,
j) -= x.fastAccessDx(i,
j);
399 for (
int j=0;
j<VecNum; ++
j)
400 dst.val(
j) -= x.val(
j);
404 template <
typename SrcType>
405 KOKKOS_INLINE_FUNCTION
408 const int sz = dst.size();
411 SACADO_FAD_DERIV_LOOP(i,sz)
412 for (
int j=0;
j<VecNum; ++
j)
413 dst.fastAccessDx(i,
j) = v.fastAccessCoeff(
j)*x.fastAccessDx(i,
j) + dst.fastAccessDx(i,
j)*xval.fastAccessCoeff(
j);
414 for (
int j=0;
j<VecNum; ++
j)
415 dst.val(
j) *= xval.fastAccessCoeff(
j);
419 template <
typename SrcType>
420 KOKKOS_INLINE_FUNCTION
423 const int sz = dst.size();
427 SACADO_FAD_DERIV_LOOP(i,sz)
428 for (
int j=0;
j<VecNum; ++
j)
429 dst.fastAccessDx(i,
j) =
430 ( dst.fastAccessDx(i,
j)*xval.fastAccessCoeff(
j) - v.fastAccessCoeff(
j)*x.fastAccessDx(i,
j) )/ xval2.fastAccessCoeff(
j);
431 for (
int j=0;
j<VecNum; ++
j)
432 dst.val(
j) /= xval.fastAccessCoeff(
j);
443 #include "Sacado_Fad_Exp_Ops.hpp"
445 #define FAD_UNARYOP_MACRO(OPNAME,OP,USING,MPVALUE,VALUE,DX,FASTACCESSDX) \
450 template <typename T> \
451 class OP< T,ExprSpecMPVector > : \
452 public Expr< OP< T,ExprSpecMPVector > > { \
455 typedef typename std::remove_cv<T>::type ExprT; \
456 typedef typename ExprT::value_type value_type; \
457 typedef typename ExprT::scalar_type scalar_type; \
459 typedef typename value_type::value_type val_type; \
461 typedef ExprSpecMPVector expr_spec_type; \
463 KOKKOS_INLINE_FUNCTION \
464 OP(const T& expr_) : expr(expr_) {} \
466 KOKKOS_INLINE_FUNCTION \
467 int size() const { return expr.size(); } \
469 KOKKOS_INLINE_FUNCTION \
470 bool hasFastAccess() const { \
471 return expr.hasFastAccess(); \
474 KOKKOS_INLINE_FUNCTION \
475 value_type val() const { \
480 KOKKOS_INLINE_FUNCTION \
481 val_type val(int j) const { \
486 KOKKOS_INLINE_FUNCTION \
487 val_type dx(int i, int j) const { \
492 KOKKOS_INLINE_FUNCTION \
493 val_type fastAccessDx(int i, int j) const { \
495 return FASTACCESSDX; \
514 expr.fastAccessDx(i,
j))
521 -expr.fastAccessDx(i,
j))
528 exp(expr.val(
j))*expr.fastAccessDx(i,
j))
534 expr.dx(i,
j)/expr.val(
j),
535 expr.fastAccessDx(i,
j)/expr.val(
j))
552 using std::cos; using std::
sin;,
555 -expr.
dx(i,j)* sin(expr.val()),
559 using std::cos; using std::sin;,
562 expr.
dx(i,j)* cos(expr.val()),
570 (
value_type(1)+ tan(expr.val())* tan(expr.val())),
572 (
value_type(1)+ tan(expr.val())* tan(expr.val())))
575 using std::acos; using std::sqrt;,
578 -expr.
dx(i,j)/ sqrt(
value_type(1)-expr.val()*expr.val()),
583 using std::asin; using std::sqrt;,
586 expr.
dx(i,j)/ sqrt(
value_type(1)-expr.val()*expr.val()),
598 using std::cosh; using std::
sinh;,
601 expr.
dx(i,j)* sinh(expr.val()),
605 using std::cosh; using std::sinh;,
608 expr.
dx(i,j)* cosh(expr.val()),
612 using std::tanh; using std::cosh;,
615 expr.
dx(i,j)/( cosh(expr.val())* cosh(expr.val())),
617 ( cosh(expr.val())* cosh(expr.val())))
620 using std::acosh; using std::sqrt;,
625 expr.
fastAccessDx(i,j)/ sqrt((expr.val()-value_type(1)) *
626 (expr.val()+value_type(1))))
629 using std::asinh; using std::sqrt;,
632 expr.
dx(i,j)/ sqrt(value_type(1)+expr.val()*expr.val()),
634 expr.val()*expr.val()))
640 expr.
dx(i,j)/(value_type(1)-expr.val()*expr.val()),
642 expr.val()*expr.val()))
662 expr.
dx(i,j)/(value_type(3)*cbrt(expr.val()*expr.val())),
665 #undef FAD_UNARYOP_MACRO
676 template <
typename ConstType,
typename ValueType>
677 struct ConstTypeRef {
678 typedef ValueType type;
681 template <
typename ValueType>
682 struct ConstTypeRef<ValueType, ValueType> {
683 typedef ValueType& type;
689 #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) \
694 template <typename T1, typename T2 > \
695 class OP< T1, T2, false, false, ExprSpecMPVector > : \
696 public Expr< OP< T1, T2, false, false, ExprSpecMPVector > > { \
699 typedef typename std::remove_cv<T1>::type ExprT1; \
700 typedef typename std::remove_cv<T2>::type ExprT2; \
701 typedef typename ExprT1::value_type value_type_1; \
702 typedef typename ExprT2::value_type value_type_2; \
703 typedef typename Sacado::Promote<value_type_1, \
704 value_type_2>::type value_type; \
706 typedef typename ExprT1::scalar_type scalar_type_1; \
707 typedef typename ExprT2::scalar_type scalar_type_2; \
708 typedef typename Sacado::Promote<scalar_type_1, \
709 scalar_type_2>::type scalar_type; \
711 typedef typename value_type::value_type val_type; \
713 typedef ExprSpecMPVector expr_spec_type; \
715 KOKKOS_INLINE_FUNCTION \
716 OP(const T1& expr1_, const T2& expr2_) : \
717 expr1(expr1_), expr2(expr2_) {} \
719 KOKKOS_INLINE_FUNCTION \
721 const int sz1 = expr1.size(), sz2 = expr2.size(); \
722 return sz1 > sz2 ? sz1 : sz2; \
725 KOKKOS_INLINE_FUNCTION \
726 bool hasFastAccess() const { \
727 return expr1.hasFastAccess() && expr2.hasFastAccess(); \
730 KOKKOS_INLINE_FUNCTION \
731 value_type val() const { \
736 KOKKOS_INLINE_FUNCTION \
737 val_type val(int j) const { \
742 KOKKOS_INLINE_FUNCTION \
743 val_type dx(int i, int j) const { \
745 const int sz1 = expr1.size(), sz2 = expr2.size(); \
746 if (sz1 > 0 && sz2 > 0) \
754 KOKKOS_INLINE_FUNCTION \
755 val_type fastAccessDx(int i, int j) const { \
757 return FASTACCESSDX; \
767 template <typename T1, typename T2> \
768 class OP< T1, T2, false, true, ExprSpecMPVector > : \
769 public Expr< OP< T1, T2, false, true, ExprSpecMPVector > > { \
772 typedef typename std::remove_cv<T1>::type ExprT1; \
774 typedef typename ExprT1::value_type value_type; \
775 typedef typename ExprT1::scalar_type scalar_type; \
777 typedef typename value_type::value_type val_type; \
779 typedef ExprSpecMPVector expr_spec_type; \
781 KOKKOS_INLINE_FUNCTION \
782 OP(const T1& expr1_, const ConstT& c_) : \
783 expr1(expr1_), c(c_) {} \
785 KOKKOS_INLINE_FUNCTION \
787 return expr1.size(); \
790 KOKKOS_INLINE_FUNCTION \
791 bool hasFastAccess() const { \
792 return expr1.hasFastAccess(); \
795 KOKKOS_INLINE_FUNCTION \
796 value_type val() const { \
798 return MPVAL_CONST_DX_2; \
801 KOKKOS_INLINE_FUNCTION \
802 val_type val(int j) const { \
804 return VAL_CONST_DX_2; \
807 KOKKOS_INLINE_FUNCTION \
808 val_type dx(int i, int j) const { \
813 KOKKOS_INLINE_FUNCTION \
814 val_type fastAccessDx(int i, int j) const { \
816 return CONST_FASTACCESSDX_2; \
822 const typename ConstTypeRef<ConstT,value_type>::type c; \
825 template <typename T1, typename T2> \
826 class OP< T1, T2, true, false,ExprSpecMPVector > : \
827 public Expr< OP< T1, T2, true, false, ExprSpecMPVector > > { \
830 typedef typename std::remove_cv<T2>::type ExprT2; \
832 typedef typename ExprT2::value_type value_type; \
833 typedef typename ExprT2::scalar_type scalar_type; \
835 typedef typename value_type::value_type val_type; \
837 typedef ExprSpecMPVector expr_spec_type; \
839 KOKKOS_INLINE_FUNCTION \
840 OP(const ConstT& c_, const T2& expr2_) : \
841 c(c_), expr2(expr2_) {} \
843 KOKKOS_INLINE_FUNCTION \
845 return expr2.size(); \
848 KOKKOS_INLINE_FUNCTION \
849 bool hasFastAccess() const { \
850 return expr2.hasFastAccess(); \
853 KOKKOS_INLINE_FUNCTION \
854 value_type val() const { \
856 return MPVAL_CONST_DX_1; \
859 KOKKOS_INLINE_FUNCTION \
860 val_type val(int j) const { \
862 return VAL_CONST_DX_1; \
865 KOKKOS_INLINE_FUNCTION \
866 val_type dx(int i, int j) const { \
871 KOKKOS_INLINE_FUNCTION \
872 val_type fastAccessDx(int i, int j) const { \
874 return CONST_FASTACCESSDX_1; \
879 const typename ConstTypeRef<ConstT,value_type>::type c; \
892 expr1.val() + expr2.val(),
893 expr1.val(j) + expr2.val(j),
894 expr1.dx(i,j) + expr2.dx(i,j),
897 expr1.fastAccessDx(i,j) + expr2.fastAccessDx(i,j),
900 c.fastAccessCoeff(j) + expr2.val(j),
901 expr1.val(j) + c.fastAccessCoeff(j),
904 expr2.fastAccessDx(i,j),
905 expr1.fastAccessDx(i,j))
909 expr1.val() - expr2.val(),
910 expr1.val(j) - expr2.val(j),
911 expr1.dx(i,j) - expr2.dx(i,j),
914 expr1.fastAccessDx(i,j) - expr2.fastAccessDx(i,j),
917 c.fastAccessCoeff(j) - expr2.val(j),
918 expr1.val(j) - c.fastAccessCoeff(j),
921 -expr2.fastAccessDx(i,j),
922 expr1.fastAccessDx(i,j))
926 expr1.val() * expr2.val(),
927 expr1.val(j) * expr2.val(j),
928 expr1.val(j)*expr2.dx(i,j) + expr1.dx(i,j)*expr2.val(j),
929 expr1.val(j)*expr2.dx(i,j),
930 expr1.dx(i,j)*expr2.val(j),
931 expr1.val(j)*expr2.fastAccessDx(i,j) +
932 expr1.fastAccessDx(i,j)*expr2.val(j),
935 c.fastAccessCoeff(j) * expr2.val(j),
936 expr1.val(j) * c.fastAccessCoeff(j),
937 c.fastAccessCoeff(j)*expr2.dx(i,j),
938 expr1.dx(i,j)*c.fastAccessCoeff(j),
939 c.fastAccessCoeff(j)*expr2.fastAccessDx(i,j),
940 expr1.fastAccessDx(i,j)*c.fastAccessCoeff(j))
944 expr1.val() / expr2.val(),
945 expr1.val(j) / expr2.val(j),
946 (expr1.dx(i,j)*expr2.val(j) - expr2.dx(i,j)*expr1.val(j)) /
947 (expr2.val(j)*expr2.val(j)),
948 -expr2.dx(i,j)*expr1.val(j) / (expr2.val(j)*expr2.val(j)),
949 expr1.dx(i,j)/expr2.val(j),
950 (expr1.fastAccessDx(i,j)*expr2.val(j) -
951 expr2.fastAccessDx(i,j)*expr1.val(j)) /
952 (expr2.val(j)*expr2.val(j)),
955 c.fastAccessCoeff(j) / expr2.val(j),
956 expr1.val(j) / c.fastAccessCoeff(j),
957 -expr2.dx(i,j)*c.fastAccessCoeff(j) / (expr2.val(j)*expr2.val(j)),
958 expr1.dx(i,j)/c.fastAccessCoeff(j),
959 -expr2.fastAccessDx(i,j)*c.fastAccessCoeff(j) / (expr2.val(j)*expr2.val(j)),
960 expr1.fastAccessDx(i,j)/c.fastAccessCoeff(j))
964 atan2(expr1.val(), expr2.val()),
965 atan2(expr1.val(j), expr2.val(j)),
966 (expr2.val(j)*expr1.dx(i,j) - expr1.val(j)*expr2.dx(i,j))/
967 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
968 -expr1.val(j)*expr2.dx(i,j)/
969 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
970 expr2.val(j)*expr1.dx(i,j)/
971 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
972 (expr2.val(j)*expr1.fastAccessDx(i,j) - expr1.val(j)*expr2.fastAccessDx(i,j))/
973 (expr1.val(j)*expr1.val(j) + expr2.val(j)*expr2.val(j)),
974 atan2(c, expr2.val()),
975 atan2(expr1.val(), c),
976 atan2(c.fastAccessCoeff(j), expr2.val(j)),
977 atan2(expr1.val(j), c.fastAccessCoeff(j)),
978 (-c.fastAccessCoeff(j)*expr2.dx(i,j)) / (c.fastAccessCoeff(j)*c.fastAccessCoeff(j) + expr2.val(j)*expr2.val(j)),
979 (c.fastAccessCoeff(j)*expr1.dx(i,j))/ (expr1.val(j)*expr1.val(j) + c.fastAccessCoeff(j)*c.fastAccessCoeff(j)),
980 (-c.fastAccessCoeff(j)*expr2.fastAccessDx(i,j))/ (c.fastAccessCoeff(j)*c.fastAccessCoeff(j) + expr2.val(j)*expr2.val(j)),
981 (c.fastAccessCoeff(j)*expr1.fastAccessDx(i,j))/ (expr1.val(j)*expr1.val(j) + c.fastAccessCoeff(j)*c.fastAccessCoeff(j)))
1002 if_then_else( expr1.val() >= expr2.val(), expr1.val(), expr2.val() ),
1003 if_then_else( expr1.val(j) >= expr2.val(j), expr1.val(j), expr2.val(j) ),
1004 if_then_else( expr1.val(j) >= expr2.val(j), expr1.
dx(i,j), expr2.
dx(i,j) ),
1005 if_then_else( expr1.val(j) >= expr2.val(j), val_type(0.0), expr2.
dx(i,j) ),
1006 if_then_else( expr1.val(j) >= expr2.val(j), expr1.
dx(i,j), val_type(0.0) ),
1019 if_then_else( expr1.val() <= expr2.val(), expr1.val(), expr2.val() ),
1020 if_then_else( expr1.val(j) <= expr2.val(j), expr1.val(j), expr2.val(j) ),
1021 if_then_else( expr1.val(j) <= expr2.val(j), expr1.
dx(i,j), expr2.
dx(i,j) ),
1022 if_then_else( expr1.val(j) <= expr2.val(j), val_type(0.0), expr2.
dx(i,j) ),
1023 if_then_else( expr1.val(j) <= expr2.val(j), expr1.
dx(i,j), val_type(0.0) ),
1045 template <
typename T1,
typename T2>
1046 class PowerOp< T1, T2, false, false, ExprSpecMPVector, true > :
1047 public Expr< PowerOp< T1, T2, false, false, ExprSpecMPVector, true > > {
1050 typedef typename std::remove_cv<T1>::type ExprT1;
1051 typedef typename std::remove_cv<T2>::type ExprT2;
1054 typedef typename Sacado::Promote<value_type_1,
1059 typedef typename Sacado::Promote<scalar_type_1,
1064 typedef ExprSpecMPVector expr_spec_type;
1066 KOKKOS_INLINE_FUNCTION
1067 PowerOp(
const T1& expr1_,
const T2& expr2_) :
1068 expr1(expr1_), expr2(expr2_) {}
1070 KOKKOS_INLINE_FUNCTION
1072 const int sz1 = expr1.size(), sz2 = expr2.size();
1073 return sz1 > sz2 ? sz1 : sz2;
1076 KOKKOS_INLINE_FUNCTION
1077 bool hasFastAccess()
const {
1078 return expr1.hasFastAccess() && expr2.hasFastAccess();
1081 KOKKOS_INLINE_FUNCTION
1082 value_type
val()
const {
1084 return pow(expr1.val(), expr2.val());
1087 KOKKOS_INLINE_FUNCTION
1088 val_type
val(
int j)
const {
1090 return pow(expr1.val(j), expr2.val(j));
1093 KOKKOS_INLINE_FUNCTION
1094 val_type
dx(
int i,
int j)
const {
1096 const int sz1 = expr1.size(), sz2 = expr2.size();
1097 if (sz1 > 0 && sz2 > 0)
1098 return if_then_else( expr1.val(j) == val_type(0.0), val_type(0.0), val_type((expr2.dx(i,j)*
log(expr1.val(j))+expr2.val(j)*expr1.dx(i,j)/expr1.val(j))*
pow(expr1.val(j),expr2.val(j))) );
1102 return if_then_else( expr1.val(j) == val_type(0.0), val_type(0.0), val_type(expr2.val(j)*expr1.dx(i,j)/expr1.val(j)*
pow(expr1.val(j),expr2.val(j))) );
1104 return if_then_else( expr1.val(j) == val_type(0.0), val_type(0.0), val_type(expr2.dx(i,j)*
log(expr1.val(j))*
pow(expr1.val(j),expr2.val(j))) );
1107 KOKKOS_INLINE_FUNCTION
1110 return if_then_else( expr1.val(j) == val_type(0.0), val_type(0.0), val_type((expr2.fastAccessDx(i,j)*
log(expr1.val(j))+expr2.val(j)*expr1.fastAccessDx(i,j)/expr1.val(j))*
pow(expr1.val(j),expr2.val(j))) );
1120 template <
typename T1,
typename T2>
1121 class PowerOp< T1, T2, false, true, ExprSpecMPVector, true >
1122 :
public Expr< PowerOp< T1, T2, false, true, ExprSpecMPVector, true > > {
1125 typedef typename std::remove_cv<T1>::type ExprT1;
1132 typedef ExprSpecMPVector expr_spec_type;
1134 KOKKOS_INLINE_FUNCTION
1135 PowerOp(
const T1& expr1_,
const ConstT& c_) :
1136 expr1(expr1_), c(c_) {}
1138 KOKKOS_INLINE_FUNCTION
1140 return expr1.size();
1143 KOKKOS_INLINE_FUNCTION
1144 bool hasFastAccess()
const {
1145 return expr1.hasFastAccess();
1148 KOKKOS_INLINE_FUNCTION
1149 value_type
val()
const {
1151 return pow(expr1.val(), c);
1154 KOKKOS_INLINE_FUNCTION
1155 val_type
val(
int j)
const {
1157 return pow(expr1.val(j), c.fastAccessCoeff(j));
1160 KOKKOS_INLINE_FUNCTION
1161 val_type
dx(
int i,
int j)
const {
1165 return if_then_else( expr1.val(j) == val_type(0.0), val_type(0.0), val_type(c.fastAccessCoeff(j)*expr1.dx(i,j)/expr1.val(j)*
pow(expr1.val(j),c.fastAccessCoeff(j))) );
1168 KOKKOS_INLINE_FUNCTION
1173 return if_then_else( expr1.val(j) == val_type(0.0), val_type(0.0), val_type(c.fastAccessCoeff(j)*expr1.fastAccessDx(i,j)/expr1.val(j)*
pow(expr1.val(j),c.fastAccessCoeff(j))) );
1182 template <
typename T1,
typename T2>
1183 class PowerOp< T1, T2, true, false, ExprSpecMPVector, true >
1184 :
public Expr< PowerOp< T1, T2, true, false, ExprSpecMPVector, true > > {
1187 typedef typename std::remove_cv<T2>::type ExprT2;
1194 typedef ExprSpecMPVector expr_spec_type;
1196 KOKKOS_INLINE_FUNCTION
1197 PowerOp(
const ConstT& c_,
const T2& expr2_) :
1198 c(c_), expr2(expr2_) {}
1200 KOKKOS_INLINE_FUNCTION
1202 return expr2.size();
1205 KOKKOS_INLINE_FUNCTION
1206 bool hasFastAccess()
const {
1207 return expr2.hasFastAccess();
1210 KOKKOS_INLINE_FUNCTION
1211 value_type
val()
const {
1213 return pow(c, expr2.val());
1216 KOKKOS_INLINE_FUNCTION
1217 val_type
val(
int j)
const {
1219 return pow(c.fastAccessCoeff(j), expr2.val(j));
1222 KOKKOS_INLINE_FUNCTION
1223 val_type
dx(
int i,
int j)
const {
1225 return if_then_else( c.fastAccessCoeff(j) == val_type(0.0), val_type(0.0), val_type(expr2.dx(i,j)*
log(c.fastAccessCoeff(j))*
pow(c.fastAccessCoeff(j),expr2.val(j))) );
1228 KOKKOS_INLINE_FUNCTION
1231 return if_then_else( c.fastAccessCoeff(j) == val_type(0.0), val_type(0.0), val_type(expr2.fastAccessDx(i,j)*
log(c.fastAccessCoeff(j))*
pow(c.fastAccessCoeff(j),expr2.val(j))) );
1244 template <
typename T1,
typename T2>
1245 class PowerOp< T1, T2, false, false, ExprSpecMPVector, false > :
1246 public Expr< PowerOp< T1, T2, false, false, ExprSpecMPVector, false > > {
1249 typedef typename std::remove_cv<T1>::type ExprT1;
1250 typedef typename std::remove_cv<T2>::type ExprT2;
1253 typedef typename Sacado::Promote<value_type_1,
1258 typedef typename Sacado::Promote<scalar_type_1,
1263 typedef ExprSpecMPVector expr_spec_type;
1265 KOKKOS_INLINE_FUNCTION
1266 PowerOp(
const T1& expr1_,
const T2& expr2_) :
1267 expr1(expr1_), expr2(expr2_) {}
1269 KOKKOS_INLINE_FUNCTION
1271 const int sz1 = expr1.size(), sz2 = expr2.size();
1272 return sz1 > sz2 ? sz1 : sz2;
1275 KOKKOS_INLINE_FUNCTION
1276 bool hasFastAccess()
const {
1277 return expr1.hasFastAccess() && expr2.hasFastAccess();
1280 KOKKOS_INLINE_FUNCTION
1281 value_type
val()
const {
1283 return pow(expr1.val(), expr2.val());
1286 KOKKOS_INLINE_FUNCTION
1287 val_type
val(
int j)
const {
1289 return pow(expr1.val(j), expr2.val(j));
1292 KOKKOS_INLINE_FUNCTION
1293 val_type
dx(
int i,
int j)
const {
1295 const int sz1 = expr1.size(), sz2 = expr2.size();
1296 if (sz1 > 0 && sz2 > 0)
1297 return expr1.val(j) == val_type(0.0) ? val_type(0.0) : val_type((expr2.dx(i,j)*
log(expr1.val(j))+expr2.val(j)*expr1.dx(i,j)/expr1.val(j))*
pow(expr1.val(j),expr2.val(j)));
1301 return expr1.val(j) == val_type(0.0) ? val_type(0.0) : val_type(expr2.val(j)*expr1.dx(i,j)/expr1.val(j)*
pow(expr1.val(j),expr2.val(j)));
1303 return expr1.val(j) == val_type(0.0) ? val_type(0.0) : val_type(expr2.dx(i,j)*
log(expr1.val(j))*
pow(expr1.val(j),expr2.val(j)));
1306 KOKKOS_INLINE_FUNCTION
1309 return expr1.val(j) == val_type(0.0) ? val_type(0.0) : val_type((expr2.fastAccessDx(i,j)*
log(expr1.val(j))+expr2.val(j)*expr1.fastAccessDx(i,j)/expr1.val(j))*
pow(expr1.val(j),expr2.val(j)));
1319 template <
typename T1,
typename T2>
1320 class PowerOp< T1, T2, false, true, ExprSpecMPVector, false >
1321 :
public Expr< PowerOp< T1, T2, false, true, ExprSpecMPVector, false > > {
1324 typedef typename std::remove_cv<T1>::type ExprT1;
1331 typedef ExprSpecMPVector expr_spec_type;
1333 KOKKOS_INLINE_FUNCTION
1334 PowerOp(
const T1& expr1_,
const ConstT& c_) :
1335 expr1(expr1_), c(c_) {}
1337 KOKKOS_INLINE_FUNCTION
1339 return expr1.size();
1342 KOKKOS_INLINE_FUNCTION
1343 bool hasFastAccess()
const {
1344 return expr1.hasFastAccess();
1347 KOKKOS_INLINE_FUNCTION
1348 value_type
val()
const {
1350 return pow(expr1.val(), c);
1353 KOKKOS_INLINE_FUNCTION
1354 val_type
val(
int j)
const {
1356 return pow(expr1.val(j), c.fastAccessCoeff(j));
1359 KOKKOS_INLINE_FUNCTION
1360 val_type
dx(
int i,
int j)
const {
1364 return expr1.val(j) == val_type(0.0) ? val_type(0.0) : val_type(c.fastAccessCoeff(j)*expr1.dx(i,j)/expr1.val(j)*
pow(expr1.val(j),c.fastAccessCoeff(j)));
1367 KOKKOS_INLINE_FUNCTION
1372 return expr1.val(j) == val_type(0.0) ? val_type(0.0) : val_type(c.fastAccessCoeff(j)*expr1.fastAccessDx(i,j)/expr1.val(j)*
pow(expr1.val(j),c.fastAccessCoeff(j)));
1381 template <
typename T1,
typename T2>
1382 class PowerOp< T1, T2, true, false, ExprSpecMPVector, false >
1383 :
public Expr< PowerOp< T1, T2, true, false, ExprSpecMPVector, false > > {
1386 typedef typename std::remove_cv<T2>::type ExprT2;
1393 typedef ExprSpecMPVector expr_spec_type;
1395 KOKKOS_INLINE_FUNCTION
1396 PowerOp(
const ConstT& c_,
const T2& expr2_) :
1397 c(c_), expr2(expr2_) {}
1399 KOKKOS_INLINE_FUNCTION
1401 return expr2.size();
1404 KOKKOS_INLINE_FUNCTION
1405 bool hasFastAccess()
const {
1406 return expr2.hasFastAccess();
1409 KOKKOS_INLINE_FUNCTION
1410 value_type
val()
const {
1412 return pow(c, expr2.val());
1415 KOKKOS_INLINE_FUNCTION
1416 val_type
val(
int j)
const {
1418 return pow(c.fastAccessCoeff(j), expr2.val(j));
1421 KOKKOS_INLINE_FUNCTION
1422 val_type
dx(
int i,
int j)
const {
1424 return c.fastAccessCoeff(j) == val_type(0.0) ? val_type(0.0) : val_type(expr2.dx(i,j)*
log(c.fastAccessCoeff(j))*
pow(c.fastAccessCoeff(j),expr2.val(j)));
1427 KOKKOS_INLINE_FUNCTION
1430 return c.fastAccessCoeff(j) == val_type(0.0) ? val_type(0.0) : val_type(expr2.fastAccessDx(i,j)*
log(c.fastAccessCoeff(j))*
pow(c.fastAccessCoeff(j),expr2.val(j)));
1451 template <
typename CondT,
typename T1,
typename T2>
1453 public Expr< IfThenElseOp< CondT, T1, T2, false, false, ExprSpecMPVector > > {
1457 typedef typename std::remove_cv<T1>::type
ExprT1;
1458 typedef typename std::remove_cv<T2>::type
ExprT2;
1473 KOKKOS_INLINE_FUNCTION
1475 cond(cond_), expr1(expr1_), expr2(expr2_) {}
1477 KOKKOS_INLINE_FUNCTION
1479 int sz1 = expr1.size(), sz2 = expr2.size();
1480 return sz1 > sz2 ? sz1 : sz2;
1483 KOKKOS_INLINE_FUNCTION
1485 return expr1.hasFastAccess() && expr2.hasFastAccess();
1488 KOKKOS_INLINE_FUNCTION
1493 KOKKOS_INLINE_FUNCTION
1495 return if_then_else( cond, expr1.val(j), expr2.val(j) );
1498 KOKKOS_INLINE_FUNCTION
1500 return if_then_else( cond, expr1.dx(i,j), expr2.dx(i,j) );
1503 KOKKOS_INLINE_FUNCTION
1505 return if_then_else( cond, expr1.fastAccessDx(i,j), expr2.fastAccessDx(i,j) );
1516 template <
typename CondT,
typename T1,
typename T2>
1518 public Expr< IfThenElseOp< CondT, T1, T2, false, true, ExprSpecMPVector > > {
1522 typedef typename std::remove_cv<T1>::type
ExprT1;
1529 KOKKOS_INLINE_FUNCTION
1531 cond(cond_), expr1(expr1_), c(c_) {}
1533 KOKKOS_INLINE_FUNCTION
1535 return expr1.size();
1538 KOKKOS_INLINE_FUNCTION
1540 return expr1.hasFastAccess();
1543 KOKKOS_INLINE_FUNCTION
1548 KOKKOS_INLINE_FUNCTION
1550 return if_then_else( cond, expr1.val(j), c.fastAccessCoeff(j) );
1553 KOKKOS_INLINE_FUNCTION
1558 KOKKOS_INLINE_FUNCTION
1567 const typename ConstTypeRef<ConstT,value_type>::type
c;
1570 template <
typename CondT,
typename T1,
typename T2>
1572 public Expr< IfThenElseOp< CondT, T1, T2, true, false, ExprSpecMPVector > > {
1576 typedef typename std::remove_cv<T2>::type
ExprT2;
1585 KOKKOS_INLINE_FUNCTION
1587 cond(cond_), c(c_), expr2(expr2_) {}
1589 KOKKOS_INLINE_FUNCTION
1591 return expr2.size();
1594 KOKKOS_INLINE_FUNCTION
1596 return expr2.hasFastAccess();
1599 KOKKOS_INLINE_FUNCTION
1604 KOKKOS_INLINE_FUNCTION
1606 return if_then_else( cond, c.fastAccessCoeff(j), expr2.val(j) );
1609 KOKKOS_INLINE_FUNCTION
1614 KOKKOS_INLINE_FUNCTION
1622 const typename ConstTypeRef<ConstT,value_type>::type
c;
1630 #undef FAD_BINARYOP_MACRO
1632 #endif // SACADO_FAD_EXP_MP_VECTOR_HPP
static KOKKOS_INLINE_FUNCTION void assign_plus_equal(DstType &dst, const SrcType &x)
Implementation of dst += x.
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION val_type dx(int i, int j) const
KOKKOS_INLINE_FUNCTION PCE< Storage > fabs(const PCE< Storage > &a)
value_type::value_type val_type
KOKKOS_INLINE_FUNCTION PCE< Storage > tan(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION IfThenElseOp(const CondT &cond_, const ConstT &c_, const T2 &expr2_)
std::remove_cv< T2 >::type ExprT2
std::remove_cv< T1 >::type ExprT1
ExprSpecMPVector expr_spec_type
KOKKOS_INLINE_FUNCTION const val_type & val(int j) const
Returns value.
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
const ConstTypeRef< ConstT, value_type >::type c
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
ExprT1::value_type value_type_1
KOKKOS_INLINE_FUNCTION PCE< Storage > pow(const PCE< Storage > &a, const PCE< Storage > &b)
DstType::value_type value_type
Typename of values.
value_type::value_type val_type
KOKKOS_INLINE_FUNCTION IfThenElseOp(const CondT &cond_, const T1 &expr1_, const ConstT &c_)
value_type::value_type val_type
static KOKKOS_INLINE_FUNCTION void assign_minus_equal(DstType &dst, const SrcType &x)
Implementation of dst -= x.
KOKKOS_INLINE_FUNCTION val_type dx(int i, int j) const
static KOKKOS_INLINE_FUNCTION void assign_times_equal(DstType &dst, const SrcType &x)
Implementation of dst *= x.
KOKKOS_INLINE_FUNCTION PCE< Storage > tanh(const PCE< Storage > &a)
DstType::value_type value_type
Typename of values.
#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)
Sacado::Promote< value_type_1, value_type_2 >::type value_type
static KOKKOS_INLINE_FUNCTION void assign_divide_equal(DstType &dst, const SrcType &x)
Implementation of dst /= x.
static KOKKOS_INLINE_FUNCTION void assign_plus_equal(DstType &dst, const SrcType &x)
Implementation of dst += x.
ExprT1::value_type value_type
KOKKOS_INLINE_FUNCTION bool hasFastAccess() const
static KOKKOS_INLINE_FUNCTION void assign_minus_equal(DstType &dst, const SrcType &x)
Implementation of dst -= x.
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 val_type fastAccessDx(int i, int j) const
KOKKOS_INLINE_FUNCTION const val_type & fastAccessDx(int i, int j) const
Returns derivative component i without bounds checking.
ExprT2::value_type value_type_2
KOKKOS_INLINE_FUNCTION val_type dx(int i, int j) const
Returns derivative component i with bounds checking.
KOKKOS_INLINE_FUNCTION val_type val(int j) const
static KOKKOS_INLINE_FUNCTION void assign_times_equal(DstType &dst, const SrcType &x)
Implementation of dst *= x.
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MaxOp
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
ExprT2::scalar_type scalar_type_2
ExprSpecMPVector expr_spec_type
KOKKOS_INLINE_FUNCTION PCE< Storage > max(const typename PCE< Storage >::value_type &a, const PCE< Storage > &b)
KOKKOS_INLINE_FUNCTION val_type fastAccessDx(int i, int j) const
expr expr expr expr fastAccessDx(i, j)) FAD_UNARYOP_MACRO(exp
KOKKOS_INLINE_FUNCTION PCE< Storage > cosh(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION val_type fastAccessDx(int i, int j) const
Sacado::Promote< scalar_type_1, scalar_type_2 >::type scalar_type
#define FAD_UNARYOP_MACRO(OPNAME, OP, USING, MPVALUE, VALUE, DX, FASTACCESSDX)
std::remove_cv< T1 >::type ExprT1
static KOKKOS_INLINE_FUNCTION void assign_equal(DstType &dst, const SrcType &x)
Implementation of dst = x.
if_then_else(expr.val() >=0, expr.dx(i, j), value_type(-expr.dx(i, j)))
KOKKOS_INLINE_FUNCTION PCE< Storage > abs(const PCE< Storage > &a)
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c fastAccessCoeff(j)-expr2.val(j)
ExprT2::scalar_type scalar_type
value_type::value_type val_type
static KOKKOS_INLINE_FUNCTION void assign_equal(DstType &dst, const SrcType &x)
Implementation of dst = x.
KOKKOS_INLINE_FUNCTION int size() const
KOKKOS_INLINE_FUNCTION PCE< Storage > atan(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > exp(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION int size() const
KOKKOS_INLINE_FUNCTION int size() const
KOKKOS_INLINE_FUNCTION val_type & val(int j)
Returns value.
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MinOp
ExprSpecMPVector expr_spec_type
KOKKOS_INLINE_FUNCTION bool hasFastAccess() const
ExprT1::scalar_type scalar_type_1
KOKKOS_INLINE_FUNCTION value_type val() const
ExprT1::scalar_type scalar_type
KOKKOS_INLINE_FUNCTION val_type & fastAccessDx(int i, int j)
Returns derivative component i without bounds checking.
expr expr expr expr ExpOp
KOKKOS_INLINE_FUNCTION val_type dx(int i, int j) const
std::remove_cv< T2 >::type ExprT2
KOKKOS_INLINE_FUNCTION PCE< Storage > sin(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION bool hasFastAccess() const
static KOKKOS_INLINE_FUNCTION void assign_divide_equal(DstType &dst, const SrcType &x)
Implementation of dst /= x.
KOKKOS_INLINE_FUNCTION PCE< Storage > log(const PCE< Storage > &a)
Expression template specialization tag for Fad< MP::Vector >
KOKKOS_INLINE_FUNCTION PCE< Storage > log10(const PCE< Storage > &a)
const ConstTypeRef< ConstT, value_type >::type c
KOKKOS_INLINE_FUNCTION PCE< Storage > asin(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION value_type val() const
KOKKOS_INLINE_FUNCTION PCE< Storage > cos(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION val_type val(int j) const
KOKKOS_INLINE_FUNCTION IfThenElseOp(const CondT &cond_, const T1 &expr1_, const T2 &expr2_)
ExprT2::value_type value_type
KOKKOS_INLINE_FUNCTION value_type val() const
KOKKOS_INLINE_FUNCTION val_type val(int j) const