MPQC  3.0.0-alpha
sc::ConcurrentCacheWithSymmetry< val_type, symmetry, key_types > Class Template Reference

A cache of objects that can be safely accessed concurrently by threads that share memory. More...

#include <util/container/conc_cache.h>

Inheritance diagram for sc::ConcurrentCacheWithSymmetry< val_type, symmetry, key_types >:
sc::ConcurrentCacheBase< val_type, key_types... >

Public Types

typedef ConcurrentCacheBase< val_type, key_types... > super_t
 
- Public Types inherited from sc::ConcurrentCacheBase< val_type, key_types... >
using tuple_type = boost::tuple< Types... >
 types for keys More...
 
typedef tuple_type< key_types... > key_tuple
 The type used as a key into the map.
 
typedef val_type value_type
 types for map of values More...
 
typedef boost::shared_future< value_typefuture_value
 A future of a value, used to prevent recomputation.
 
typedef madness::ConcurrentHashMap< key_tuple, future_value, _hash< key_tuple > > future_map
 A map from keys to futures.
 
typedef future_map::accessor future_map_accessor
 The accessor type used by the madness ConcurrentHashMap.
 
typedef future_map::const_accessor future_map_const_accessor
 The const accessor used by the madness ConcurrentHashMap.
 

Public Member Functions

super_t::value_type get_or_permute (key_types... keys, const std::function< typename super_t::value_type(const typename super_t::key_tuple &)> &compute_fxn, const std::function< typename super_t::value_type(const typename super_t::value_type &, const typename super_t::key_tuple &)> &permute_fxn)
 
- Public Member Functions inherited from sc::ConcurrentCacheBase< val_type, key_types... >
 ConcurrentCacheBase (int nbins)
 
value_type get (key_types... keys, const std::function< value_type()> &compute_fxn)
 
value_type get (key_types... keys, const std::function< value_type(const key_tuple &)> &compute_fxn)
 
void clear ()
 

Additional Inherited Members

- Protected Attributes inherited from sc::ConcurrentCacheBase< val_type, key_types... >
future_map cached_values_
 

Detailed Description

template<typename val_type, typename symmetry, typename... key_types>
class sc::ConcurrentCacheWithSymmetry< val_type, symmetry, key_types >

A cache of objects that can be safely accessed concurrently by threads that share memory.

Some cached objects may be transformable into objects corresponding to other keys via a transformation.


The documentation for this class was generated from the following file:

Generated at Sun Jan 26 2020 23:24:04 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.