33#ifndef MADNESS_MRA_SIMPLECACHE_H__INCLUDED
34#define MADNESS_MRA_SIMPLECACHE_H__INCLUDED
45 template <
typename Q, std::
size_t NDIM>
49 typedef std::pair<Key<NDIM>,
Q>
pairT;
69 return &(
test->second);
Definition worldhashmap.h:396
std::pair< iterator, bool > insert(const datumT &datum)
Definition worldhashmap.h:468
iterator end()
Definition worldhashmap.h:583
iterator find(const keyT &key)
Definition worldhashmap.h:524
void clear()
Definition worldhashmap.h:556
iterator for hash
Definition worldhashmap.h:188
Key is the index for a node of the 2^NDIM-tree.
Definition key.h:66
const Vector< Translation, NDIM > & translation() const
Definition key.h:164
Simplified interface around hash_map to cache stuff for 1D.
Definition simplecache.h:46
const Q * getptr(Level n, const Key< NDIM > &disp) const
If key=(n,l) is present return pointer to cached value, otherwise return NULL.
Definition simplecache.h:85
ConcurrentHashMap< Key< NDIM >, Q > mapT
Definition simplecache.h:48
void set(Level n, const Key< NDIM > &disp, const Q &val)
Definition simplecache.h:101
SimpleCache()
Definition simplecache.h:53
mapT cache
Definition simplecache.h:50
SimpleCache & operator=(const SimpleCache &c)
Definition simplecache.h:57
const Q * getptr(Level n, Translation l) const
If key=(n,l) is present return pointer to cached value, otherwise return NULL.
Definition simplecache.h:76
std::pair< Key< NDIM >, Q > pairT
Definition simplecache.h:49
SimpleCache(const SimpleCache &c)
Definition simplecache.h:55
void set(const Key< NDIM > &key, const Q &val)
Set value associated with key ... gives ownership of a new copy to the container.
Definition simplecache.h:92
const Q * getptr(const Key< NDIM > &key) const
If key is present return pointer to cached value, otherwise return NULL.
Definition simplecache.h:66
void set(Level n, Translation l, const Q &val)
Definition simplecache.h:96
A simple, fixed dimension vector.
Definition vector.h:64
Multidimension Key for MRA tree and associated iterators.
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
int64_t Translation
Definition key.h:54
int Level
Definition key.h:55
double Q(double a)
Definition relops.cc:20
static const double c
Definition relops.cc:10
Defines and implements a concurrent hashmap.
void test()
Definition y.cc:696