Patent ID: 8959501
Filing Date: 2015-02-17
Classification: G06F

Abstract:
1. 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.