Memory management in graphics and compute application programming interfaces
View Patent ↗Methods are provided for creating objects in a way that permits an API client to explicitly participate in memory management for an object created using the API. Methods for managing data object memory include requesting memory requirements for an object using an API and expressly allocating a memory location for the object based on the memory requirements. Methods are also provided for cloning objects such that a state of the object remains unchanged from the original object to the cloned object or can be explicitly specified.
1. A method for cloning a data object based on an original data object comprising:
creating a destination data object;
specifying data of the destination data object based on the original data object;
specifying a state of the data of the destination data object to an application programming interface (API); and
writing the data of the destination data object having the specified state to a memory.
2. The method of claim 1 , further comprising specifying a state of the original data object to the API.