SYSTEM AND METHOD FOR COMPILER SUPPORT FOR COMPILE TIME CUSTOMIZATION OF CODE
First Claim
1. A method of processing source code, the method comprising:
- accessing a portion of host source code;
determining whether the portion of the host source code comprises a device lambda expression;
in response to the portion of host code comprising the device lambda expression, determining a unique placeholder type instantiation based on the device lambda expression;
modifying the device lambda expression based on the unique placeholder type instantiation to produce modified host source code; and
making the modified host source code available to a host compiler.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for processing source code for compilation. The method includes accessing a portion of host source code and determining whether the portion of the host source code comprises a device lambda expression. The method further includes in response to the portion of host code comprising the device lambda expression, determining a unique placeholder type instantiation based on the device lambda expression and modifying the device lambda expression based on the unique placeholder type instantiation to produce modified host source code. The method further includes sending the modified host source code to a host compiler.
-
Citations
20 Claims
-
1. A method of processing source code, the method comprising:
-
accessing a portion of host source code; determining whether the portion of the host source code comprises a device lambda expression; in response to the portion of host code comprising the device lambda expression, determining a unique placeholder type instantiation based on the device lambda expression; modifying the device lambda expression based on the unique placeholder type instantiation to produce modified host source code; and making the modified host source code available to a host compiler. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for compiling code, the system comprising:
-
a code access module operable to access source code from a data store, wherein the source code comprises host source code and device source code; a device lambda expression identification module configured to identify a device lambda expression in a portion of the host source code; a placeholder type determination module configured to determine a placeholder type instantiation based on the device lambda expression; and a code modification module configured to modify the host source code to replace the device lambda expression with the placeholder type instantiation. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A method for modifying code for compilation comprising:
-
accessing a portion of host source code; determining whether the portion of the host source code comprises a device lambda expression associated with a device code entry function template instantiation; determining a unique placeholder type instantiation based on device lambda expression; determining a device code entry function template specialization based on the unique placeholder type instantiation, wherein the host source code comprises a device code entry function template; and generating modified host source code by replacing the device lambda expression with an instance of the unique placeholder type instantiation; generating a device code entry function specialization based on the unique placeholder type instantiation; and making the modified host source code available to a host compiler. - View Dependent Claims (19, 20)
-
Specification