MADNESS
version 0.9
|
Contains attributes of a task. More...
#include <worldthread.h>
Public Member Functions | |
TaskAttributes (unsigned long flags=0) | |
TaskAttributes (const TaskAttributes &attr) | |
virtual | ~TaskAttributes () |
bool | is_generator () const |
bool | is_stealable () const |
bool | is_high_priority () const |
void | set_generator (bool generator_hint) |
void | set_stealable (bool stealable) |
void | set_highpriority (bool hipri) |
void | set_nthread (int nthread) |
Are you sure this is what you want to call? More... | |
int | get_nthread () const |
template<typename Archive > | |
void | serialize (Archive &ar) |
Static Public Member Functions | |
static TaskAttributes | generator () |
static TaskAttributes | hipri () |
static TaskAttributes | multi_threaded (int nthread) |
Static Public Attributes | |
static const unsigned long | NTHREAD = 0xff |
static const unsigned long | GENERATOR = 1ul<<8 |
static const unsigned long | STEALABLE = GENERATOR<<1 |
static const unsigned long | HIGHPRIORITY = GENERATOR<<2 |
Contains attributes of a task.
generator
: Setting this hints that a task will produce additional tasks and is used by the scheduler to increase/throttle parallelism. The default is false.
stealable
: Setting this indicates that a task may be migrated to another process for dynamic load balancing. The default value is false.
highpriority
: indicates a high priority task. The default value is false.
nthread
: indicates number of threads. 0 threads is interpreted as 1 thread for backward compatibility and ease of specifying defaults. The default value is 0 (==1).
|
inlineexplicit |
Referenced by generator(), and hipri().
|
inline |
|
inlinevirtual |
|
inlinestatic |
References TaskAttributes().
Referenced by madness::FunctionImpl< T, NDIM >::truncate_spawn().
|
inline |
References NTHREAD.
Referenced by madness::ThreadPool::add(), and madness::PoolTaskInterface::set_nthread().
|
inlinestatic |
References TaskAttributes().
Referenced by madness::CoeffTracker< T, LDIM >::activate(), madness::FunctionImpl< Q, NDIM >::apply_1d_realspace_push_op(), madness::FunctionImpl< T, NDIM >::compress_spawn(), madness::FunctionImpl< T, NDIM >::diff(), madness::FunctionImpl< Q, NDIM >::do_apply(), madness::FunctionImpl< Q, NDIM >::do_apply_kernel(), madness::FunctionImpl< Q, NDIM >::do_apply_kernel2(), madness::FunctionImpl< Q, NDIM >::do_apply_kernel3(), madness::FunctionImpl< Q, NDIM >::do_project_out(), madness::FunctionImpl< T, NDIM >::eval(), madness::FunctionImpl< T, NDIM >::evaldepthpt(), madness::FunctionImpl< T, NDIM >::evalR(), madness::FunctionImpl< T, NDIM >::find_me(), madness::DerivativeBase< T, NDIM >::find_neighbor(), madness::DerivativeBase< T, NDIM >::forward_do_diff1(), madness::FunctionImpl< T, NDIM >::get_norm_tree_recursive(), madness::WorldGopInterface::lazy_sync(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< Q, NDIM >::project_out2(), madness::FunctionImpl< Q, NDIM >::refine(), madness::FunctionImpl< Q, NDIM >::refine_spawn(), madness::FunctionNode< T, NDIM >::set_has_children_recursive(), madness::FunctionImpl< T, NDIM >::sock_it_to_me(), madness::FunctionImpl< T, NDIM >::sock_it_to_me_too(), and madness::FunctionImpl< T, NDIM >::truncate_reconstructed_spawn().
|
inline |
References GENERATOR.
|
inline |
References HIGHPRIORITY.
Referenced by madness::ThreadPool::add().
|
inline |
References STEALABLE.
|
inlinestatic |
References set_nthread().
|
inline |
|
inline |
References GENERATOR.
|
inline |
References HIGHPRIORITY.
|
inline |
Are you sure this is what you want to call?
Only call this for a TaskAttributes
that is not a base class of a task object.
If you are trying to set the number of threads in an existing task you should call TaskInterface::set_nthread()
instead. No doubt there is some virtual/protected/something voodoo to prevent you from doing harm.
References NTHREAD.
Referenced by multi_threaded(), and madness::PoolTaskInterface::set_nthread().
|
inline |
References STEALABLE.
|
static |
Referenced by is_generator(), and set_generator().
|
static |
Referenced by is_high_priority(), and set_highpriority().
|
static |
Referenced by get_nthread(), and set_nthread().
|
static |
Referenced by is_stealable(), and set_stealable().