摘要
研究了奇数阶幻方构造算法及其数据依赖性.通过对现有算法内存访问顺序和相关性进行分析,找出了限制现有算法并行性的主要因素,并通过改变内存访问模式和算法重构消除了数据依赖性.新的并行算法可以将原有算法的时间复杂度降为O(n),并且该算法可以达到成本最优.给出了该算法在不同存储系统下的实现方法.
The algorithm and data dependency of original construction method for odd-order magic square are studied.By analyzed the memory access pattern and data dependency, and figured out the major limiter for construction of parallel algorithm, the memory access order and redesigned algorithm are designed to remove data dependency.The new algorithm decreases the time complex to O(n),and gets cost efficiency.Meanwhile,the implement methods are illustrated under different storage systems.
出处
《西北师范大学学报(自然科学版)》
CAS
北大核心
2014年第6期46-48,53,共4页
Journal of Northwest Normal University(Natural Science)
基金
宁夏回族自治区自然科学基金资助项目(NZ12123)
关键词
幻方
奇数阶幻方
德拉鲁布算法
并行算法
magic square
odd-order magic square
delaloubere algorithm
parallel algorithm