Method and apparatus for switching between multiple implementations of a routine
AssigneeHewlett-Packard Development Company, L.P.
InventorsCary A. Coutant, Carol L. Thompson
Life of this patent
Estimating the term…
Abstract
Method and apparatus for switching between multiple implementations of a routine. A plurality of implementations of a routine are compiled into respective object code modules. In one embodiment, each implementation of the routine is adapted for a particular hardware configuration. The different object code modules are associated with respective sets of hardware characteristics and with the name of the routine. When the application program and library are loaded into memory of the computer system, a references to the routine are resolved using the sets of hardware characteristics and the hardware configuration of the system.
Claims16
A computer-implemented method for switching between multiple implementations of a routine in a library of routines that are linked with an application program that is hosted by a computer system, comprising:
- compiling a plurality of implementations of a routine into respective object code modules, the routine having an associated name and each implementation adapted to a selected hardware configuration;
- associating the object code modules with the name of the routine and respective sets of hardware characteristics;
- and
- resolving when the application program is loaded into memory of the computer system, a reference to the routine using the sets of hardware characteristics and a hardware configuration of the system.
A computer-implemented method for switching between multiple implementations of a routine in a library of routines that are linked with an application program hosted by a computer system, comprising:
- establishing a set of hardware configuration characteristics that describe the computer system;
- establishing a symbol table, the symbol table having one or more entries that include a name of a routine, a set of hardware characteristics, and an address referencing a routine in the library;
- obtaining a name of a routine having multiple implementations when the library is loaded with the application program into memory of the computer system;
- matching the name of the routine and the set of hardware configuration characteristics that describe the computer system to an entry in the symbol table;
- and
- generating an address in executable code for references to the routine having multiple implementations when the library is loaded with the application program, the address referencing an implementation in the library as identified in the matching step by the entry in the symbol table.
An apparatus for switching between multiple implementations of a routine in a library of routines that are linked with an application program that is hosted by a computer system, comprising:
- means for compiling a plurality of implementations of a routine into respective object code modules, the routine having an associated name and each implementation adapted to a selected hardware configuration;
- means for associating the object code modules with the name of the routine and respective sets of hardware characteristics;
- and
- means for resolving when the application program is loaded into memory of the computer system, a reference to the routine using the sets of hardware characteristics and a hardware configuration of the system.
A computer-implemented symbol table for referencing a library of object code modules that implement a plurality of routines, comprising:
- a first set of one or more entries, each entry in the first set including a unique name of a routine and a reference to an object code module in the library;
- and
- a second set of one or more entries, each entry in the second set including a shared name of a routine, a set of hardware characteristics, and a reference to an object code module in the library.
A computer program product configured for causing a computer to perform the steps of:
- compiling a plurality of implementations of a routine into respective object code modules, the routine having an associated name and each implementation adapted to a selected hardware configuration;
- associating the object code modules with the name of the routine and respective sets of hardware characteristics;
- and
- resolving when the application program is loaded into memory of the computer system, a reference to the routine using the sets of hardware characteristics and a hardware configuration of the system.
Dependencies are inferred from the claim text.