MADNESS 0.10.1
Public Member Functions | Public Attributes | Private Member Functions | List of all members
madness::MatrixInnerTask< T, R, NDIM > Struct Template Reference

#include <vmra1.h>

Inheritance diagram for madness::MatrixInnerTask< T, R, NDIM >:
Inheritance graph
[legend]
Collaboration diagram for madness::MatrixInnerTask< T, R, NDIM >:
Collaboration graph
[legend]

Public Member Functions

 MatrixInnerTask (const Tensor< TENSOR_RESULT_TYPE(T, R)> &result, const Function< T, NDIM > &f, const std::vector< Function< R, NDIM > > &g, long jtop)
 
void run (World &world)
 Runs a single-threaded task ... derived classes must implement this.
 
- Public Member Functions inherited from madness::TaskInterface
 TaskInterface (const TaskAttributes &attr)
 Create a new task with zero dependencies and given attributes.
 
 TaskInterface (int ndepend, const char *caller, const TaskAttributes attr=TaskAttributes())
 
 TaskInterface (int ndepend=0, const TaskAttributes attr=TaskAttributes())
 Create a new task with ndepend dependencies (default 0) and given attributes.
 
virtual ~TaskInterface ()
 
Worldget_world () const
 
virtual void run (World &world, const TaskThreadEnv &env)
 Runs a multi-threaded task.
 
- Public Member Functions inherited from madness::PoolTaskInterface
 PoolTaskInterface ()
 Default constructor.
 
 PoolTaskInterface (const TaskAttributes &attr)
 
virtual ~PoolTaskInterface ()=default
 Destructor.
 
void execute ()
 
void set_nthread (int nthread)
 Call this to reset the number of threads before the task is submitted.
 
- Public Member Functions inherited from madness::TaskAttributes
 TaskAttributes (const TaskAttributes &attr)
 Copy constructor.
 
 TaskAttributes (unsigned long flags=0)
 Sets the attributes to the desired values.
 
virtual ~TaskAttributes ()
 
int get_nthread () const
 Get the number of threads.
 
bool is_generator () const
 Test if the generator attribute is true.
 
bool is_high_priority () const
 Test if the high priority attribute is true.
 
bool is_stealable () const
 Test if the stealable attribute is true.
 
template<typename Archive >
void serialize (Archive &ar)
 Serializes the attributes for I/O.
 
TaskAttributesset_generator (bool generator_hint)
 Sets the generator attribute.
 
TaskAttributesset_highpriority (bool hipri)
 Sets the high priority attribute.
 
void set_nthread (int nthread)
 Set the number of threads.
 
TaskAttributesset_stealable (bool stealable)
 Sets the stealable attribute.
 
- Public Member Functions inherited from madness::DependencyInterface
 DependencyInterface (int ndep, const char *caller)
 
 DependencyInterface (int ndep=0)
 
virtual ~DependencyInterface ()
 Destructor.
 
void dec ()
 Decrement the number of dependencies and invoke the callback if ndepend==0.
 
void dec_debug (const char *caller)
 
void inc ()
 Increment the number of dependencies.
 
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

 
int ndep () const
 Returns the number of unsatisfied dependencies.
 
void notify ()
 Invoked by callbacks to notify of dependencies being satisfied.
 
void notify_debug (const char *caller)
 Overload of CallbackInterface::notify_debug(), updates dec()
 
bool probe () const
 Returns true if ndepend == 0 (no unsatisfied dependencies).
 
void register_callback (CallbackInterface *callback)
 Registers a callback that will be executed when ndepend==0; immediately invoked if ndepend==0.
 
void register_final_callback (CallbackInterface *callback)
 Registers the final callback to be executed when ndepend==0; immediately invoked if ndepend==0.
 
- Public Member Functions inherited from madness::CallbackInterface
virtual ~CallbackInterface ()
 

Public Attributes

const Function< T, NDIM > & f
 
