25 #include <cusp/detail/config.h>
29 #include <thrust/functional.h>
51 template <
typename>
struct base_functor;
52 template <
typename>
struct combine_tuple_base_functor;
94 struct plus_value :
public detail::base_functor< thrust::plus<T> >
97 plus_value(
const T value = T(0)) : detail::base_functor< thrust::plus<T> >(value) {}
135 template <
typename T>
136 struct divide_value :
public detail::base_functor< thrust::divides<T> >
139 divide_value(
const T value = T(0)) : detail::base_functor< thrust::divides<T> >(value) {}
177 template <
typename T>
181 modulus_value(
const T value = T(0)) : detail::base_functor< thrust::modulus<T> >(value) {}
219 template <
typename T>
223 multiplies_value(
const T value) : detail::base_functor< thrust::multiplies<T> >(value) {}
260 template <
typename T>
264 greater_value(
const T value) : detail::base_functor< thrust::greater<T> >(value) {}
301 template <
typename T>
305 greater_equal_value(
const T value) : detail::base_functor< thrust::greater_equal<T> >(value) {}
343 template <
typename T>
344 struct less_value :
public detail::base_functor< thrust::less<T> >
347 less_value(
const T value) : detail::base_functor< thrust::less<T> >(value) {}
384 template <
typename T>
388 less_equal_value(
const T value) : detail::base_functor< thrust::less_equal<T> >(value) {}
436 T operator()(
const T& x)
const {
475 template <
typename T>
479 T operator()(
const T& x)
const {
518 template <
typename T>
522 T operator()(
const T& x)
const {
564 template <
typename T>
568 T operator()(
const T& v)
const {
608 struct abs_functor :
public thrust::unary_function<T, typename cusp::norm_type<T>::type>
611 typename cusp::norm_type<T>::type
612 operator()(
const T& t)
const {
656 typename cusp::norm_type<T>::type
657 operator()(
const T& t)
const {
700 T operator()(
const T& t)
const {
701 return cusp::conj(t);
740 struct norm_functor :
public thrust::unary_function<T, typename cusp::norm_type<T>::type>
743 typename cusp::norm_type<T>::type
744 operator()(
const T& t)
const {
745 return cusp::norm(t);
789 template <
typename T>
833 template <
typename T>
876 template <
typename T>
919 template <
typename T>
927 #include <cusp/detail/functional.inl>
sum_pair_functor is a function object that computes the sum of a 2 element tuple. ...
less_equal_value is a function object that compares a given element with a constant value...
modulus_value is a function object that computes the modulus of a given element by a constant value...
norm_functor is a function object that computes the norm of a given element.
abs_squared_functor is a function object that computes the square of the absolute value of a given el...
not_equal_pair_functor is a function object that compares 2 element tuple entries.
equal_pair_functor is a function object that compares 2 element tuple entries.
sqrt_functor is a function object that computes the square root of a given element.
conj_functor is a function object that computes the conjugate of a given element. ...
plus_value is a function object to add a constant value to a given element.
abs_functor is a function object that computes the absolute value of a given element.
greater_value is a function object that compares a given element with a constant value.
greater_equal_value is a function object that compares a given element with a constant value...
divide_value is a function object to divide a given element by a constant value.
square_functor is a function object that computes the square (x*x) of a given element.
divide_pair_functor is a function object that divides the first element of a 2 element tuple by the s...
multiplies_value is a function object that computes the multiply of a given element by a constant val...
reciprocal_functor is a function object computes the reciprocal, 1/x, of a given element.
constant_functor is a function object returns a constant value, ignores the input.
less_value is a function object that compares a given element with a constant value.