Patent ID: 8281294

Claim:
A method for generating optimal machine code for a device function for execution on a co-processing unit, the method comprising: setting a first variable to a first value to reflect that a first machine code implementation of the device function is a best-fit machine code implementation of the device function; setting a second variable to a second value to reflect that a first virtual assembly implementation of the device function is a best-fit virtual assembly implementation of the device function; determining whether there is an uninspected fat binary; and if there is no uninspected fat binary, then determining whether a feature set associated with the best-fit machine code implementation of the device function is a better fit for a real architecture of the co-processing unit than a feature set associated with the best-fit virtual assembly implementation of the device function, but if there is an uninspected fat binary, then inspecting the fat binary to determine whether there is an uninspected machine code implementation of the device function or an uninspected virtual assembly implementation of the device function.