arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1407.6603cs.DC
收藏

用OpenMP实现冒泡排序算法

Parallelize Bubble Sort Algorithm Using OpenMP

Zaid Abdi Alkareem Alyasseri, Kadhim Al-Attar, Mazin Nasser

摘要:

排序算法一直是算法研究者关注的一个重要领域,人们投入了大量的资源来研究排序算法。为了这个目的,许多现有的排序算法的算法复杂性的效率方面进行了观察。在本文中,我们实现了气泡排序算法使用多线程(OpenMP)。在两个不同大小的标准数据集(文本文件)上进行了测试。该算法的主要思想是将输入数据集的元素根据每个单词中的字符数量分布到许多额外的临时子数组中。每个子数组的大小取决于输入数组中具有相同字符数的元素的数量。我们使用Intel Core i7- 3610 QM(8个CPU),使用两种方法(字符串向量和数组3D)实现了OpenMP。最后,我们得到了数据结构对算法性能的影响,因为我们选择了第二种方法。

英文摘要:

Sorting has been a profound area for the algorithmic researchers and many resources are invested to suggest more works for sorting algorithms. For this purpose, many existing sorting algorithms were observed in terms of the efficiency of the algorithmic complexity. In this paper we implemented the bubble sort algorithm using multithreading (OpenMP). The proposed work tested on two standard datasets (text file) with different size . The main idea of the proposed algorithm is distributing the elements of the input datasets into many additional temporary sub-arrays according to a number of characters in each word. The sizes of each of these sub-arrays are decided depending on a number of elements with the same number of characters in the input array. We implemented OpenMP using Intel core i7-3610QM ,(8 CPUs),using two approaches (vectors of string and array 3D) . Finally, we get the data structure effects on the performance of the algorithm for that we choice the second approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