Efficient hardware instructions for single instruction multiple data processors: fast fixed-length value compression
AssigneeOracle International Corporation
InventorsShasank K. Chavan, Phumpong Watanaprakornkul, Victor Chen
Life of this patent
Estimating the term…
Abstract
Methods and apparatuses for determining set-membership using Single Instruction Multiple Data (“SIMD”) architecture are presented herein. Specifically, methods and apparatuses are discussed for compressing or packing, in parallel, multiple fixed-length values into a stream of multiple variable-length values using SIMD architecture.
Claims34
One or more non-transitory, computer-readable media storing one or more instructions that, when executed by one or more processors, cause producing a vector of variable-length values from a vector of fixed-length values;
- wherein a first register stores a plurality of fixed-length values from the vector of fixed-length values, wherein each fixed-length value in the vector of fixed-length values is a variable-length value that has been padded, as needed, to achieve a particular fixed length,
- wherein a series of single instruction multiple data (SIMD) subregisters of a second register stores a plurality of length values from a vector of lengths, wherein each fixed-length value in the vector of fixed-length values corresponds to a length value in the vector of lengths, and wherein each length value in the vector of lengths indicates an unpadded length of a corresponding fixed-length value in the vector of fixed-length values;
- wherein the one or more instructions, when executed by the one or more processors, cause:
- storing, in a third register, the plurality of fixed-length values into the vector of variable-length values, wherein storing the vector of variable-length values in the third register is based on the vector of lengths, wherein each variable-length value in the vector of variable-length values is unpadded, and wherein a pointer specifies a memory address of the vector of variable length values stored in the third register;
- determining, based on the vector of lengths, a particular key in an offset lookup table;
- determining that a particular offset is indexed in the offset lookup table by the particular key;
- updating the pointer based on the particular offset.
A method for producing a vector of variable-length values from a vector of fixed-length values;
- wherein a first register stores a plurality of fixed-length values from the vector of fixed-length values, wherein each fixed-length value in the vector of fixed-length values is a variable-length value that has been padded, as needed, to achieve a particular fixed length,
- wherein a series of single instruction multiple data (SIMD) subregisters of a second register stores a plurality of length values from a vector of lengths, wherein each fixed-length value in the vector of fixed-length values corresponds to a length value in the vector of lengths, and wherein each length value in the vector of lengths indicates an unpadded length of a corresponding fixed-length value in the vector of fixed-length values;
- the method comprising:
- storing, in a third register, the plurality of fixed-length values into the vector of variable-length values, wherein storing the vector of variable-length values in the third register is based on the vector of lengths, wherein each variable-length value in the vector of variable-length values is unpadded, and wherein a pointer specifies a memory address of the vector of variable length values stored in the third register;
- determining, based on the vector of lengths, a particular key in an offset lookup table;
- determining that a particular offset is indexed in the offset lookup table by the particular key;
- updating the pointer based on the particular offset.
One or more non-transitory, computer-readable media storing one or more instructions that, when executed by one or more processors, cause producing a vector of variable-length values from a vector of fixed-length values;
- wherein a first register stores a plurality of fixed-length values from the vector of fixed-length values, wherein each fixed-length value in the vector of fixed-length values is a variable-length value that has been padded, as needed, to achieve a particular fixed length,
- wherein a series of single instruction multiple data (SIMD) subregisters of a second register stores a plurality of length values from a vector of lengths, wherein each fixed-length value in the vector of fixed-length values corresponds to a length value in the vector of lengths, and wherein each length value in the vector of lengths indicates an unpadded length of a corresponding fixed-length value in the vector of fixed-length values;
- wherein a scatter-mask lookup table stores a plurality of scatter-masks;
- wherein the one or more instructions, when executed by the one or more processors, cause:
- determining, based on the vector of lengths, a particular key in the scatter-mask lookup table;
- determining that the particular key indexes a particular scatter-mask;
- storing, in a third register and based on the particular scatter-mask, the plurality of fixed-length values into the vector of variable-length values, wherein each variable-length value in the vector of variable-length values is unpadded.
A method for producing a vector of variable-length values from a vector of fixed-length values;
- wherein a first register stores a plurality of fixed-length values from the vector of fixed-length values, wherein each fixed-length value in the vector of fixed-length values is a variable-length value that has been padded, as needed, to achieve a particular fixed length,
- wherein a series of single instruction multiple data (SIMD) subregisters of a second register stores a plurality of length values from a vector of lengths, wherein each fixed-length value in the vector of fixed-length values corresponds to a length value in the vector of lengths, and wherein each length value in the vector of lengths indicates an unpadded length of a corresponding fixed-length value in the vector of fixed-length values;
- wherein a scatter-mask lookup table stores a plurality of scatter-masks;
- the method comprising:
- determining, based on the vector of lengths, a particular key in the scatter-mask lookup table;
- determining that the particular key indexes a particular scatter-mask;
- storing, in a third register and based on the particular scatter-mask, the plurality of fixed-length values into the vector of variable-length values, wherein each variable-length value in the vector of variable-length values is unpadded.
One or more non-transitory, computer-readable media storing one or more instructions that, when executed by one or more processors, cause producing a vector of variable-length values from a vector of fixed-length values;
- wherein a first register stores a plurality of fixed-length values from the vector of fixed-length values, wherein each fixed-length value in the vector of fixed-length values is a variable-length value that has been padded, as needed, to achieve a particular fixed length,
- wherein a series of single instruction multiple data (SIMD) subregisters of a second register stores a plurality of length values from a vector of lengths, wherein each fixed-length value in the vector of fixed-length values corresponds to a length value in the vector of lengths, and wherein each length value in the vector of lengths indicates an unpadded length of a corresponding fixed-length value in the vector of fixed-length values;
- wherein a shuffle-mask lookup table stores a plurality of shuffle-masks;
- wherein the one or more instructions, when executed by the one or more processors, cause:
- determining, based on the vector of lengths, a particular key in the shuffle-mask lookup table;
- determining that the particular key indexes a particular shuffle-mask;
- storing, in a third register and based on the particular shuffle-mask, the plurality of fixed-length values into the vector of variable-length values, wherein each variable-length value in the vector of variable-length values is unpadded.
A method for producing a vector of variable-length values from a vector of fixed-length values;
- wherein a first register stores a plurality of fixed-length values from the vector of fixed-length values, wherein each fixed-length value in the vector of fixed-length values is a variable-length value that has been padded, as needed, to achieve a particular fixed length,
- wherein a series of single instruction multiple data (SIMD) subregisters of a second register stores a plurality of length values from a vector of lengths, wherein each fixed-length value in the vector of fixed-length values corresponds to a length value in the vector of lengths, and wherein each length value in the vector of lengths indicates an unpadded length of a corresponding fixed-length value in the vector of fixed-length values;
- wherein a shuffle-mask lookup table stores a plurality of shuffle-masks;
- the method comprising:
- determining, based on the vector of lengths, a particular key in the shuffle-mask lookup table;
- determining that the particular key indexes a particular shuffle-mask;
- storing, in a third register and based on the particular shuffle-mask, the plurality of fixed-length values into the vector of variable-length values, wherein each variable-length value in the vector of variable-length values is unpadded.
Dependencies are inferred from the claim text.