|
MADNESS 0.10.1
|
Namespaces | |
| namespace | arg_holder |
Typedefs | |
| typedef Future< void > | voidT |
Functions | |
| void | combine_hash (hashT &seed, hashT hash) |
| Internal use only. | |
| void | compare_fn_addresses (void *addresses_in, void *addresses_inout, int *len, MPI_Datatype *type) |
| template<typename objT > | |
| void | deferred_cleanup (World &world, const std::shared_ptr< objT > &p, bool assume_p_is_unique) |
| Defer the cleanup of a shared pointer to the end of the next fence. | |
| template<typename R > | |
| std::pair< Tensor< R > &, Tensor< R > & > | eval_scratch (long need) |
| template<typename R > | |
| void | eval_scratch_clear () |
| template<typename R > | |
| thread_specific< EvalScratch< R > > & | eval_scratch_pool () |
| template<typename ptrT , typename memfnT , typename resT > | |
| memfnT | get_mem_func_ptr (const MemFuncWrapper< ptrT, memfnT, resT > &wrapper) |
| Returns the member function pointer from a wrapper. | |
| unsigned short | htons_x (unsigned short a) |
| template<typename T = int> | |
| double | mynorm (int t) |
| template<typename T > | |
| T | mynorm (std::complex< T > t) |
| template<typename T > | |
| T | mynorm (T t) |
| template<typename T > | |
| double | norm (const T &t) |
| template<typename T > | |
| double | norm (const Tensor< T > &t) |
| std::ostream & | operator<< (std::ostream &out, const RemoteCounter &counter) |
| template<typename T , typename U > | |
| bool | operator<= (const WorldPtr< T > &left, const WorldPtr< U > &right) |
| Less-than-equal-to comparison operator. | |
| template<typename T , typename U > | |
| bool | operator> (const WorldPtr< T > &left, const WorldPtr< U > &right) |
| Greater-than comparison operator. | |
| template<typename T , typename U > | |
| bool | operator>= (const WorldPtr< T > &left, const WorldPtr< U > &right) |
| Greater-than-equal-to comparison operator. | |
| static const uniqueidT & | peek (const AmArg &arg) |
| Extract the unique object ID from an incoming active message header. | |
| bool & | print_meminfo_flag_accessor () |
| bool & | print_meminfo_keepstreamopen_accessor () |
| void | print_mutex_error (int error_number) |
| template<typename T , std::size_t NDIM> | |
| void | reconstruct_for_norm (World &world, const std::vector< Function< T, NDIM > > &v) |
| put a vector of functions into a state whose coefficients sum to ||f||^2 | |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, a7T &a7, a8T &a8, a9T &a9) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, a7T &a7, a8T &a8, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, a7T &a7, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, a2T &a2, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, a1T &a1, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT > | |
| std::enable_if< std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (Future< void > &result, fnT fn, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, a7T &a7, a8T &a8, a9T &a9) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, a7T &a7, a8T &a8, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, a7T &a7, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, a6T &a6, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, a5T &a5, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T , typename a4T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, a4T &a4, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T , typename a3T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, a3T &a3, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T , typename a2T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, a2T &a2, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT , typename a1T > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, a1T &a1, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| template<typename fnT > | |
| std::enable_if<!std::is_void< typenamedetail::result_of< fnT >::type >::value >::type | run_function (typename task_result_type< fnT >::futureT &result, fnT fn, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &, const voidT &) |
| void | swap (RemoteCounter &l, RemoteCounter &r) |
| template<typename T > | |
| void | swap (WorldPtr< T > &l, WorldPtr< T > &r) |
Swap the content of l with r. | |
| ThreadTag & | thread_tag_accessor () |
| template<typename Char > | |
| const Char * | Vm_cstr () |
| template<> | |
| const char * | Vm_cstr< char > () |
| template<> | |
| const wchar_t * | Vm_cstr< wchar_t > () |
| template<typename objT , typename memfnT > | |
| MemFuncWrapper< const objT *, memfnT, typename result_of< memfnT >::type > | wrap_mem_fn (const objT &obj, memfnT memfn) |
Create a member function wrapper (MemFuncWrapper) from a const object and a member function pointer. | |
| template<typename objT , typename memfnT > | |
| MemFuncWrapper< const objT *, memfnT, typename result_of< memfnT >::type > | wrap_mem_fn (const objT *obj, memfnT memfn) |
Create a member function wrapper (MemFuncWrapper) from a const pointer and a member function pointer. | |
| template<typename objT , typename memfnT > | |
| MemFuncWrapper< std::shared_ptr< objT >, memfnT, typename result_of< memfnT >::type > | wrap_mem_fn (const std::shared_ptr< objT > &obj, memfnT memfn) |
Create a member function wrapper (MemFuncWrapper) from a const shared pointer and a member function pointer. | |
| template<typename objT , typename memfnT > | |
| MemFuncWrapper< objT *, memfnT, typename result_of< memfnT >::type > | wrap_mem_fn (objT &obj, memfnT memfn) |
Create a member function wrapper (MemFuncWrapper) from an object and a member function pointer. | |
| template<typename objT , typename memfnT > | |
| MemFuncWrapper< objT *, memfnT, typename result_of< memfnT >::type > | wrap_mem_fn (objT *obj, memfnT memfn) |
Create a member function wrapper (MemFuncWrapper) from a pointer and a member function pointer. | |
| template<typename objT , typename memfnT > | |
| MemFuncWrapper< std::shared_ptr< objT >, memfnT, typename result_of< memfnT >::type > | wrap_mem_fn (std::shared_ptr< objT > &obj, memfnT memfn) |
Create a member function wrapper (MemFuncWrapper) from a shared pointer and a member function pointer. | |
Variables | |
| Mutex | printmutex |
| typedef Future<void> madness::detail::voidT |
Future<void> is an empty object which is used as a placeholder for unused arguments.
Internal use only.
Referenced by madness::hash_combine(), madness::hash_range(), std::hash_value(), and madness::hash_value().
| void madness::detail::compare_fn_addresses | ( | void * | addresses_in, |
| void * | addresses_inout, | ||
| int * | len, | ||
| MPI_Datatype * | type | ||
| ) |
References compare_fn_addresses(), MADNESS_ASSERT, MPI_LONG, and madness::type().
Referenced by madness::RMI::assert_aslr_off(), and compare_fn_addresses().
|
inline |
Defer the cleanup of a shared pointer to the end of the next fence.
Call this function before destroying a shared pointer. If the shared pointer is the last reference to the object, or assume_p_is_unique is true, it is placed in the deferred deletion list. Otherwise, nothing is done with the pointer.
Referenced by madness::WorldContainer< keyT, valueT, hashfunT >::~WorldContainer().
| std::pair< Tensor< R > &, Tensor< R > & > madness::detail::eval_scratch | ( | long | need | ) |
Grow-on-demand per-thread buffer pair for general_fast_transform.
Backed by a reclaimable thread_specific pool rather than a thread_local: the pair can grow to k^NDIM each for 6-D eval, and a thread_local would pin that per worker thread for the life of the thread (≈ the process) with no way to free it — bad under the TBB/PaRSEC backends, whose arenas touch more threads than MAD_NUM_THREADS. eval_scratch_clear<R>() frees them. Each thread first-touches its own pair (NUMA-local); buffers grow monotonically to the largest need seen on that thread. Never shared across threads.
| void madness::detail::eval_scratch_clear | ( | ) |
Free every thread's general_fast_transform scratch buffers. Call only at a quiescent point — no eval may be in flight and no reference returned by eval_scratch<R>() may still be in use (see thread_specific::clear()).
| thread_specific< EvalScratch< R > > & madness::detail::eval_scratch_pool | ( | ) |
The function-local static pool backing eval_scratch<R>(). One pool per result type R, shared by every FunctionImpl<T,NDIM> of that type; its lifetime is the process, but eval_scratch_clear<R>() reclaims the buffers on demand.
| memfnT madness::detail::get_mem_func_ptr | ( | const MemFuncWrapper< ptrT, memfnT, resT > & | wrapper | ) |
Returns the member function pointer from a wrapper.
| ptrT | Pointer type. |
| memfnT | Member function pointer type. |
| resT | Member function return type. |
| wrapper | Wrapper to the member function. |
Referenced by madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::get_func().
|
inline |
References a.
Referenced by madness::plotpovray().
| double madness::detail::mynorm | ( | int | t | ) |
| T madness::detail::mynorm | ( | std::complex< T > | t | ) |
| T madness::detail::mynorm | ( | T | t | ) |
Referenced by madness::Tensor< T >::normf().
| double madness::detail::norm | ( | const T & | t | ) |
References std::abs().
Referenced by madness::adq1().
| double madness::detail::norm | ( | const Tensor< T > & | t | ) |
References madness::Tensor< T >::normf().
| std::ostream & madness::detail::operator<< | ( | std::ostream & | out, |
| const RemoteCounter & | counter | ||
| ) |
| bool madness::detail::operator<= | ( | const WorldPtr< T > & | left, |
| const WorldPtr< U > & | right | ||
| ) |
Less-than-equal-to comparison operator.
This operator does a lexicographical comparison of world ID, rank, and pointer (in that order).
| T | One pointer type. |
| U | Another pointer type. |
| [in] | left | One pointer. |
| [in] | right | The other pointer. |
| bool madness::detail::operator> | ( | const WorldPtr< T > & | left, |
| const WorldPtr< U > & | right | ||
| ) |
Greater-than comparison operator.
This operator does a lexicographical comparison of world ID, rank, and pointer (in that order).
| T | One pointer type. |
| U | Another pointer type. |
| [in] | left | One pointer. |
| [in] | right | The other pointer. |
| bool madness::detail::operator>= | ( | const WorldPtr< T > & | left, |
| const WorldPtr< U > & | right | ||
| ) |
Greater-than-equal-to comparison operator.
This operator does a lexicographical comparison of world ID, rank, and pointer (in that order).
| T | One pointer type. |
| U | Another pointer type. |
| [in] | left | One pointer. |
| [in] | right | The other pointer. |
Extract the unique object ID from an incoming active message header.
We deserialize the header and all arguments at the same time to simplify the code. However, it is common that when sending a message to an item in a container to include a pointer to the container itself. But this breaks if the container is not initialized since the deserialization throws if the object is not initialized (which seems preferable to a hidden race condition). Hence, we use this routine to extract the unique ID from the very front of the info structure. For efficiency we here rely upon the serialization of info being opaque and the ID being at the front of info.
| [in] | arg | The active message header. |
References madness::arg().
Referenced by madness::WorldObject< Derived >::handler(), and madness::WorldObject< Derived >::spawn_remote_task_handler().
| bool & madness::detail::print_meminfo_flag_accessor | ( | ) |
| bool & madness::detail::print_meminfo_keepstreamopen_accessor | ( | ) |
Referenced by madness::print_meminfo_keep_ostream_open(), and madness::print_meminfo_keep_ostream_open().
| void madness::detail::print_mutex_error | ( | int | error_number | ) |
| void madness::detail::reconstruct_for_norm | ( | World & | world, |
| const std::vector< Function< T, NDIM > > & | v | ||
| ) |
put a vector of functions into a state whose coefficients sum to ||f||^2
norm2sq_local() adds up the nodes of a tree, which is the norm only in a state that carries the coefficients once; where the duplicates are the interior nodes it skips them, so the redundant and nonstandard-with-leaves trees left behind by mul_sparse() and friends need no conversion at all. The rest are reconstructed, and that is a mutation: it discards the interior coefficients. So fence first, or the removal tasks race a task still reading those coefficients, e.g. a mul_sparse(..., fence=false) that has not been fenced yet. Cf. Function::norm2(), which does the same for a single function. The branch is taken on the tree state, which is replicated, so all ranks take the same branch and the global ops stay collective.
References madness::f, madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_CHECK_THROW, madness::reconstruct(), and v.
Referenced by madness::norm2(), madness::norm2s(), and madness::norm2s_T().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, a2, and madness::Future< T >::set().
|
inline |
References a1, and madness::Future< T >::set().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References a1.
|
inline |
|
inline |
References madness::detail::RemoteCounter::swap().
Swap the content of l with r.
| T | The world pointer type. |
| [in,out] | l | One world pointer. |
| [in,out] | r | The other world pointer. |
References madness::detail::WorldPtr< T >::swap().
Referenced by madness::detail::RemoteCounter::swap(), and madness::RemoteReference< T >::swap().
|
inline |
References madness::ThreadTag_NonMADNESS.
Referenced by madness::is_madness_thread(), madness::is_main_thread(), madness::set_thread_tag(), and madness::set_thread_tag().
| const Char * madness::detail::Vm_cstr | ( | ) |
| const char * madness::detail::Vm_cstr< char > | ( | ) |
Referenced by madness::print_meminfo().
| const wchar_t * madness::detail::Vm_cstr< wchar_t > | ( | ) |
References L.
| MemFuncWrapper< const objT *, memfnT, typename result_of< memfnT >::type > madness::detail::wrap_mem_fn | ( | const objT & | obj, |
| memfnT | memfn | ||
| ) |
Create a member function wrapper (MemFuncWrapper) from a const object and a member function pointer.
| objT | The object type. |
| memfnT | The member function pointer type. |
| [in] | obj | The object. |
| [in] | memfn | The member function pointer. |
| MemFuncWrapper< const objT *, memfnT, typename result_of< memfnT >::type > madness::detail::wrap_mem_fn | ( | const objT * | obj, |
| memfnT | memfn | ||
| ) |
Create a member function wrapper (MemFuncWrapper) from a const pointer and a member function pointer.
| objT | The object type. |
| memfnT | The member function pointer type. |
| [in] | obj | Pointer to the object. |
| [in] | memfn | The member function pointer. |
| MemFuncWrapper< std::shared_ptr< objT >, memfnT, typename result_of< memfnT >::type > madness::detail::wrap_mem_fn | ( | const std::shared_ptr< objT > & | obj, |
| memfnT | memfn | ||
| ) |
Create a member function wrapper (MemFuncWrapper) from a const shared pointer and a member function pointer.
| objT | The object type. |
| memfnT | The member function pointer type. |
| [in] | obj | Shared pointer to the object. |
| [in] | memfn | The member function pointer. |
| MemFuncWrapper< objT *, memfnT, typename result_of< memfnT >::type > madness::detail::wrap_mem_fn | ( | objT & | obj, |
| memfnT | memfn | ||
| ) |
Create a member function wrapper (MemFuncWrapper) from an object and a member function pointer.
| objT | The object type. |
| memfnT | The member function pointer type. |
| [in] | obj | The object. |
| [in] | memfn | The member function pointer. |
Referenced by madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::activate(), madness::FunctionImpl< T, NDIM >::add_op::activate(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::activate(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::activate(), and madness::WorldTaskQueue::add().
| MemFuncWrapper< objT *, memfnT, typename result_of< memfnT >::type > madness::detail::wrap_mem_fn | ( | objT * | obj, |
| memfnT | memfn | ||
| ) |
Create a member function wrapper (MemFuncWrapper) from a pointer and a member function pointer.
| objT | The object type. |
| memfnT | The member function pointer type. |
| [in] | obj | Pointer to the object. |
| [in] | memfn | The member function pointer. |
| MemFuncWrapper< std::shared_ptr< objT >, memfnT, typename result_of< memfnT >::type > madness::detail::wrap_mem_fn | ( | std::shared_ptr< objT > & | obj, |
| memfnT | memfn | ||
| ) |
Create a member function wrapper (MemFuncWrapper) from a shared pointer and a member function pointer.
| objT | The object type. |
| memfnT | The member function pointer type. |
| [in] | obj | Shared pointer to the object. |
| [in] | memfn | The member function pointer. |
| Mutex madness::detail::printmutex |
Referenced by madness::print(), and madness::print_error().