MADNESS
version 0.9
|
#include <systolic.h>
Public Member Functions | |
LocalizeBoys (DistributedMatrix< T > &M, const std::vector< int > &set, long nmo, int tag, const double thresh=1e-6, const double thetamax=0.5, const bool randomized=true, const bool doprint=false) | |
virtual | ~LocalizeBoys () |
void | start_iteration_hook (const TaskThreadEnv &env) |
Invoked by all threads at the start of each iteration. More... | |
void | kernel (int i, int j, T *rowi, T *rowj) |
Threadsafe routine to apply the operation to rows i and j of the matrix. More... | |
void | end_iteration_hook (const TaskThreadEnv &env) |
Invoked by all threads at the end of each iteration. More... | |
bool | converged (const TaskThreadEnv &env) const |
Invoked simultaneously by all threads after each sweep to test for convergence. More... | |
Public Member Functions inherited from madness::SystolicMatrixAlgorithm< T > | |
SystolicMatrixAlgorithm (DistributedMatrix< T > &A, int tag, int nthread=ThreadPool::size()+1) | |
A must be a column distributed matrix with an even column tile >= 2. More... | |
virtual | ~SystolicMatrixAlgorithm () |
void | run (World &world, const TaskThreadEnv &env) |
Invoked by the task queue to run the algorithm with multiple threads. More... | |
void | solve () |
Invoked by the user to run the algorithm with one thread. More... | |
int | get_rowdim () const |
Returns length of row. More... | |
int | get_coldim () const |
Returns length of column. More... | |
World & | get_world () const |
Returns a reference to the world. More... | |
ProcessID | get_rank () const |
Returns rank of this process in the world. More... | |
SystolicMatrixAlgorithm (DistributedMatrix< T > &A, int tag, int nthread=ThreadPool::size()+1) | |
A must be a column distributed matrix with an even column tile >= 2. More... | |
virtual | ~SystolicMatrixAlgorithm () |
void | run (World &world, const TaskThreadEnv &env) |
Invoked by the task queue to run the algorithm with multiple threads. More... | |
void | solve_sequential () |
Invoked by the user to run the algorithm with one thread mostly for debugging. More... | |
int64_t | get_rowdim () const |
Returns length of row. More... | |
int64_t | get_coldim () const |
Returns length of column. More... | |
World & | get_world () const |
Returns a reference to the world. More... | |
ProcessID | get_rank () const |
Returns rank of this process in the world. More... | |
Public Member Functions inherited from madness::TaskInterface | |
TaskInterface (int ndepend=0, const TaskAttributes attr=TaskAttributes()) | |
Create a new task with ndepend dependencies (default 0) and given attributes. More... | |
TaskInterface (const TaskAttributes &attr) | |
Create a new task with zero dependencies and given attributes. More... | |
virtual void | run (World &) |
Runs a single-threaded task ... derived classes must implement this. More... | |
World * | get_world () const |
virtual | ~TaskInterface () |
Public Member Functions inherited from madness::PoolTaskInterface | |
PoolTaskInterface () | |
PoolTaskInterface (const TaskAttributes &attr) | |
void | set_nthread (int nthread) |
Call this to reset the number of threads before the task is submitted. More... | |
virtual | ~PoolTaskInterface () |
Public Member Functions inherited from madness::TaskAttributes | |
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) |
Public Member Functions inherited from madness::DependencyInterface | |
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 () |
Additional Inherited Members | |
Static Public Member Functions inherited from madness::PoolTaskInterface | |
static void | operator delete (void *p, std::size_t size) throw () |
Destroy task object. More... | |
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 | NTHREAD = 0xff |
static const unsigned long | GENERATOR = 1ul<<8 |
static const unsigned long | STEALABLE = GENERATOR<<1 |
static const unsigned long | HIGHPRIORITY = GENERATOR<<2 |
Protected Member Functions inherited from madness::TaskInterface | |
virtual void | run (const TaskThreadEnv &env) |
Override this method to implement a multi-threaded task. More... | |
Static Protected Member Functions inherited from madness::PoolTaskInterface | |
template<typename fnT > | |
static enable_if_c < detail::function_traits< fnT > ::value||detail::memfunc_traits < fnT >::value >::type | make_id (std::pair< void *, unsigned short > &id, fnT fn) |
template<typename fnobjT > | |
static disable_if_c < detail::function_traits < fnobjT >::value||detail::memfunc_traits < fnobjT >::value >::type | make_id (std::pair< void *, unsigned short > &id, const fnobjT &) |
|
inline |
References madness::print().
|
inlinevirtual |
|
virtual |
Invoked simultaneously by all threads after each sweep to test for convergence.
There is a thread barrier before and after the invocation of this routine
Implements madness::SystolicMatrixAlgorithm< T >.
References madness::TaskThreadEnv::barrier(), and madness::print().
|
virtual |
Invoked by all threads at the end of each iteration.
There is a thread barrier before and after the invocation of this routine
Reimplemented from madness::SystolicMatrixAlgorithm< T >.
References madness::TaskThreadEnv::barrier(), madness::TaskThreadEnv::id(), and max.
|
virtual |
Threadsafe routine to apply the operation to rows i and j of the matrix.
restriction
Implements madness::SystolicMatrixAlgorithm< T >.
References c, mpfr::cos(), doit(), madness::drot(), mpfr::fabs(), madness::g, madness::inner(), madness::print(), mpfr::sin(), and std::tr1::T().
|
virtual |
Invoked by all threads at the start of each iteration.
There is a thread barrier before and after the invocation of this routine
number of rotation in this iteration
maximum rotation angle in this iteration
Reimplemented from madness::SystolicMatrixAlgorithm< T >.
References madness::TaskThreadEnv::barrier(), madness::TaskThreadEnv::id(), mpfr::sum(), and std::tr1::T().