多核CPU已经成为当前CPU市场上的主流产品,设计适应多核CPU环境的算法与软件势在必行。遗传算法是一种具有很强通用性的全局搜索方法,也是一种计算量大、极耗计算资源的算法,其传统的串行计算形式并不能充分利用多核的计算资源,将其设计为适应多核CPU环境的并行计算形式,具有重要的现实意义。将遗传算法的基本操作设计成并行执行形式,并利用OpenMP将其线程化,从而对不同规模的TSP问题的求解结果来看,加速比与计算效率随着规模的增大而提高。
Multi-core CPU has become the leading products in CPU market. It is urgent to design corresponding algorithms and software to make use of the computational resource fully. Genetic algorithm is a all-purpose global search method, it will consume seriously the computational resource and computational time, Since traditional genetic algorithm can't make use of the computational resource of multi-core computer fully, it has great practical significance to parallelize genetic algorithm on multi-core CPU. This paper designs a new parallel form of genetic algorithm by threading its basicoperations with OpenMP. The experimental result shows that the speedup and the efficiency of the algorithm increase with increasing scale of TSP.