template<typename T>
struct cusp::sum_pair_functor< T >
sum_pair_functor is a function object that computes the sum of a 2 element tuple.
- Parameters
-
| T | is a model of Assignable, and if x is an object of type ::cuda::std::tuple<T,T>, then x=c must be defined and must have a return type that is convertible to T. |
- Overview
sum_pair_functor is a function object. Specifically, it is an Adaptable Unary Function. If f(c) is an object of class sum_pair_functor<T>, and x is an object of class ::cuda::std::tuple<T,T>, then f(x) returns ::cuda::std::get<0>(x) + ::cuda::std::get<1>(x).
- Example
int main()
{
thrust::transform(thrust::make_zip_iterator(::cuda::std::make_tuple(ones.begin(), counting.begin())),
thrust::make_zip_iterator(::cuda::std::make_tuple(ones.begin(), counting.begin())) + v.size(),
v.begin(),
}
1D array of elements that may reside in "host" or "device" memory space
The array1d class is a 1D vector container that may contain elements stored in "host" or "device" mem...
Specialized array1d_view wrapping thrust::constant_iterator.
Specialized array1d_view wrapping thrust::counting_iterator.
Defines templated convenience functors analogous to what is found in thrust's functional.
void print(const Printable &p)
print a textual representation of an object
Print textual representation of an object.
sum_pair_functor is a function object that computes the sum of a 2 element tuple.
Definition at line 807 of file functional.h.