Advertisement
kernel_memory_dump

Untitled

Mar 17th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <cilk/cilk.h>
  3. #include <cilk/reducer_opadd.h>
  4.  
  5. int main()
  6. {
  7. cilk::reducer_opadd<unsigned long> accum(0);
  8. cilk_for (int i = 0; i != 1000; i++) {
  9. *accum += i*i;
  10. }
  11. std::cout << accum.get_value() << "\n";
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement