diff --git a/test/cilksan/TestCases/reducer-lock-test.cpp b/test/cilksan/TestCases/reducer-lock-test.cpp index 9fe405f..c2d9aab 100644 --- a/test/cilksan/TestCases/reducer-lock-test.cpp +++ b/test/cilksan/TestCases/reducer-lock-test.cpp @@ -3,13 +3,13 @@ #include #include -#include +#include #include #include #include int main() { - cilk::reducer_opadd sum; + cilk::opadd_reducer sum; int rsum = 0; int lsum = 0; pthread_mutex_t mtex; @@ -22,8 +22,8 @@ int main() { lsum += i; pthread_mutex_unlock(&mtex); } - printf("%p\n%p\n%p\n",(void*)&(sum.get_value()),(void*)&rsum,(void*)&lsum); - printf("%d\n%d\n%d\n",sum.get_value(),rsum,lsum); + printf("%p\n%p\n%p\n",(void*)&(sum),(void*)&rsum,(void*)&lsum); + printf("%d\n%d\n%d\n",sum,rsum,lsum); } // CHECK: Race detected on location [[RSUM:[0-9a-f]+]] diff --git a/test/cilksan/TestCases/sum-ints.cpp b/test/cilksan/TestCases/sum-ints.cpp index 0d4f163..902017d 100644 --- a/test/cilksan/TestCases/sum-ints.cpp +++ b/test/cilksan/TestCases/sum-ints.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -320,11 +320,11 @@ sum_t accum_spawn (num_t n) { */ sum_t accum_reducer (num_t n) { - cilk::reducer_opadd sum(0); + cilk::opadd_reducer sum(0); cilk_for (num_t i = 0; i < n; i++) - *sum += i; + sum += i; - return sum.get_value(); + return sum; } diff --git a/test/cilksan/TestCases/sum-vector-int.cpp b/test/cilksan/TestCases/sum-vector-int.cpp index fecb3ae..8f2a6a7 100644 --- a/test/cilksan/TestCases/sum-vector-int.cpp +++ b/test/cilksan/TestCases/sum-vector-int.cpp @@ -46,7 +46,7 @@ #include #include -#include +#include #ifdef WLS #include @@ -361,11 +361,11 @@ sum_t accum_spawn (num_vec_t const & vals) { */ sum_t accum_reducer (num_vec_t const & vals) { - cilk::reducer_opadd sum(0); + cilk::opadd_reducer sum(0); cilk_for (auto i = 0; i < vals.size(); i++) - *sum += vals[i]; + sum += vals[i]; - return sum.get_value(); + return sum; }