Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | Public Attributes | List of all members
stan::math::cholesky_opencl Class Reference

#include <cholesky_decompose.hpp>

Inheritance diagram for stan::math::cholesky_opencl:
stan::math::vari

Public Member Functions

 cholesky_opencl (const Eigen::Matrix< var, -1, -1 > &A, const Eigen::Matrix< double, -1, -1 > &L_A)
 Constructor for OpenCL cholesky function. More...
 
void symbolic_rev (matrix_cl &L, matrix_cl &L_adj)
 Symbolic adjoint calculation for cholesky factor A. More...
 
virtual void chain ()
 Reverse mode differentiation algorithm using OpenCL. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (double x)
 Construct a variable implementation from a value. More...
 
 vari (double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 

Public Attributes

int M_
 
vari ** vari_ref_A_
 
vari ** vari_ref_L_
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from stan::math::vari
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 

Detailed Description

Definition at line 254 of file cholesky_decompose.hpp.

Constructor & Destructor Documentation

◆ cholesky_opencl()

stan::math::cholesky_opencl::cholesky_opencl ( const Eigen::Matrix< var, -1, -1 > &  A,
const Eigen::Matrix< double, -1, -1 > &  L_A 
)
inline

Constructor for OpenCL cholesky function.

Stores varis for A. Instantiates and stores varis for L. Instantiates and stores dummy vari for upper triangular part of var result returned in cholesky_decompose function call

variRefL aren't on the chainable autodiff stack, only used for storage and computation. Note that varis for L are constructed externally in cholesky_decompose.

Parameters
Amatrix
L_Amatrix, cholesky factor of A

Definition at line 275 of file cholesky_decompose.hpp.

Member Function Documentation

◆ chain()

virtual void stan::math::cholesky_opencl::chain ( )
inlinevirtual

Reverse mode differentiation algorithm using OpenCL.

Reference:

Iain Murray: Differentiation of the Cholesky decomposition, 2016.

Reimplemented from stan::math::vari.

Definition at line 318 of file cholesky_decompose.hpp.

◆ symbolic_rev()

void stan::math::cholesky_opencl::symbolic_rev ( matrix_cl L,
matrix_cl L_adj 
)
inline

Symbolic adjoint calculation for cholesky factor A.

Parameters
Lcholesky factor
L_adjmatrix of adjoints of L

Definition at line 299 of file cholesky_decompose.hpp.

Member Data Documentation

◆ M_

int stan::math::cholesky_opencl::M_

Definition at line 256 of file cholesky_decompose.hpp.

◆ vari_ref_A_

vari** stan::math::cholesky_opencl::vari_ref_A_

Definition at line 257 of file cholesky_decompose.hpp.

◆ vari_ref_L_

vari** stan::math::cholesky_opencl::vari_ref_L_

Definition at line 258 of file cholesky_decompose.hpp.


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

     [ Stan Home Page ] © 2011–2018, Stan Development Team.