MADNESS  0.10.1
Public Member Functions | Private Types | Private Attributes | List of all members
madness::Future< std::vector< Future< T > > > Class Template Reference

Specialization of Future for a vector of Futures. More...

#include <future.h>

Inheritance diagram for madness::Future< std::vector< Future< T > > >:
Inheritance graph
[legend]
Collaboration diagram for madness::Future< std::vector< Future< T > > >:
Collaboration graph
[legend]

Public Member Functions

 Future ()
 
 Future (const archive::BufferInputArchive &input_arch)
 
 Future (const vectorT &v)
 
vectorTget ()
 Access the vector of futures. More...
 
const vectorTget () const
 Access the const vector of futures. More...
 
 operator const vectorT & () const
 Access the const vector of futures. More...
 
 operator vectorT & ()
 Access the vector of futures. More...
 
bool probe () const
 Check if all of the futures in the vector have been assigned. More...
 
- Public Member Functions inherited from madness::DependencyInterface
 DependencyInterface (int ndep, const char *caller)
 
 DependencyInterface (int ndep=0)
 
virtual ~DependencyInterface ()
 Destructor. More...
 
void dec ()
 Decrement the number of dependencies and invoke the callback if ndepend==0. More...
 
void dec_debug (const char *caller)
 
void inc ()
 Increment the number of dependencies. More...
 
void inc_debug (const char *caller)
 Same as inc(), but keeps track of caller; calling dec_debug() will signal error if no matching inc_debug() had been invoked
More...
 
int ndep () const
 Returns the number of unsatisfied dependencies. More...
 
void notify ()
 Invoked by callbacks to notify of dependencies being satisfied. More...
 
void notify_debug (const char *caller)
 Overload of CallbackInterface::notify_debug(), updates dec() More...
 
bool probe () const
 Returns true if ndepend == 0 (no unsatisfied dependencies). More...
 
void register_callback (CallbackInterface *callback)
 Registers a callback that will be executed when ndepend==0; immediately invoked if ndepend==0. More...
 
void register_final_callback (CallbackInterface *callback)
 Registers the final callback to be executed when ndepend==0; immediately invoked if ndepend==0. More...
 
- Public Member Functions inherited from madness::CallbackInterface
virtual ~CallbackInterface ()
 

Private Types

typedef std::vector< Future< T > > vectorT
 Alias for a vector of futures. More...
 

Private Attributes

vectorT v
 The vector of futures. More...
 

Additional Inherited Members

- Protected Member Functions inherited from madness::CallbackInterface
virtual void notify_debug_impl (const char *caller)
 
- Private Member Functions inherited from NO_DEFAULTS
 NO_DEFAULTS ()
 
 NO_DEFAULTS (const NO_DEFAULTS &)=delete
 
 NO_DEFAULTS (NO_DEFAULTS &&)=delete
 
NO_DEFAULTSoperator= (const NO_DEFAULTS &)=delete
 
NO_DEFAULTSoperator= (NO_DEFAULTS &&)=delete
 

Detailed Description

template<typename T>
class madness::Future< std::vector< Future< T > > >

Specialization of Future for a vector of Futures.

Enables passing a vector of futures into a task and having the dependencies correctly tracked. Does not directly support most operations that other futures do; these are the responsibility of the individual futures in the vector.

Template Parameters
TThe type of future.

Member Typedef Documentation

◆ vectorT

template<typename T >
typedef std::vector< Future<T> > madness::Future< std::vector< Future< T > > >::vectorT
private

Alias for a vector of futures.

Constructor & Destructor Documentation

◆ Future() [1/3]

template<typename T >
madness::Future< std::vector< Future< T > > >::Future ( )
inline

◆ Future() [2/3]

template<typename T >
madness::Future< std::vector< Future< T > > >::Future ( const vectorT v)
inline
Todo:
Brief description needed.
Todo:
Description needed.
Parameters
[in]vVector of something...

References v.

◆ Future() [3/3]

template<typename T >
madness::Future< std::vector< Future< T > > >::Future ( const archive::BufferInputArchive input_arch)
inlineexplicit
Todo:
Brief description needed.
Todo:
Description needed.
Parameters
[in]input_archDescription needed.
Todo:
Not implemented. If this is deliberate, specify why and change the tag to \attention.

References v.

Member Function Documentation

◆ get() [1/2]

template<typename T >
vectorT& madness::Future< std::vector< Future< T > > >::get ( )
inline

Access the vector of futures.

Returns
The vector of futures.

References v.

◆ get() [2/2]

template<typename T >
const vectorT& madness::Future< std::vector< Future< T > > >::get ( ) const
inline

Access the const vector of futures.

Returns
The vector of futures.

References v.

◆ operator const vectorT &()

template<typename T >
madness::Future< std::vector< Future< T > > >::operator const vectorT & ( ) const
inline

Access the const vector of futures.

Returns
The vector of futures.

References madness::Future< T >::get().

◆ operator vectorT &()

template<typename T >
madness::Future< std::vector< Future< T > > >::operator vectorT & ( )
inline

Access the vector of futures.

Returns
The vector of futures.

References madness::Future< T >::get().

◆ probe()

template<typename T >
bool madness::Future< std::vector< Future< T > > >::probe ( ) const
inline

Check if all of the futures in the vector have been assigned.

Returns
True if all futures have been assigned; false otherwise.

References madness::DependencyInterface::probe().

Member Data Documentation

◆ v

template<typename T >
vectorT madness::Future< std::vector< Future< T > > >::v
private

The vector of futures.


The documentation for this class was generated from the following file: