MADNESS  version 0.9
Public Member Functions | List of all members
madness::DependencyInterface Class Reference

Provides interface for tracking dependencies. More...

#include <worlddep.h>

Inheritance diagram for madness::DependencyInterface:
Inheritance graph
[legend]
Collaboration diagram for madness::DependencyInterface:
Collaboration graph
[legend]

Public Member Functions

 DependencyInterface (int ndep=0)
 
int ndep () const
 Returns the number of unsatisfied dependencies. More...
 
bool probe () const
 Returns true if ndepend == 0. More...
 
void notify ()
 Invoked by callbacks to notifiy of dependencies being satisfied. More...
 
void register_callback (CallbackInterface *callback)
 Registers a callback for when ndepend==0 , immediately invoked if ndepend==0. More...
 
void inc ()
 Increment the number of dependencies. More...
 
void dec ()
 Decrement the number of dependencies and invoke callback if ndepend=0. More...
 
virtual ~DependencyInterface ()
 
- Public Member Functions inherited from madness::CallbackInterface
virtual ~CallbackInterface ()
 

Detailed Description

Provides interface for tracking dependencies.

Constructor & Destructor Documentation

madness::DependencyInterface::DependencyInterface ( int  ndep = 0)
inline
virtual madness::DependencyInterface::~DependencyInterface ( )
inlinevirtual

References madness::error().

Member Function Documentation

void madness::DependencyInterface::dec ( )
inline

Decrement the number of dependencies and invoke callback if ndepend=0.

Referenced by notify().

void madness::DependencyInterface::inc ( )
inline

Increment the number of dependencies.

Referenced by madness::detail::ForEachTask< rangeT, opT >::ForEachTask().

int madness::DependencyInterface::ndep ( ) const
inline

Returns the number of unsatisfied dependencies.

Referenced by madness::WorldTaskQueue::add(), and probe().

void madness::DependencyInterface::notify ( )
inlinevirtual

Invoked by callbacks to notifiy of dependencies being satisfied.

Implements madness::CallbackInterface.

References dec().

Referenced by madness::detail::ForEachRootTask< rangeT, opT >::complete().

bool madness::DependencyInterface::probe ( ) const
inline

Returns true if ndepend == 0.

References ndep().

Referenced by register_callback().

void madness::DependencyInterface::register_callback ( CallbackInterface callback)
inline

Registers a callback for when ndepend==0 , immediately invoked if ndepend==0.

References probe().

Referenced by madness::Future< std::vector< Future< T > > >::Future().


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