// @HEADER // ***************************************************************************** // Sacado Package // // Copyright 2006 NTESS and the Sacado contributors. // SPDX-License-Identifier: LGPL-2.1-or-later // // *********************************************************************** // // The forward-mode AD classes in Sacado are a derivative work of the // expression template classes in the Fad package by Nicolas Di Cesare. // The following banner is included in the original Fad source code: // // ************ DO NOT REMOVE THIS BANNER **************** // // Nicolas Di Cesare // http://www.ann.jussieu.fr/~dicesare // // CEMRACS 98 : C++ courses, // templates : new C++ techniques // for scientific computing // //******************************************************** // // A short implementation ( not all operators and // functions are overloaded ) of 1st order Automatic // Differentiation in forward mode (FAD) using // EXPRESSION TEMPLATES. // //******************************************************** // @HEADER #ifndef SACADO_FAD_OPS_FWD_HPP #define SACADO_FAD_OPS_FWD_HPP #include namespace Sacado { template struct IsSimdType; template struct IsFad; template struct ValueType; namespace Fad { template class UnaryPlusOp; template class UnaryMinusOp; template class ExpOp; template class LogOp; template class Log10Op; template class SqrtOp; template class CosOp; template class SinOp; template class TanOp; template class ACosOp; template class ASinOp; template class ATanOp; template class CoshOp; template class SinhOp; template class TanhOp; template class ACoshOp; template class ASinhOp; template class ATanhOp; template class AbsOp; template class FAbsOp; template class CbrtOp; template ::value> class SafeSqrtOp; template class AdditionOp; template class SubtractionOp; template class Multiplicationp; template class DivisionOp; template class Atan2Op; template class MaxOp; template class MinOp; namespace PowerImpl { struct Simd {}; struct Nested {}; struct NestedSimd {}; struct Scalar {}; template struct Selector { static constexpr bool is_simd = IsSimdType::value || IsSimdType::value; static constexpr bool is_fad = IsFad< typename Sacado::ValueType::type >::value || IsFad< typename Sacado::ValueType::type >::value; typedef typename std::conditional< is_simd && is_fad, NestedSimd, typename std::conditional< is_simd, Simd, typename std::conditional< is_fad, Nested, Scalar>::type >::type >::type type; }; } template ::type> class PowerOp; } // namespace Fad } // namespace Sacado #endif // SACADO_FAD_EXPRESSION_HPP