计算机工程与应用
計算機工程與應用
계산궤공정여응용
COMPUTER ENGINEERING AND APPLICATIONS
2014年
16期
45-47
,共3页
宏参数%全局变量%Floyd算法%多线程
宏參數%全跼變量%Floyd算法%多線程
굉삼수%전국변량%Floyd산법%다선정
macro parameter%global variable%Floyd algorithm%multi-thread
在Ubuntu操作系统上,实现多线程并行的Floyd算法。对实验数据分析表明,基于全局变量定义代价矩阵A大小的并行程序所获得的并行性能要优于基于宏参数定义矩阵A大小的并行程序的性能。这与相应的用宏参数定义矩阵A大小的串行程序性能要更优的结果相反。
在Ubuntu操作繫統上,實現多線程併行的Floyd算法。對實驗數據分析錶明,基于全跼變量定義代價矩陣A大小的併行程序所穫得的併行性能要優于基于宏參數定義矩陣A大小的併行程序的性能。這與相應的用宏參數定義矩陣A大小的串行程序性能要更優的結果相反。
재Ubuntu조작계통상,실현다선정병행적Floyd산법。대실험수거분석표명,기우전국변량정의대개구진A대소적병행정서소획득적병행성능요우우기우굉삼수정의구진A대소적병행정서적성능。저여상응적용굉삼수정의구진A대소적천행정서성능요경우적결과상반。
A multi-thread parallel Floyd algorithm is achieved on the Ubuntu operating system. Analysis of experimental data shows that the parallel performance of the parallel program with matrix A whose size is defined with global variable is better than the parallel program with matrix A whose size is defined with macro parameter. This is contrary to the much better performance of the serial program with matrix A whose size is defined with global variable.