The use of multiple threads in OpenMP is simplified.

Source: Internet
Author: User

Http://hi.baidu.com/diwulechao/item/bc6d865c411b813c32e0a932

Http://www.cnblogs.com/yangyangcv/archive/2012/03/23/2413335.html

Http://blog.sina.com.cn/s/blog_66474b160100z15b.html

These three articles have already been well described.

Key Syntax:

# Inlcude <omp. h> omp parallel for omp for ction (+: variable) omp critical omp parallel for private (x, y) omp parallel for schedule (static/dynamic/guided, k) omp parallel sections omp section omp parallel omp master/single omp barrier/nowait omp parallel for firstprivate (variable)/lastprivate (variable)

There is also the OpenMP API:

Omp_get_num_threads (); omp_get_num_threads (//...) nt omp_get_thread_num (); omp_get_num_procs ();

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.