![]() |
Home | Libraries | People | FAQ | More |
boost::compute::identity
// In header: <boost/compute/functional/identity.hpp> template<typename T> class identity { public: // types typedef T result_type; // Identity function result type. // public member functions identity(); };
Identity function which simply returns its input.
For example, to directly copy values using the transform() algorithm:
transform(input.begin(), input.end(), output.begin(), identity<int>(), queue);
See Also: as<T>, convert<T>