US8959501B2

Type and length abstraction for data types

Summary by NHIP

Generic SIMD Data Type Implementation

The method implements a generic single instruction multiple data type in software code by accessing an algorithm containing a variable number of elements. At runtime, the system determines the element count based on the vector register width and selects customized processor-specific code using the included type parameter to resolve the vector register abstraction.

Claim Score by NHIP

Read claim 1, the broadest

Abstract

Embodiments are directed to implementing a generic SIMD data type in software code. In an embodiment, a computer system accesses a portion of software code that includes an algorithm with a generic SIMD data type that includes a variable number of elements. The algorithm with the generic SIMD data type is to be processed by a specific processor that includes various specific hardware features. The computer system determines at runtime a portion of customized processor-specific code that is to be used with the specified processor based on the generic SIMD data type, wherein the runtime determination resolves the number of elements that are to be used with the specified processor. The computer system also processes the software code including the algorithm with the generic SIMD data type using the determined, customized processor-specific code.

US8959501B2, drawing sheet 1
Sheet 1 of 5

Term

5.3 yearsleft in the term

Expires 9 January 2032, including 391 days of term adjustment.

  1. Priority and filed
  2. Granted
  3. Today
  4. Expires

16 claims: 3 independent, 13 dependent

  1. 1
    Broadest claimClaim Score 24, narrow(NHIP)At a computer system including at least one processor and a memory, in a computer networking environment including a plurality of computing systems, a computer-implemented method for implementing a generic single instruction multiple data (SIMD) type in software code, the method comprising:accessing a portion of software code that includes an algorithm comprising a generic SIMD data type, the generic SIMD data type being an abstraction of a vector register of an unspecified type and size, the SIMD data type including a type parameter which specifies information about the type that is to be used in processing the data, enabling the algorithm with the generic SIMD data type to be processed by a specific processor that includes one or more specific hardware features, such that the specified processor and the specific hardware features need not be known when the algorithm is coded;determining at runtime, based at least on the generic SIMD data type and a width of the vector register, a number of elements of the generic SIMD data type that an instantiated generic SIMD data type contains when instantiated in accordance with the specific hardware features;determining at runtime, based at least on the generic SIMD data type and the included type parameter, a portion of customized processor-specific code that is to be used with the specified processor, wherein the runtime determination resolves the abstraction of a vector register into a specific instantiation of a vector register wherein the number of elements that are to be used with the specified processor are known;and processing the software code including the algorithm with the generic SIMD data type using the determined, customized processor-specific code;wherein the specific hardware features comprise registers that are configurable to include a certain number of elements of one or more types, and associated instructions which operate on those elements in parallel;querying the specified processor to determine its number of registers.
  2. 12
    A computer program product for implementing a method for providing a generic SIMD data type that includes an implicitly-generic number of elements of a generic SIMD data type, the computer program product comprising one or more computer- readable hardware devices having stored thereon computer-executable instructions that, when executed by one or more processors of the computing system, cause the computing system to perform the method, the method comprising:accessing a portion of software code that includes an algorithm comprising a generic SIMD data type, the generic SIMD data type being an abstraction of a vector register of an unspecified type and size, the SIMD data type including a type parameter which specifies information about the type that is to be used in processing the data, enabling the algorithm with the generic SIMD data type to be processed by a specific processor that includes one or more specific hardware features, such that the specified processor and the specific hardware features need not be known when the algorithm is coded;determining at runtime, based at least on the generic SIMD data type and a width of the vector register, a number of elements of the generic SIMD data type that an instantiated generic SIMD data type contains when instantiated in accordance with the specific hardware features;determining at runtime, based at least on the generic SIMD data type and the included type parameter, a portion of customized processor-specific code that is to be used with the specified processor, wherein the runtime determination resolves the abstraction of a vector register into a specific instantiation of a vector register wherein the number of elements that are to be used with the specified processor are known;and processing the software code including the algorithm with the generic SIMD data type using the determined, customized processor-specific code;wherein the specific hardware features comprise registers that are configurable to include a certain number of elements of one or more types, and associated instructions which operate on those elements in parallel;querying the specified processor to determine the number of elements that are stored in and processed using its registers.
  3. 15
    A computer system comprising the following:one or more processors;system memory;one or more computer-readable storage media having stored thereon computer-executable instructions that, when executed by the one or more processors, causes the computing system to perform a method for providing a generic SIMD data type that has a variable data type, the method comprising the following: accessing a portion of software code that includes an algorithm comprising a generic SIMD data type, the generic SIMD data type being an abstraction of a vector register of an unspecified type and size, the SIMD data type including a type parameter which specifies information about the type that is to be used in processing the data, enabling the algorithm with the generic SIMD data type is to be processed by a specific processor that includes one or more specific hardware features, such that the specified processor and the specific hardware features need not be known when the algorithm is coded;determining at runtime, based at least on the generic SIMD data type and a width of the vector register, a number of elements of the generic SIMD data type that an instantiated generic SIMD data type contains when instantiated in accordance with the specific hardware features;determining at runtime, based at least on the generic SIMD data type and the included type parameter, a portion of customized processor-specific code that is to be used with the specified processor, wherein the runtime determination resolves the abstraction of a vector register into a specific instantiation of a vector register wherein the number of elements that are to be used with the specified processor are known;and processing the software code including the algorithm with the generic SIMD data type using the determined, customized processor-specific code;wherein the specific hardware features comprise registers that are configurable to include a certain number of elements of one or more types, and associated instructions which operate on those elements in parallel;querying the specified processor to determine its number of registers.