首页> 外国专利> Unrolling transformation of nested loops

Unrolling transformation of nested loops

机译:展开嵌套循环的转换

摘要

The present invention is directed to a transformation technique for nested loops. A virtual iteration space may be determined based on an unroll factor (UF). The virtual iteration space, which includes the actual iteration space, is formed such that, the virtual iteration space may be evenly divided by a selected UF. Once the virtual iteration space has been calculated or determined, the virtual iteration space is “cut” into regular portions by one or more unroll factors. Portions of the actual iteration space which do not fill the cut portions of the virtual iteration space or which fall outside these cuts which have been evenly divided by the unroll factor form a residue which is calculated. The portions of the actual iteration space which remain are also evenly divided by the unroll factor(s). An outer loop for this remaining portion of the actual iteration space is then unrolled. This unrolled portion forms a perfect nested loop. Accordingly, the operations for the unrolled remaining portion of the actual iteration space when combined with the operations for the residue of the actual iteration space which was not evenly divided by the unroll factor is, in appropriate situations, semantically equivalent to the original nested loops. Aspects of the invention are applicable to rectangular and triangular loop nests, and combinations thereof. Moreover, the invention is applicable to loops having n-dimensions.
机译:本发明涉及用于嵌套循环的变换技术。可以基于展开因子(UF)来确定虚拟迭代空间。形成包括实际迭代空间的虚拟迭代空间,使得虚拟迭代空间可以被所选择的UF均匀地划分。一旦虚拟迭代空间已经被计算或确定,虚拟迭代空间就被“切割”。由一个或多个展开因子分成规则的部分。实际迭代空间中未填充虚拟迭代空间的切面部分或落在这些切面之外的部分(已由展开系数均匀除以)形成了要计算的残差。实际迭代空间中剩余的部分也由展开系数平均分配。然后展开实际迭代空间其余部分的外部循环。此展开部分形成一个完美的嵌套循环。因此,在适当的情况下,当与实际迭代空间的未展开剩余部分的操作与未由展开因子均匀划分的实际迭代空间的剩余部分的操作组合在一起时,在语义上等效于原始嵌套循环。本发明的方面适用于矩形和三角形环套及其组合。而且,本发明适用于具有n维的环。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号