Proj2.pdf

  • Uploaded by: katayoun
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Proj2.pdf as PDF for free.

More details

  • Words: 109
  • Pages: 1
‫ﭘﺮوژه دوم درس ﭘﺮدازش ﻣﻮازی‬ ‫ﻣﻬﻠﺖ‪ ١٢ :‬دی‬ ‫اﻟ ﻮرﯾﺘﻢ ﻣﺮﺗﺐ ﺳﺎزی زوج و ﻓﺮد‪.‬‬ ‫اﻟﮕﻮرﯾﺘﻢ ﻣﺮﺗﺐ ﺳﺎزی زوج و ﻓﺮد را ﺑﺮای ‪ n < ١٠٠‬در ﭼﺎرﭼﻮب ‪ CUDA‬ﭘﯿﺎده ﺳﺎزی ﮐﻨﯿﺪ‪ .‬در‬ ‫ﻃﻮل اﺟﺮای ﺑﺮﻧﺎﻣﻪ ﻓﻘﻂ ﺑﺎﯾﺪ از ﯾﮏ ﻫﺴﺘﻪ ‪ ١‬اﺳﺘﻔﺎده ﮐﻨﯿﺪ و ﻫﻤﭽﻨﯿﻦ ﺑﺎﯾﺪ از روش ﻫﻤﺎﻫﻨﮕﯽ ﺑﯿﻦ‬ ‫ﻧﺦ ﻫﺎ اﺳﺘﻔﺎده ﮐﻨﯿﺪ‪ .‬ﺑﺮﻧﺎﻣﻪ ای ﺑﻨﻮﯾﺴﯿﺪ ﮐﻪ اﺑﺘﺪا ‪ n‬را از ورودی اﺳﺘﺎﻧﺪارد ﺑﮕﯿﺮد و ﺳﭙﺲ ‪ n‬ﻋﺪد‬ ‫ﺑﻪ ﻋﻨﻮان ورودی ﮐﻪ ﺑﯿﻦ ﻫﺮ ﮐﺪام ﯾﮏ ﻓﺎﺻﻠﻪ اﺳﺖ از ورودی درﯾﺎﻓﺖ ﮐﻨﺪ‪ .‬ﻧﺘﯿﺠﻪ اﻋﺪاد ﻣﺮﺗﺐ ﺷﺪه‬ ‫ﺑﻪ ﺻﻮرت ﻏﯿﺮ ﻧﺰوﻟﯽ را در ﺧﺮوﺟﯽ اﺳﺘﺎﻧﺪارد ﺑﻨﻮﯾﺴﯿﺪ‪ .‬ﺑﯿﻦ ﻫﺮ دو ﻋﺪد در ﺧﺮوﺟﯽ ﯾﮏ ﻓﺎﺻﻠﻪ‬ ‫ﺑﮕﺬارﯾﺪ‪.‬‬

‫‪Kernel‬‬

‫‪١‬‬

‫‪١‬‬

More Documents from "katayoun"

Emg.docx
April 2020 0
Proj2.pdf
April 2020 1
Rbtak2.docx
April 2020 0
Yhy
October 2019 2
April 2020 4