16 #ifndef polybori_cache_CCacheManagement_h_
17 #define polybori_cache_CCacheManagement_h_
26 #include <boost/intrusive_ptr.hpp>
40 template <
class TagType>
107 template <
class TagType>
115 template <
class BaseTag>
131 template <
unsigned Counted,
unsigned Offset = 18>
135 ( ((Counted + Offset) & 0x3 ) << 2) |
136 ( ((Counted + Offset) & 0x1C ) << 3) | 0x2 };
144 template <
class MgrType>
197 return m_mgr.getManager();
218 template <
class ManagerType,
class CacheType,
unsigned ArgumentLength>
222 template <
class CacheType,
unsigned ArgumentLength>
230 template <
class CacheType,
unsigned ArgumentLength>
237 template <
class CacheType,
unsigned ArgumentLength>
243 template <
class ManagerType,
class CacheType>
245 public pbori_base<CCacheManBase<ManagerType, CacheType, 0> >::type {
274 template <
class ManagerType,
class CacheType>
276 public pbori_base<CCacheManBase<ManagerType, CacheType, 1> >::type {
314 insert(node.getNode(), result.getNode());
319 using base::internalManager;
323 static node_type cache_dummy(
typename base::internal_manager_type,node_type){
329 template <
class ManagerType,
class CacheType>
331 public pbori_base<CCacheManBase<ManagerType, CacheType, 2> >::type {
368 insert(first.getNode(), second.getNode(), result.getNode());
373 using base::internalManager;
377 static node_type cache_dummy(
typename base::internal_manager_type,
378 node_type, node_type){
384 template <
class ManagerType,
class CacheType>
386 public pbori_base<CCacheManBase<ManagerType, CacheType, 3> >::type {
408 first, second, third);
422 first, second, third, result);
428 insert(first.getNode(), second.getNode(), third.getNode(),
434 using base::internalManager;
437 enum { GENERIC_DD_TAG =
453 template <
class ManagerType,
class CacheType,
454 unsigned ArgumentLength = CacheType::nargs>
457 CacheType, ArgumentLength> {
467 enum { nargs = ArgumentLength };
487 template <
class ManagerType,
class CacheType>
511 if ( std::less<node_type>()(first, second) )
512 return base::find(first, second);
514 return base::find(second, first);
525 if ( std::less<node_type>()(first, second) )
526 base::insert(first, second, result);
528 base::insert(second, first, result);
533 insert(first.getNode(), second.getNode(), result.getNode());