Patent ID: 8723877

Claim:
A computerized method of managing a plurality of subbuffers associated with a parent buffer in a heterogeneous compute environment, the method comprising: allocating the parent buffer for a process; determining which of a plurality of heterogeneous compute units are not associated with the parent buffer, wherein at least one of the plurality of heterogeneous compute units is associated with the parent buffer and at least one of the heterogeneous compute units is not associated with the parent buffer, a compute unit that is associated with the parent buffer has a different memory space than a compute unit that is not associated with the parent buffer, the plurality of heterogeneous compute units includes a central processing unit and a graphics processing unit, and the plurality of heterogeneous compute units are resident on a single device; and for each subbuffer in the plurality of subbuffers, creating that subbuffer for one of the plurality of heterogeneous compute units from the parent buffer, wherein there is a different subbuffer for each of the plurality of heterogeneous compute units and each of the plurality of subbuffers occupies a different memory region in the parent buffer that was allocated for the process, and storing subbuffer data in that subbuffer; and for each subbuffer that corresponds to one of the plurality of heterogeneous compute units not associated with the parent buffer, copying the subbuffer data in that subbuffer to private memory for the corresponding compute unit, managing updates to the subbuffer data in the private memory, wherein the updates to the subbuffer data in the private memory are reflected in that subbuffer and the updates are changes to the subbuffer data in the private memory, and for each subbuffer that corresponds to one of the plurality of heterogeneous compute units associated with the parent buffer, accessing subbuffer data through a pointer to that subbuffer in the parent buffer.