主权项 |
1. 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, wherein the process uses a plurality of heterogeneous compute units, the plurality of heterogeneous compute units includes a central processing unit and a graphics processing unit, and the plurality of heterogeneous compute units is resident on a single device: 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, andstoring subbuffer data in that subbuffer: for each subbuffer that corresponds to one of the plurality of heterogeneous compute units not associated with the parent buffer,
managing updates to the subbuffer data in a private memory of a corresponding compute unit; and for each subbuffer that corresponds to one of the plurality of heterogeneous compute units associated with the parent buffer, accessing the subbuffer data through a pointer to that subbuffer in the parent buffer. |