Finding the length of a set of character data having a termination character
Abstract
The length of character data having a termination character is determined. The character data for which the length is to be determined is loaded, in parallel, within one or more vector registers. An instruction is used that loads data in a vector register to a specified boundary, and provides a way to determine the number of characters loaded, using, for instance, another instruction. Further, an instruction is used to find the index of the first termination character, e.g., the first zero or null character. This instruction searches the data in parallel for the termination character. By using these instructions, the length of the character data is determined using only one branch instruction.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 50 · Forward citations: 6.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer program product for determining a length of a set of data, the computer program product comprising: a non-transitory computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising: loading from memory to a register data that is within a specified block of memory, the data being at least a portion of the set of data for which the length is to be determined, the set of data for which the length is to be determined having a termination character, the termination character indicating a
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (6 of 6 total)
References Cited — Backward Prior Art (50)
Non-Patent Literature (5)
- "C Programming/Strings," (http://en.wildbooks.org/wild/C-Programming/Strings), Nov. 2014, pp. 1-12.
- "C string handling," (http://en.wikibooks.org/wiki/C-string-handling), Mar. 2015, pp. 1-6.
- "Emulator" Wikipedia, http://en.wikipedia.org/w/index.php?title-Emulator&oldid-475864955, downloaded Apr. 14, 2015, pp. 1-10.
- "Intel® 64 and IA-32 Architectures Developer's Manual: vol. 2B, Instructions Set Reference, A-L," Order No. 253666-041US, Dec. 2011.
- "Intel® 64 and IA-32 Architectures Developer's Manual: vol. 2B, Instructions Set Reference, M-Z," Order No. 253667-041US, Dec. 2011.