1#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_UNARY_OPERATION_CL_HPP
2#define STAN_MATH_OPENCL_KERNEL_GENERATOR_UNARY_OPERATION_CL_HPP
22template <
typename Derived,
typename T,
typename Scal>
24 :
public operation_cl<Derived, typename std::remove_reference_t<T>::Scalar,
48 const std::string& col_index_name,
49 const bool view_handled,
50 const std::string& var_name_arg)
const {
70 std::is_integral<typename std::remove_reference_t<T>::Scalar>::value,
71 "logical_negation: argument must be expression with integral "
72 "or boolean return type!");
88 auto&& arg_copy = this->
template get_arg<0>().deep_copy();
122 typename std::remove_reference_t<T>::Scalar> {
124 typename std::remove_reference_t<T>::Scalar>;
139 auto&& arg_copy = this->
template get_arg<0>().deep_copy();
140 return unary_minus_<std::remove_reference_t<
decltype(arg_copy)>>{
141 std::move(arg_copy)};
149 return this->
template get_arg<0>().view();
auto deep_copy() const
Creates a deep copy of this expression.
matrix_cl_view view() const
View of a matrix that would be the result of evaluating this expression.
logical_negation_(T &&a)
Constructor.
Represents a logical negation in kernel generator expressions.
std::tuple< Args... > arguments_
Base for all kernel generator operations.
unary_minus_(T &&a)
Constructor.
auto deep_copy() const
Creates a deep copy of this expression.
matrix_cl_view view() const
View of a matrix that would be the result of evaluating this expression.
Represents an unary minus operation in kernel generator expressions.
unary_operation_cl(T &&a, const std::string &op)
Constructor.
kernel_parts generate(const std::string &row_index_name, const std::string &col_index_name, const bool view_handled, const std::string &var_name_arg) const
Generates kernel code for this expression.
Represents a unary operation in kernel generator expressions.
T_operation && as_operation_cl(T_operation &&a)
Converts any valid kernel generator expression into an operation.
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...
fvar< T > operator-(const fvar< T > &x1, const fvar< T > &x2)
Return the difference of the specified arguments.
bool operator!(const fvar< T > &x)
Return the negation of the value of the argument as defined by !.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Parts of an OpenCL kernel, generated by an expression.