thrust
|
Facilities for constructing simple functions inline. More...
Variables | |
static const thrust::detail::functional::placeholder< 0 >::type | _1 |
static const thrust::detail::functional::placeholder< 1 >::type | _2 |
static const thrust::detail::functional::placeholder< 2 >::type | _3 |
static const thrust::detail::functional::placeholder< 3 >::type | _4 |
static const thrust::detail::functional::placeholder< 4 >::type | _5 |
static const thrust::detail::functional::placeholder< 5 >::type | _6 |
static const thrust::detail::functional::placeholder< 6 >::type | _7 |
static const thrust::detail::functional::placeholder< 7 >::type | _8 |
static const thrust::detail::functional::placeholder< 8 >::type | _9 |
static const thrust::detail::functional::placeholder< 9 >::type | _10 |
Facilities for constructing simple functions inline.
Objects in the thrust::placeholders
namespace may be used to create simple arithmetic functions inline in an algorithm invocation. Combining placeholders such as _1
and _2
with arithmetic operations such as +
creates an unnamed function object which applies the operation to their arguments.
The type of placeholder objects is implementation-defined.
The following code snippet demonstrates how to use the placeholders _1
and _2
with thrust::transform
to implement the SAXPY computation: