Patent ID: 8010945

Claim:
A computer-implemented method for extending an object-oriented programming language to support write-masked assignment operations for a vector data type, comprising: defining a first template for a vector data type, wherein the first template is parameterized by a scalar component type and a number of scalar components; defining a second template, different from the first template, for a write-mask vector data type, wherein the second template is parameterized by the scalar component type, the number of scalar components, a write-mask component count, and a write-mask, wherein the write-mask encodes a selection and ordering of scalar components to use in an assignment operation for an instance of the vector data type; partially specializing the first template for a selected number of scalar components, wherein the partial specialization includes at least a union of instances of the second template; overloading an assignment operator to allow values to be assigned to scalar components of the vector data type, based on the selection and ordering of components specified by a given write-mask; and storing the first template and the second template in a memory.