const std::vector< Function< R, NDIM > > & g
 
long jtop
 
Tensor< TENSOR_RESULT_TYPE(T, R)> result
 

Private Member Functions

virtual void get_id (std::pair< void *, unsigned short > &id) const
 Get the task id.
 

Additional Inherited Members

- Static Public Member Functions inherited from madness::TaskAttributes
static TaskAttributes generator ()
 
static TaskAttributes hipri ()
 
static TaskAttributes multi_threaded (int nthread)
 
- Static Public Attributes inherited from madness::TaskInterface
static bool debug = false
 
- Static Public Attributes inherited from madness::TaskAttributes
static const unsigned long GENERATOR = 1ul<<8
 Mask for generator bit.
 
static const unsigned long HIGHPRIORITY = GENERATOR<<2
 Mask for priority bit.
 
static const unsigned long NTHREAD = 0xff
 Mask for nthread byte.
 
static const unsigned long STEALABLE = GENERATOR<<1
 Mask for stealable bit.
 
- Protected Member Functions inherited from madness::TaskInterface
virtual void run (const TaskThreadEnv &env)
 Override this method to implement a multi-threaded task.
 
- Protected Member Functions inherited from madness::CallbackInterface
virtual void notify_debug_impl (const char *caller)
 
- Static Protected Member Functions inherited from madness::PoolTaskInterface
template<typename fnobjT >
static std::enable_if<!(detail::function_traits< fnobjT >::value||detail::memfunc_traits< fnobjT >::value)>::type make_id (std::pair< void *, unsigned short > &id, const fnobjT &)
 
template<typename fnT >
static std::enable_if< detail::function_traits< fnT >::value||detail::memfunc_traits< fnT >::value >::type make_id (std::pair< void *, unsigned short > &id, fnT fn)
 

Constructor & Destructor Documentation

◆ MatrixInnerTask()

template<typename T , typename R , std::size_t NDIM>
madness::MatrixInnerTask< T, R, NDIM >::MatrixInnerTask ( const Tensor< TENSOR_RESULT_TYPE(T, R)> &  result,
const Function< T, NDIM > &  f,
const std::vector< Function< R, NDIM > > &  g,
long  jtop 
)
inline

Member Function Documentation

◆ get_id()

template<typename T , typename R , std::size_t NDIM>
virtual void madness::MatrixInnerTask< T, R, NDIM >::get_id ( std::pair< void *, unsigned short > &  id) const
inlineprivatevirtual

Get the task id.

Parameters
idThe id to set for this task

Reimplemented from madness::PoolTaskInterface.

References madness::PoolTaskInterface::make_id().

◆ run()

template<typename T , typename R , std::size_t NDIM>
void madness::MatrixInnerTask< T, R, NDIM >::run ( World )
inlinevirtual

Runs a single-threaded task ... derived classes must implement this.

This interface may disappear so new code should use the multi-threaded interface.

Reimplemented from madness::TaskInterface.

References madness::MatrixInnerTask< T, R, NDIM >::f, madness::MatrixInnerTask< T, R, NDIM >::g, madness::MatrixInnerTask< T, R, NDIM >::jtop, and madness::MatrixInnerTask< T, R, NDIM >::result.

Member Data Documentation

◆ f

template<typename T , typename R , std::size_t NDIM>
const Function<T,NDIM>& madness::MatrixInnerTask< T, R, NDIM >::f

◆ g

template<typename T , typename R , std::size_t NDIM>
const std::vector< Function<R,NDIM> >& madness::MatrixInnerTask< T, R, NDIM >::g

◆ jtop

template<typename T , typename R , std::size_t NDIM>
long madness::MatrixInnerTask< T, R, NDIM >::jtop

◆ result

template<typename T , typename R , std::size_t NDIM>
Tensor<TENSOR_RESULT_TYPE(T,R)> madness::MatrixInnerTask< T, R, NDIM >::result

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