Method and apparatus for compiler processing for a function marked with multiple execution spaces
US9229698B2 · kind B2 · utility
Assignee
Inventor
Key dates
| Filing date | Nov 25, 2013 |
| Grant date | Jan 5, 2016 |
| Priority date | — |
| Expiry date | Nov 25, 2033 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F8/433
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
A method for processing a function with a plurality of execution spaces is disclosed. The method comprises creating an internal compiler representation for the function. Creating the internal compiler representation comprises copying substantially all lexical tokens corresponding to a body of the function. Further, the creating comprises inserting the lexical tokens into a plurality of conditional if-statements, wherein a conditional if-statement is generated for each corresponding execution space of said plurality of execution spaces, and wherein each conditional if-statement determines which execution space the function is executing in. During compilation, the method finally comprises performing overload resolution at a call site of an overloaded function by checking for compatibility with a first execution space specified by one of the plurality of conditional if-statements, wherein the overloaded function is called within the body of the function.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.