CodingKnight's blog

By CodingKnight, 9 days ago, In English

Hello Codeforces,

I got the following compilation error

Cannot compile file:
In file included from C:/Programs/msys2-mingw64-9/include/c++/9.2.0/pstl/parallel_backend.h:14,
                 from C:/Programs/msys2-mingw64-9/include/c++/9.2.0/pstl/algorithm_impl.h:25,
                 from C:/Programs/msys2-mingw64-9/include/c++/9.2.0/pstl/glue_execution_defs.h:52,
                 from C:/Programs/msys2-mingw64-9/include/c++/9.2.0/execution:32,
                 from program.cpp:2:
C:/Programs/msys2-mingw64-9/include/c++/9.2.0/pstl/parallel_backend_tbb.h:19:10: fatal error: tbb/blocked_range.h: No such file or directory
   19 | #include <tbb/blocked_range.h>

when I added the include command #include <execution> to use the execution::par constant.


The program compiles successfully on my local computer. Am I missing something that can fix this compilation error?

  • Vote: I like it
  • -5
  • Vote: I do not like it

9 days ago, # |
  Vote: I like it +9 Vote: I do not like it

Note that testing systems typically add up CPU time for all cores, so any parallelism will only make your program more likely to get a TL.

  • »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks for the feedback. I was interested in comparing the performance of the program with and without the parallel_policy.