Check out the new USENIX Web site. next up previous contents
Next: future_pointer_to_N-ary_function Up: Futures for Control Parallelism Previous: Futures for Control Parallelism

Computation Future Functor Adaptors

The programming paradigm of the STL goes very well with the future abstraction described above. For instance, future objects can be created out of arbitrary function objects. STL has adaptors to convert N-ary function pointers to N-ary function objects where N = 1, 2. Function objects and adapters for N = 3, 4, can be easily built. Coir<Futures> defines adaptors that convert N-ary function pointers to future N-ary function objects. This is done using the following two constructs gif:

  1. A future_pointer_to_N-ary_function template class for every N-ary function that provides the necessary type definitions and member functions for future-based operations.
  2. A future_ptr_fun template function that is an adaptor from an N-ary function pointer to an instance of a future_pointer_to_N-ary_function class.




Sundaresan Neelakantan
Thu May 15 16:11:49 PDT 1997