Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::ref_type_for_opencl< T, typename > Struct Template Reference

Detailed Description

template<typename T, typename = void>
struct stan::math::ref_type_for_opencl< T, typename >

Determines appropriate type for assigning expression of given type to, so that the resulting type has directly accessible contiguous colum-major data, which is needed to copy to OpenCL device for construction of matrix_cl.

THis is similar to ref_type except this also copies expressions, which do not have contiguous data (in both dimensions) or have row major storage order.

Warning: if a variable of this type could be assigned a rvalue, make sure template parameter T is of correct reference type (rvalue).

Template Parameters
Ttype to determine reference for

Definition at line 25 of file ref_type_for_opencl.hpp.

#include <ref_type_for_opencl.hpp>

Public Types

using T_val = std::remove_reference_t< T >
 
using T_plain_col_major = std::conditional_t< std::is_same< typename Eigen::internal::traits< T_val >::XprKind, Eigen::MatrixXpr >::value, Eigen::Matrix< value_type_t< T >, T_val::RowsAtCompileTime, T_val::ColsAtCompileTime >, Eigen::Array< value_type_t< T >, T_val::RowsAtCompileTime, T_val::ColsAtCompileTime > >
 
using T_pinned = math::pinned_matrix< T_plain_col_major >
 
using T_optionally_ref = std::conditional_t< std::is_rvalue_reference< T >::value, T_val, const T & >
 
using T_val_derived = std::decay_t< decltype(std::declval< T_val >().derived())>
 
using type = std::conditional_t< Eigen::internal::traits< Eigen::Ref< std::decay_t< T_plain_col_major > > >::template match< T_val_derived >::MatchAtCompileTime &&(Eigen::internal::evaluator< T_val_derived >::Flags &Eigen::LinearAccessBit) &&(Eigen::internal::evaluator< T_val_derived >::Flags &Eigen::PacketAccessBit), T_optionally_ref, T_pinned >
 

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