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

◆ ordered_logistic()

__kernel void stan::math::opencl_kernels::ordered_logistic ( __global double *  logp_global,
__global double *  lambda_derivative,
__global double *  cuts_derivative,
const __global int *  y_global,
const __global double *  lambda_global,
const __global double *  cuts,
const int  N_instances,
const int  N_classes,
const int  is_y_vector,
const int  is_cuts_matrix,
const int  need_lambda_derivative,
const int  need_cuts_derivative 
)

GPU implementation of ordinal regression.

Must be run with at least N_instances threads and local size equal to LOCAL_SIZE_.

Parameters
[out]logp_globalpartially summed log probability (1 value per work group)
[out]lambda_derivativederivative wrt lambda
[out]cuts_derivativepartially summed derivative wrt cuts (1 column per work group)
[in]y_globala scalar or vector of classes.
[in]lambda_globalvector of continuous lambda variables
[in]cutscutpoints vector
N_instancesnumber of cases
N_classesnumber of classes
is_y_vector0 or 1 - whether y is a vector (alternatively it is a scalar we need to broadcast)
is_cuts_matrix0 or 1 - whether cuts is a matrix (alternatively it is a vector we need to broadcast)
need_lambda_derivative0 or 1 - whether lambda_derivative needs to be computed
need_cuts_derivative0 or 1 - whether cuts_derivative needs to be computed

Definition at line 41 of file ordered_logistic_lpmf.hpp.