summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test/tasking
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2019-09-25 14:40:19 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2019-09-25 14:40:19 +0000
commita1639b9bba7cc6ef32a6a0c4db4f98301b91f6be (patch)
tree574bf499dd3df6f8852253b4e1755297e8f277fa /openmp/runtime/test/tasking
parent6d4ea22e70924da411998edcbdb321bfd3f17545 (diff)
downloadbcm5719-llvm-a1639b9bba7cc6ef32a6a0c4db4f98301b91f6be.tar.gz
bcm5719-llvm-a1639b9bba7cc6ef32a6a0c4db4f98301b91f6be.zip
Enable tasks dependencies hashmaps resizing.
Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D67447 llvm-svn: 372879
Diffstat (limited to 'openmp/runtime/test/tasking')
-rw-r--r--openmp/runtime/test/tasking/omp_task_depend_resize_hashmap.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/openmp/runtime/test/tasking/omp_task_depend_resize_hashmap.c b/openmp/runtime/test/tasking/omp_task_depend_resize_hashmap.c
new file mode 100644
index 00000000000..03f12b06dfe
--- /dev/null
+++ b/openmp/runtime/test/tasking/omp_task_depend_resize_hashmap.c
@@ -0,0 +1,38 @@
+// RUN: %libomp-compile && env KMP_ENABLE_TASK_THROTTLING=0 %libomp-run
+
+#include<omp.h>
+#include<stdlib.h>
+#include<string.h>
+
+// The first hashtable static size is 997
+#define NUM_DEPS 4000
+
+
+int main()
+{
+ int *deps = calloc(NUM_DEPS, sizeof(int));
+ int i;
+ int failed = 0;
+
+ #pragma omp parallel
+ #pragma omp master
+ {
+ for (i = 0; i < NUM_DEPS; i++) {
+ #pragma omp task firstprivate(i) depend(inout: deps[i])
+ {
+ deps[i] = 1;
+ }
+ #pragma omp task firstprivate(i) depend(inout: deps[i])
+ {
+ deps[i] = 2;
+ }
+ }
+ }
+
+ for (i = 0; i < NUM_DEPS; i++) {
+ if (deps[i] != 2)
+ failed++;
+ }
+
+ return failed;
+}
OpenPOWER on IntegriCloud