7 #ifndef __spatial_ProxHash_h__ 8 #define __spatial_ProxHash_h__ 14 #define FE_PROXHASH_THREADED 1 16 #define FE_PROXHASH_THREADED 0 19 #if FE_PROXHASH_THREADED 21 #include "tbb/concurrent_vector.h" 22 #include "tbb/blocked_range.h" 23 #include "tbb/spin_mutex.h" 24 #include "tbb/parallel_for.h" 38 public Initialize<ProxHash>
42 virtual ~ProxHash(
void);
43 void initialize(
void);
46 virtual unsigned int detect( sp<Layout> l_pair,
47 sp<RecordGroup> rg_in,
48 sp<RecordGroup> rg_out);
54 LocalRecord(
void) : m_mark(false)
59 SpatialVector m_location;
64 typedef Array<LocalRecord> t_lrecords;
66 void setup(sp<Scope> spScope);
68 unsigned int hash(
int a_x,
int a_y,
int a_z);
70 void checkSingle(
unsigned int i, Array<unsigned int> &to_check, std::vector<bool> &mark, Array< std::pair<unsigned int, unsigned int> > &a_hits);
71 void accumulateHits(Array< std::pair<unsigned int, unsigned int> > &a_hits);
72 unsigned int sz() {
return m_store.size(); }
73 void transferHitsToPool(Array< std::pair<unsigned int, unsigned int> > &a_hits, FE_UWORD i_pool);
74 FE_UWORD getNextPoolIndex(
void);
76 bool check(
unsigned int a_a,
unsigned int a_b, Array< std::pair<unsigned int, unsigned int> > &a_hits);
77 void transferHitsToPool();
80 AsBounded m_asBounded;
81 AsParticle m_asParticle;
82 AsProximity m_asProximity;
84 Array<BaseAccessor> m_filters;
86 unsigned int m_poolCount;
89 Array< sp<RecordArray> > m_spPool;
91 Array< Array< std::pair<unsigned int, unsigned int> > > m_hits;
93 #if FE_PROXHASH_THREADED 94 tbb::concurrent_vector< std::pair<unsigned int, unsigned int> > m_chits;
96 Array< std::pair<unsigned int, unsigned int> > m_chits;
99 Array< Array<unsigned int> > m_cells;
100 Array<LocalRecord> m_store;
102 hp<Layout> m_hpPairLayout;
105 unsigned int m_tableSize;
107 Array< std::pair<unsigned int, unsigned int> > m_checklist;
109 #if FE_PROXHASH_THREADED 110 tbb::spin_mutex m_mutex;
kernel
Definition: namespace.dox:3