32 #ifndef MADNESS_WORLD_DIST_CACHE_H__INCLUDED
33 #define MADNESS_WORLD_DIST_CACHE_H__INCLUDED
53 template <
typename keyT>
81 template <
typename valueT>
99 template <
typename valueT>
145 template <
typename valueT>
165 cache->template get<value_type>();
184 template <
typename valueT>
199 value.
set(
cache->template get<valueT>());
213 template <
typename valueT>
240 template <
typename keyT>
Definition: worldhashmap.h:396
std::pair< iterator, bool > insert(const datumT &datum)
Definition: worldhashmap.h:468
void erase(const iterator &it)
Definition: worldhashmap.h:507
std::pair< const keyT, valueT > datumT
Definition: worldhashmap.h:399
void set(const Future< T > &other)
A.set(B), where A and B are futures ensures A has/will have the same value as B.
Definition: future.h:508
Definition: worldhashmap.h:330
void release()
Definition: worldhashmap.h:380
Cache value container.
Definition: dist_cache.h:100
virtual const std::type_info & get_type_info() const
Typeid accessor of the derived class.
Definition: dist_cache.h:128
CacheData(const madness::Future< valueT > &value)
Constructor with future initialization.
Definition: dist_cache.h:110
const madness::Future< valueT > & value() const
Data accessor.
Definition: dist_cache.h:121
virtual ~CacheData()
Virtual destructor.
Definition: dist_cache.h:116
madness::Future< valueT > value_
Local cached data.
Definition: dist_cache.h:102
CacheData()
Default constructor.
Definition: dist_cache.h:107
CacheData(const valueT &value)
Constructor with data initialization.
Definition: dist_cache.h:113
Cache interface class.
Definition: dist_cache.h:71
virtual const std::type_info & get_type_info() const =0
Typeid accessor of the derived class.
virtual ~Cache()
Virtual destructor.
Definition: dist_cache.h:75
const madness::Future< valueT > & get() const
Cache data accessor.
Definition: dist_cache.h:82
Distributed caching utility.
Definition: dist_cache.h:54
static void get_cache_value(const keyT &key, madness::Future< valueT > &value)
Get the cache value accosted with key.
Definition: dist_cache.h:185
static cache_container caches_
Cache container.
Definition: dist_cache.h:66
static void set_cache_value(const keyT &key, const valueT &value)
Set the cache value accosted with key.
Definition: dist_cache.h:146
static madness::Future< valueT > get_cache_value(const keyT &key)
Get the cache value accosted with key.
Definition: dist_cache.h:214
madness::ConcurrentHashMap< keyT, Cache * > cache_container
The container that holds cache values.
Definition: dist_cache.h:59
cache_container::datumT datum_type
Cache container datum type.
Definition: dist_cache.h:63
Implements Future and related items.
Defines madness::MadnessException for exception handling.
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition: madness_exception.h:134
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
static class madness::twoscale_cache_class cache[kmax+1]
NDIM & f
Definition: mra.h:2416
T type
Type with Future removed.
Definition: type_traits.h:110
std::pair< int, double > valueT
Definition: test_binsorter.cc:6
Defines and implements a concurrent hashmap.