Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template invoke

boost::compute::invoke

Synopsis

// In header: <boost/compute/utility/invoke.hpp>


template<typename Function, class... Args> 
  result_of< Function(Args...)>::type 
  invoke(const Function & function, command_queue & queue, 
         const Args &... args);

Description

Invokes function with args on queue.

For example, to invoke the builtin abs() function:

int result = invoke(abs<int>(), queue, -10); // returns 10


PrevUpHomeNext