... | ... |
@@ -6,13 +6,6 @@ |
6 | 6 |
#include <stdint.h> |
7 | 7 |
#include <utility> |
8 | 8 |
|
9 |
-//omp_lock_t lock; |
|
10 |
- |
|
11 |
-AtomicDomain::AtomicDomain() |
|
12 |
-{ |
|
13 |
- //omp_init_lock(&lock); |
|
14 |
-} |
|
15 |
- |
|
16 | 9 |
// O(1) |
17 | 10 |
Atom AtomicDomain::front() const |
18 | 11 |
{ |
... | ... |
@@ -117,7 +110,7 @@ Atom AtomicDomain::insert(uint64_t pos, float mass) |
117 | 110 |
// swap with last atom in vector, pop off the back |
118 | 111 |
void AtomicDomain::erase(uint64_t pos) |
119 | 112 |
{ |
120 |
- // get vector index of this atom and erase it |
|
113 |
+ // get vector index of this atom |
|
121 | 114 |
uint64_t index = mAtomPositions.at(pos); |
122 | 115 |
|
123 | 116 |
// connect neighbors of atom to be deleted |
... | ... |
@@ -151,7 +144,7 @@ void AtomicDomain::erase(uint64_t pos) |
151 | 144 |
} |
152 | 145 |
} |
153 | 146 |
|
154 |
- // delete atom from vector in O(1) |
|
147 |
+ // delete atom from vector in O(1), map in O(logN) |
|
155 | 148 |
mAtomPositions.erase(pos); |
156 | 149 |
mAtoms.pop_back(); |
157 | 150 |
mUsedPositions.erase(pos); |
... | ... |
@@ -56,5 +56,12 @@ std::string getBuildReport_cpp() |
56 | 56 |
#else |
57 | 57 |
std::string simd = "SIMD not enabled\n"; |
58 | 58 |
#endif |
59 |
- return compiler + simd; |
|
59 |
+ |
|
60 |
+#if defined(_OPENMP) |
|
61 |
+ std::string openmp = "Compiled with OpenMP\n"; |
|
62 |
+#else |
|
63 |
+ std::string openmp = "Compiler did not support OpenMP\n"; |
|
64 |
+#endif |
|
65 |
+ |
|
66 |
+ return compiler + simd + openmp; |
|
60 | 67 |
} |