Technologies for indirectly calling vector functions
First Claim
1. A compute device for indirectly calling vector functions, the compute device comprising:
- a memory device to store source code;
a compiler module to;
identify, in the source code, declarations of scalar functions;
identify, in the source code, a set of declarations of vector variants for each of the scalar functions;
generate a vector variant address map for each set of vector variants, wherein each vector variant address map includes addresses of the vector variants of the associated scalar function;
generate an offset map for each scalar function, wherein each offset map includes offsets into the associated vector variant address map and each offset is to a different one of the vector variant addresses;
identify, in the source code, an indirect call to the scalar functions, wherein the indirect call is to be vectorized;
determine, based on a context of the indirect call, a vector variant to be called; and
store, in object code and in association with the indirect call, an offset into one of the vector variant address maps based on (i) the determined vector variant to be called and (ii) the offset map that corresponds to each scalar function.
2 Assignments
0 Petitions
Accused Products
Abstract
Technologies for indirectly calling vector functions include a compute device that includes a memory device to store source code and a compiler module. The compiler module is to identify a set of declarations of vector variants for scalar functions in the source code, generate a vector variant address map for each set of vector variants, generate an offset map for each scalar function, and identify, in the source code, an indirect call to the scalar functions, wherein the indirect call is to be vectorized. The compiler module is also to determine, based on a context of the indirect call, a vector variant to be called and store, in object code and in association with the indirect call, an offset into one of the vector variant address maps based on (i) the determined vector variant to be called and (ii) the offset map that corresponds to each scalar function.
-
Citations
25 Claims
-
1. A compute device for indirectly calling vector functions, the compute device comprising:
-
a memory device to store source code; a compiler module to; identify, in the source code, declarations of scalar functions; identify, in the source code, a set of declarations of vector variants for each of the scalar functions; generate a vector variant address map for each set of vector variants, wherein each vector variant address map includes addresses of the vector variants of the associated scalar function; generate an offset map for each scalar function, wherein each offset map includes offsets into the associated vector variant address map and each offset is to a different one of the vector variant addresses; identify, in the source code, an indirect call to the scalar functions, wherein the indirect call is to be vectorized; determine, based on a context of the indirect call, a vector variant to be called; and store, in object code and in association with the indirect call, an offset into one of the vector variant address maps based on (i) the determined vector variant to be called and (ii) the offset map that corresponds to each scalar function. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. One or more non-transitory, computer-readable storage media comprising a plurality of instructions that, when executed, cause a compute device to:
-
identify declarations of scalar functions in a source code stored in a memory device of the compute device; identify a set of declarations of vector variants for each of the scalar functions in the source code; generate a vector variant address map for each set of vector variants, wherein each vector variant address map includes addresses of the vector variants of the associated scalar function; generate an offset map for each scalar function, wherein each offset map includes offsets into the associated vector variant address map and each offset is to a different one of the vector variant addresses; identify in the source code, an indirect call to the scalar functions, wherein the indirect call is to be vectorized; determine, based on a context of the indirect call, a vector variant to be called; and store, in object code and in association with the indirect call, an offset into one of the vector variant address maps based on (i) the determined vector variant to be called and (ii) the offset map that corresponds to each scalar function. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A method for indirectly calling vector functions, the method comprising:
-
identifying, by a compute device, declarations of scalar functions in a source code stored in a memory device of the compute device; identifying, by the compute device, a set of declarations of vector variants for each of the scalar functions in the source code; generating, by the compute device, a vector variant address map for each set of vector variants, wherein each vector variant address map includes addresses of the vector variants of the associated scalar function; generating, by the compute device, an offset map for each scalar function, wherein each offset map includes offsets into the associated vector variant address map and each offset is to a different one of the vector variant addresses; identifying, by the compute device, in the source code, an indirect call to the scalar functions, wherein the indirect call is to be vectorized; determining, by the compute device, based on a context of the indirect call, a vector variant to be called; and storing, by the compute device, in object code and in association with the indirect call, an offset into one of the vector variant address maps based on (i) the determined vector variant to be called and (ii) the offset map that corresponds to each scalar function. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25)
-
Specification