【强化学习】

To create a team of threads

  • #pragma omp parallel

To share work between threads:

  • #pragma omp for
  • #pragma omp single

To prevent conflicts (prevent races)

  • #pragma omp critical
  • #pragma omp atomic
  • #pragma omp barrier
  • #pragma omp master

Data environment clauses

  • private (variable_list)
  • firstprivate (variable_list)
  • lastprivate (variable_list)
  • reduction(+:variable_list)

你可能感兴趣的:(并行计算)