System and method for compiler support for compile time customization of code
AssigneeNVIDIA Corporation
InventorsJaydeep Marathe, Vinod Grover
Life of this patent
Estimating the term…
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.
Claims20
A method comprising:
- identifying, by a processor, whether a portion of source code comprises a device lambda expression;
- creating, based on the device lambda expression, a unique instantiation;
- and
- modifying the device lambda expression based on the unique instantiation.
A system comprising:
- a device lambda expression identification module configured to identify a device lambda expression in a portion of source code;
- a constructor module configured to create, based on the device lambda expression, a unique instantiation;
- and
- a code modification module configured to modify the source code to replace the device lambda expression with the unique instantiation.
A method comprising:
- identifying, by a processor, whether a portion of source code comprises a device lambda expression;
- creating, based on the device lambda expression, a unique instantiation;
- and
- generating a device code entry function template based on the unique instantiation.
Dependencies are inferred from the claim text.