Patent ID: 8261252

Claim:
A method of converting application code into optimized application code or into execution code suitable for execution on a computation engine with an architecture comprising at least a first and a second level of memory units, the method comprising: obtaining application code, the application code comprising data transfer operations between the levels of memory units; and converting at least a part of the application code, the converting further comprising: scheduling of data transfer operations from a first level of memory units to a second level of memory units such that accesses of data accessed multiple times are brought closer together in time than in the original code; and after the scheduling of the data transfer operations, deciding on layout of the data in the second level of memory units to improve the data layout locality such that data which is accessed closer together in time is also brought closer together in the layout than in the original code, wherein the scheduling of data transfer operations does not decide on the internal organization of at least some of the data transferred, hence fixing the scheduling of data transfer operations only partially while also partially fixing the placement of all the data transferred, thereby providing freedom to the deciding of data layout.