[Openmp-commits] [PATCH] D68036: Tasks dependencies hash re-sizing fixed
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Oct 25 06:08:24 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbe29d9285487: OpenMP Tasks dependencies hash re-sizing fixed. (authored by AndreyChurbanov).
Changed prior to commit:
https://reviews.llvm.org/D68036?vs=221797&id=226421#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68036/new/
https://reviews.llvm.org/D68036
Files:
openmp/runtime/src/kmp_taskdeps.cpp
Index: openmp/runtime/src/kmp_taskdeps.cpp
===================================================================
--- openmp/runtime/src/kmp_taskdeps.cpp
+++ openmp/runtime/src/kmp_taskdeps.cpp
@@ -85,19 +85,19 @@
h->nelements = current_dephash->nelements;
h->buckets = (kmp_dephash_entry **)(h + 1);
h->generation = gen;
-
+ h->nconflicts = 0;
// insert existing elements in the new table
for (size_t i = 0; i < current_dephash->size; i++) {
- kmp_dephash_entry_t *next;
- for (kmp_dephash_entry_t *entry = current_dephash->buckets[i]; entry; entry = next) {
+ kmp_dephash_entry_t *next, *entry;
+ for (entry = current_dephash->buckets[i]; entry; entry = next) {
next = entry->next_in_bucket;
// Compute the new hash using the new size, and insert the entry in
// the new bucket.
kmp_int32 new_bucket = __kmp_dephash_hash(entry->addr, h->size);
+ entry->next_in_bucket = h->buckets[new_bucket];
if (entry->next_in_bucket) {
h->nconflicts++;
}
- entry->next_in_bucket = h->buckets[new_bucket];
h->buckets[new_bucket] = entry;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68036.226421.patch
Type: text/x-patch
Size: 1131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20191025/6e88b054/attachment.bin>
More information about the Openmp-commits
mailing list