Fermat
Public Types | Public Methods | Public Members | List of all members
cugar::diff_var< ValType, N, 0 > Struct Template Reference

Detailed description

template<typename ValType, uint32 N>
struct cugar::diff_var< ValType, N, 0 >

Specialization of diff_var to 0-order (i.e. a variable not carrying any differential) This class allows to represent variables that carry associated differentials up to a specified compile-time order with respect to a predefined set of variables

Template Parameters
ValTypethe value type of the expression
Nthe number of variables the expression is differentiated against
Othe order of differentiation

#include <diff.h>

Public Types

typedef ValType value_type
 
typedef ValType diff_component_type
 
typedef Vector< diff_component_type, N > diff_type
 

Public Methods

CUGAR_HOST_DEVICE diff_var ()
 
CUGAR_HOST_DEVICE diff_var (const diff_var< ValType, N, 0 > &_other)
 
CUGAR_HOST_DEVICE diff_var (value_type _u)
 
CUGAR_HOST_DEVICE operator value_type () const
 
CUGAR_HOST_DEVICE diff_varoperator= (const value_type &_u)
 
CUGAR_HOST_DEVICE diff_type diff () const
 

Public Members

value_type u
 

Constructor & Destructor Documentation

◆ diff_var() [1/3]

template<typename ValType , uint32 N>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, N, 0 >::diff_var ( )
inline

default constructor

◆ diff_var() [2/3]

template<typename ValType , uint32 N>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, N, 0 >::diff_var ( const diff_var< ValType, N, 0 > &  _other)
inline

copy constructor

◆ diff_var() [3/3]

template<typename ValType , uint32 N>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, N, 0 >::diff_var ( value_type  _u)
inlineexplicit

constructor from scalar

Parameters
_uscalar value

Member Function Documentation

◆ diff()

template<typename ValType , uint32 N>
CUGAR_HOST_DEVICE diff_type cugar::diff_var< ValType, N, 0 >::diff ( ) const
inline

return the first-order differential

◆ operator value_type()

template<typename ValType , uint32 N>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, N, 0 >::operator value_type ( ) const
inline

conversion to scalar

◆ operator=()

template<typename ValType , uint32 N>
CUGAR_HOST_DEVICE diff_var& cugar::diff_var< ValType, N, 0 >::operator= ( const value_type &  _u)
inline

assignment to scalar


The documentation for this struct was generated from the following file: