Automatic Differentiation
 
Loading...
Searching...
No Matches
is_kernel_expression.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_IS_KERNEL_EXPRESSION_HPP
2#define STAN_MATH_OPENCL_KERNEL_GENERATOR_IS_KERNEL_EXPRESSION_HPP
3
10#include <type_traits>
11
12namespace stan {
13
28
33template <typename T, typename = void>
35 : bool_constant<std::is_base_of<operation_cl_base,
36 std::remove_reference_t<T>>::value> {};
37template <typename T>
39 : std::true_type {};
40
46template <typename T>
48 : bool_constant<is_kernel_expression_and_not_scalar<T>::value
49 || std::is_arithmetic<std::remove_reference_t<T>>::value> {
50};
51
56template <typename... Types>
59
64template <typename... Types>
67
72template <typename T, typename = void>
74 : bool_constant<std::is_base_of<operation_cl_lhs_base,
75 std::remove_reference_t<T>>::value> {};
76template <typename T>
77struct is_kernel_expression_lhs<T, require_matrix_cl_t<T>> : std::true_type {};
78
82template <typename T>
84 : math::conjunction<is_var<T>, is_kernel_expression<value_type_t<T>>> {};
85
90template <typename T>
92 : math::disjunction<is_kernel_expression<T>, is_rev_kernel_expression<T>> {
93};
94
99template <typename T>
102 is_kernel_expression_and_not_scalar<T>,
103 math::conjunction<is_var<T>, is_kernel_expression_and_not_scalar<
104 value_type_t<T>>>> {};
105
115template <typename T>
127template <typename T>
130
133template <typename T>
146template <typename... Types>
160template <typename T>
163
167template <typename T>
170
174template <typename... Types>
177
181template <typename... Types>
184
188template <typename... Types>
193} // namespace stan
194
195#endif
Non-templated base of operation_cl is needed for easy checking if something is a subclass of operatio...
Non-templated base of operation_cl_lhs is needed for easy checking if something is a subclass of oper...
require_t< is_kernel_expression_lhs< std::decay_t< T > > > require_kernel_expression_lhs_t
Require type satisfies is_kernel_expression_lhs.
require_t< is_matrix_cl< std::decay_t< T > > > require_matrix_cl_t
Require type satisfies is_matrix_cl.
require_any_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< Types > >... > require_any_nonscalar_prim_or_rev_kernel_expression_t
Require any of the types satisfy is_nonscalar_prim_or_rev_kernel_expression.
require_not_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< T > > > require_not_nonscalar_prim_or_rev_kernel_expression_t
Require type does not satisfy is_nonscalar_prim_or_rev_kernel_expression.
require_all_not_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< Types > >... > require_all_not_nonscalar_prim_or_rev_kernel_expression_t
Require none of the types satisfy is_nonscalar_prim_or_rev_kernel_expression.
require_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< T > > > require_nonscalar_prim_or_rev_kernel_expression_t
Require type satisfies is_nonscalar_prim_or_rev_kernel_expression.
require_all_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< Types > >... > require_all_nonscalar_prim_or_rev_kernel_expression_t
Require all of the types satisfy is_nonscalar_prim_or_rev_kernel_expression.
require_all_t< is_kernel_expression< Types >... > require_all_kernel_expressions_t
Enables a template if all given types are are a valid kernel generator expressions.
require_all_t< is_kernel_expression_and_not_scalar< Types >... > require_all_kernel_expressions_and_none_scalar_t
Enables a template if all given types are non-scalar types that are a valid kernel generator expressi...
require_all_t< is_prim_or_rev_kernel_expression< std::decay_t< Types > >... > require_all_prim_or_rev_kernel_expression_t
Require type satisfies is_prim_or_rev_kernel_expression.
require_t< is_rev_kernel_expression< std::decay_t< T > > > require_rev_kernel_expression_t
Require type satisfies is_rev_kernel_expression.
require_not_t< is_rev_kernel_expression< std::decay_t< T > > > require_not_rev_kernel_expression_t
Require type does not satisfy is_rev_kernel_expression.
std::enable_if_t<!Check::value > require_not_t
If condition is false, template is disabled.
std::enable_if_t< math::disjunction< Checks... >::value > require_any_t
If any condition is true, template is enabled.
std::enable_if_t<!math::disjunction< Checks... >::value > require_all_not_t
If all conditions are false, template is enabled.
std::enable_if_t< Check::value > require_t
If condition is true, template is enabled.
std::enable_if_t< math::conjunction< Checks... >::value > require_all_t
If all conditions are true, template is enabled Returns a type void if all conditions are true and ot...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Determines whether a type is non-scalar type that is a valid kernel generator expression.
Determines whether a type is an assignable kernel generator expression.
Determines whether a type is is a valid kernel generator expression.
Determines whether a type is either a non-scalar kernel generator expression or a var containing a no...
Determines whether a type is either a kernel generator expression or a var containing a kernel genera...
Determines whether a type is a var containing a kernel generator expression.
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...
Extends std::false_type when instantiated with zero or more template parameters, all of which extend ...