利用多核并行技术,使用Pthreads与OpenMP并行编程环境在单机双核平台上开发小波包并行算法。通过分析串行算法潜在并行性,基于Pthreads将小波包分解数据分组并分配给不同的线程,由线程并行处理;根据小波包重构对象不同,重构过程实现并行处理近似重构与细节重构。基于OpenMP适当分解循环体,得出小波包嵌套与非嵌套并行算法,并将这些算法应用于电力系统海量数据压缩。与串行小波包算法的耗时比较表明,并行算法的速度可以达到接近串行算法的2倍,显著提高了小波包在电力系统应用中的计算速度及电力系统数据压缩效率。
Based on the multi-core parallel technology,a parallel wavelet packet algorithm is developed in the Pthreads and the OpenMP parallel programming environment of PC with two-core system. The potential concurrency of serial algorithm is analyzed and the wavelet packet decomposition data are grouped and assigned to different threads for parallel processing on the basis of Pthreads. According to different reconstruction objects of wavelet packet,approximate reconstruction and detailed reconstruction are processed in parallel during reconstruction. The loop body is properly decomposed based on OpenMP and the nested and non-nested parallel wavelet packet algorithms are obtained,which are applied in the mass data compression of power system. The speed of parallel algorithm is nearly two times quicker than that of serial algorithm,significantly increasing the calculation speed of wavelet packet in the applications of power system and the compression efficiency of power system data.