Introduction[edit]An illustration of multithreading where the master t การแปล - Introduction[edit]An illustration of multithreading where the master t ไทย วิธีการพูด

Introduction[edit]An illustration o

Introduction[edit]

An illustration of multithreading where the master thread forks off a number of threads which execute blocks of code in parallel.
See also: Fork–join model
OpenMP is an implementation of multithreading, a method of parallelizing whereby a master thread (a series of instructions executed consecutively) forks a specified number of slave threads and a task is divided among them. The threads then run concurrently, with the runtime environment allocating threads to different processors.

The section of code that is meant to run in parallel is marked accordingly, with a preprocessor directive that will cause the threads to form before the section is executed.[4] Each thread has an id attached to it which can be obtained using a function (called omp_get_thread_num()). The thread id is an integer, and the master thread has an id of 0. After the execution of the parallelized code, the threads join back into the master thread, which continues onward to the end of the program.

By default, each thread executes the parallelized section of code independently. Work-sharing constructs can be used to divide a task among the threads so that each thread executes its allocated part of the code. Both task parallelism and data parallelism can be achieved using OpenMP in this way.

The runtime environment allocates threads to processors depending on usage, machine load and other factors. The number of threads can be assigned by the runtime environment based on environment variables or in code using functions. The OpenMP functions are included in a header file labelled omp.h in C/C++.
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
[แก้ไข] แนะนำ

ภาพของมัลติเธรดที่ส้อมหัวข้อหลักปิดจำนวนเธรดที่ดำเนินการบล็อกของรหัสในขนาน
ดู: ส้อม – รวมรูป
OpenMP เป็นการนำไปใช้ของมัลติเธรด วิธีของ parallelizing โดยหัวข้อหลัก (ชุดของคำแนะนำในการดำเนินการอย่างต่อเนื่อง) จำนวนกระทู้ทาส forks และงานถูกแบ่งออกในหมู่พวกเขา กระทู้แล้วรันพร้อม สภาพแวดล้อมรันไทม์ที่ปันส่วนเธรดการประมวลผลแตกต่างกัน

ส่วนของรหัสที่ต้องการรันพร้อมกันถูกทำเครื่องหมาย ตาม ด้วยคำสั่ง preprocessor ที่จะทำให้หัวข้อแบบฟอร์มก่อนส่วนจะดำเนินการ[4] แต่ละหัวข้อมีรหัสแนบซึ่งสามารถรับได้โดยใช้ฟังก์ชัน (เรียกว่า omp_get_thread_num()) รหัสหัวข้อจำนวนเต็ม และรหัส 0 มีหัวข้อหลัก หลังจากการดำเนินการของรหัส parallelized เธรดร่วมไว้ด้ายหลัก ซึ่งเป็นต้นไปยังจุดสิ้นสุดของโปรแกรม

โดยค่าเริ่มต้น แต่ละหัวข้อดำเนินการส่วน parallelized รหัสอย่างอิสระ สามารถใช้โครงสร้างการทำงานร่วมกันเพื่อแบ่งงานในเธรดที่แต่ละหัวข้อดำเนินการปันส่วนของรหัส ทั้งงาน parallelism และ parallelism ข้อมูลสามารถทำได้โดยใช้ OpenMP ในวิธีนี้

สภาพแวดล้อมขณะทำงานเธรดการประมวลผลการใช้งาน ผลิตเครื่องจักร และปัจจัยอื่น ๆ ที่จัดสรร สามารถกำหนดจำนวนหัวข้อ โดยสภาพแวดล้อมรันไทม์ตามตัวแปรของสภาพแวดล้อม หรือ ในรหัสการใช้ฟังก์ชัน ฟังก์ชัน OpenMP จะรวมอยู่ในแฟ้มหัวมัน omp.h ใน C/C
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
Introduction[edit]

An illustration of multithreading where the master thread forks off a number of threads which execute blocks of code in parallel.
See also: Fork–join model
OpenMP is an implementation of multithreading, a method of parallelizing whereby a master thread (a series of instructions executed consecutively) forks a specified number of slave threads and a task is divided among them. The threads then run concurrently, with the runtime environment allocating threads to different processors.

The section of code that is meant to run in parallel is marked accordingly, with a preprocessor directive that will cause the threads to form before the section is executed.[4] Each thread has an id attached to it which can be obtained using a function (called omp_get_thread_num()). The thread id is an integer, and the master thread has an id of 0. After the execution of the parallelized code, the threads join back into the master thread, which continues onward to the end of the program.

By default, each thread executes the parallelized section of code independently. Work-sharing constructs can be used to divide a task among the threads so that each thread executes its allocated part of the code. Both task parallelism and data parallelism can be achieved using OpenMP in this way.

The runtime environment allocates threads to processors depending on usage, machine load and other factors. The number of threads can be assigned by the runtime environment based on environment variables or in code using functions. The OpenMP functions are included in a header file labelled omp.h in C/C++.
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
แนะนำ [ แก้ไข ]

ภาพประกอบของ Multithreading ซึ่งอาจารย์ด้ายส้อมออกหมายเลขของหัวข้อที่ใช้บล็อกของรหัสในแบบคู่ขนาน .
ดูส้อม–ร่วมรุ่น
openmp คือการดำเนินการของ Multithreading วิธีการของ parallelizing โดยอาจารย์ด้าย ( ชุดคําสั่งประหารตามลำดับ ) ส้อมระบุหมายเลข ทาสของหัวข้อ และงานแบ่งออกของพวกเขากระทู้วิ่งควบคู่กันไปกับสภาพแวดล้อมรันไทม์การจัดสรรหัวข้อที่โปรเซสเซอร์ที่แตกต่างกัน

ส่วนของโค้ดที่ต้องวิ่งขนานเป็นเครื่องหมายตาม ด้วยคำสั่งพรีโพรเซสเซอร์ที่จะทำให้หัวข้อแบบฟอร์มก่อนส่วนจะดำเนินการ [ 4 ] แต่ละหัวข้อมี ID ที่แนบมากับมัน ซึ่งสามารถ ได้มาโดยใช้ฟังก์ชัน ( เรียกว่า omp_get_thread_num() )หัวข้อ ID เป็นจำนวนเต็ม และอาจารย์ด้ายมี ID ของ 0 หลังจากการดําเนินการของ parallelized รหัส , หัวข้อเข้าร่วมกลับเข้ามาในกระทู้หลัก ซึ่งยังคงไปถึงจุดสิ้นสุดของโปรแกรม

โดยค่าเริ่มต้นแต่ละหัวข้อสามารถ parallelized ส่วนของโค้ดที่เป็นอิสระใช้งานโครงสร้างสามารถใช้ในการแบ่งงานของแต่ละหัวข้อเพื่อให้ด้ายรันการจัดสรรส่วนหนึ่งของรหัส ขนานทั้งงานและข้อมูลความสามารถทำได้โดยการ openmp ในวิธีนี้

สภาพแวดล้อมรันไทม์จัดสรรหัวข้อ ( ขึ้นอยู่กับการใช้โหลดเครื่องและปัจจัยอื่น ๆเลขกระทู้สามารถกำหนดโดยสภาพแวดล้อมรันไทม์บนพื้นฐานของตัวแปรสภาพแวดล้อมหรือรหัสที่ใช้ฟังก์ชัน การ openmp ฟังก์ชันจะถูกรวมอยู่ในไฟล์ส่วนหัว labelled OMP H C / C .
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2025 I Love Translation. All reserved.

E-mail: