文件名称:sort-mpi
介绍说明--下载内容均来自于网络,请自行研究使用
* 算法描述: 分段 -> 段内排序 -> 归约结果。
* 1,根进程读取输入,将元素个数广播给各个进程。
* 2,然后各进程计算段长度和段偏移。
* 3,然后根进程选择第一个段,标记站位符。
* 4,跟进程将剩余元素发送给下一进程,下一进程选择段的同时,根进程排序。
* 5,下一进程继续此过程,直到最后一个进程,所有元素都进行排序。
* 6,进程将排序好的元素,按照段偏移归约给根进程。
* 7,根进程输入结果。
* -* Algorithm descr iption: Sub--> paragraph sort-> reduce the results.* 1, the root process to read input, will be broadcast to all elements of the process.* 2, and then the process of calculating the length and offset paragraph.* 3, and then the root process, select the first paragraph, mark at stations.* 4, with the remaining elements of the process sent to the next process, the process of choosing the next paragraph, the root process of sorting.* 5, the next process to continue this process until the last process, all the elements are sorted.* 6, the process will be good to sort elements, in accordance with the above offset to the root process of reduction.* 7, enter the results of the root process.*
* 1,根进程读取输入,将元素个数广播给各个进程。
* 2,然后各进程计算段长度和段偏移。
* 3,然后根进程选择第一个段,标记站位符。
* 4,跟进程将剩余元素发送给下一进程,下一进程选择段的同时,根进程排序。
* 5,下一进程继续此过程,直到最后一个进程,所有元素都进行排序。
* 6,进程将排序好的元素,按照段偏移归约给根进程。
* 7,根进程输入结果。
* -* Algorithm descr iption: Sub--> paragraph sort-> reduce the results.* 1, the root process to read input, will be broadcast to all elements of the process.* 2, and then the process of calculating the length and offset paragraph.* 3, and then the root process, select the first paragraph, mark at stations.* 4, with the remaining elements of the process sent to the next process, the process of choosing the next paragraph, the root process of sorting.* 5, the next process to continue this process until the last process, all the elements are sorted.* 6, the process will be good to sort elements, in accordance with the above offset to the root process of reduction.* 7, enter the results of the root process.*
(系统自动生成,下载前可以参看下载内容)
下载文件列表
MPI.cpp