Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ vari_value() [2/3]

template<typename T >
template<typename S , require_eigen_t< S > * = nullptr, require_vt_same< T, S > * = nullptr>
stan::math::vari_value< T, require_matrix_cl_t< T > >::vari_value ( const S &  x)
inlineexplicit

Construct a matrix_cl variable implementation from an Eigen value.

The adjoint is initialized to zero.

All constructed variables are added to the stack. Variables should be constructed before variables on which they depend to insure proper partial derivative propagation. During derivative propagation, the chain() method of each variable will be called in the reverse order of construction.

Template Parameters
SA dense Eigen value or expression that has same scalar type as T
Parameters
xValue of the constructed variable.

Definition at line 228 of file vari.hpp.