25#include <cusp/detail/config.h>
29#include <thrust/functional.h>
51template <
typename>
struct base_functor;
52template <
typename>
struct combine_tuple_base_functor;
94struct plus_value :
public detail::base_functor< ::cuda::std::plus<T> >
98 plus_value(
const T value = T(0)) : detail::base_functor< ::cuda::std::plus<T> >(value) {}
137struct divide_value :
public detail::base_functor< ::cuda::std::divides<T> >
141 divide_value(
const T value = T(0)) : detail::base_functor< ::cuda::std::divides<T> >(value) {}
180struct modulus_value :
public detail::base_functor< ::cuda::std::modulus<T> >
184 modulus_value(
const T value = T(0)) : detail::base_functor< ::cuda::std::modulus<T> >(value) {}
227 multiplies_value(
const T value) : detail::base_functor< ::cuda::std::multiplies<T> >(value) {}
265struct greater_value :
public detail::base_functor< ::cuda::std::greater<T> >
269 greater_value(
const T value) : detail::base_functor< ::cuda::std::greater<T> >(value) {}
350struct less_value :
public detail::base_functor< ::cuda::std::less<T> >
354 less_value(
const T value) : detail::base_functor< ::cuda::std::less<T> >(value) {}
396 less_equal_value(
const T value) : detail::base_functor< ::cuda::std::less_equal<T> >(value) {}
625 typename cusp::norm_type<T>::type
671 typename cusp::norm_type<T>::type
760 typename cusp::norm_type<T>::type
807struct sum_pair_functor :
public detail::combine_tuple_base_functor< ::cuda::std::plus<T> > {};
944#include <cusp/detail/functional.inl>
_CCCL_HOST_DEVICE cusp::norm_type< T >::type abs(const T &z)
Compute the absolute value of z.
_CCCL_HOST_DEVICE cusp::norm_type< T >::type norm(const T &z)
Compute the norm of z.
_CCCL_HOST_DEVICE T conj(const T &z)
Compute the complex conjugate of z. For real types, returns z unchanged.
abs_functor is a function object that computes the absolute value of a given element.
_CCCL_HOST_DEVICE cusp::norm_type< T >::type operator()(const T &t) const
Return the absolute value of t.
abs_squared_functor is a function object that computes the square of the absolute value of a given el...
_CCCL_HOST_DEVICE cusp::norm_type< T >::type operator()(const T &t) const
Return the squared absolute value of t.
conj_functor is a function object that computes the conjugate of a given element.
_CCCL_HOST_DEVICE T operator()(const T &t) const
Return the complex conjugate of t.
constant_functor is a function object returns a constant value, ignores the input.
_CCCL_HOST_DEVICE T operator()(const T &x) const
Return the stored constant, ignoring input x.
_CCCL_HOST_DEVICE constant_functor(const T val=0)
Construct with the given constant val.
divide_pair_functor is a function object that divides the first element of a 2 element tuple by the s...
divide_value is a function object to divide a given element by a constant value.
_CCCL_HOST_DEVICE divide_value(const T value=T(0))
Construct with the given constant value.
equal_pair_functor is a function object that compares 2 element tuple entries.
greater_equal_value is a function object that compares a given element with a constant value.
_CCCL_HOST_DEVICE greater_equal_value(const T value)
Construct with the given constant value.
greater_value is a function object that compares a given element with a constant value.
_CCCL_HOST_DEVICE greater_value(const T value)
Construct with the given constant value.
less_equal_value is a function object that compares a given element with a constant value.
_CCCL_HOST_DEVICE less_equal_value(const T value)
Construct with the given constant value.
less_value is a function object that compares a given element with a constant value.
_CCCL_HOST_DEVICE less_value(const T value)
Construct with the given constant value.
modulus_value is a function object that computes the modulus of a given element by a constant value.
_CCCL_HOST_DEVICE modulus_value(const T value=T(0))
Construct with the given constant value.
multiplies_value is a function object that computes the multiply of a given element by a constant val...
_CCCL_HOST_DEVICE multiplies_value(const T value)
Construct with the given constant value.
norm_functor is a function object that computes the norm of a given element.
_CCCL_HOST_DEVICE cusp::norm_type< T >::type operator()(const T &t) const
Return the norm of t.
not_equal_pair_functor is a function object that compares 2 element tuple entries.
plus_value is a function object to add a constant value to a given element.
_CCCL_HOST_DEVICE plus_value(const T value=T(0))
Construct with the given constant value.
reciprocal_functor is a function object computes the reciprocal, 1/x, of a given element.
_CCCL_HOST_DEVICE T operator()(const T &v) const
Return the reciprocal of v.
sqrt_functor is a function object that computes the square root of a given element.
_CCCL_HOST_DEVICE T operator()(const T &x) const
Return the square root of x.
square_functor is a function object that computes the square (x*x) of a given element.
_CCCL_HOST_DEVICE T operator()(const T &x) const
Return the square of x.
sum_pair_functor is a function object that computes the sum of a 2 element tuple.