91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8KB
    文件類(lèi)型: .cpp
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-07
  • 語(yǔ)言: C/C++
  • 標(biāo)簽: open??mpi??cpp??parallel??

資源簡(jiǎn)介

運(yùn)用mpi實(shí)現(xiàn)奇偶排序,在不同的處理器之間通過(guò)消息傳遞完成奇偶index的數(shù)的交換,實(shí)現(xiàn)最終的數(shù)列排序

資源截圖

代碼片段和文件信息

//??4005?A1
//??main.cpp
//??student?name:?Yinxian?She
//??student?ID:?115010061
//??Created?by?佘胤嫻?on?2018/10/15.

//use?these?command?lines?to?compile?ane?exe?the?program:
//mpic++?4005a1.cpp?-o?4005a1.out
//mpiexec?--oversubscribe?-n?4?./4005a1.out

#include?
#include?
#include?
#include?//cannot?found??how?about?sys/malloc.h
#include?
#include?
#include?

//need?to?set?in?cpp?file?to?change?the?array?size
int?count?=?10;
int?data[10];


/*function:arraygener
?------------------------
?usage:?to?generate?the?array?with?size?of?[count];
????????all?the?elements?are?random?generated.
?why?put?it?here?
?*/
void?arraygener(){
????//srand((unsigned)?time?(NULL));
????for?(int?i?=0;?i????????data[i]?=?(int)(rand()/

評(píng)論

共有 條評(píng)論