Vector Register Character Data Copying Boundary Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current text processing techniques for character data, such as copying character data strings, are inefficient and prone to unwarranted exceptions due to the lack of effective methods for handling termination characters and parallel processing.

Innovation Solution

A computer program product that uses vector instructions to load character data into registers, determine the number of characters, and find termination characters, allowing for parallel copying of character data without crossing memory boundaries and minimizing branch instructions, thereby preventing spurious exceptions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If current text processing techniques are used to copy character data, then the copying operation can be performed, but the processing is inefficient and prone to unwarranted exceptions

Engineering Contradiction:
Improvecharacter data copying efficiencyVSAvoidexception prevention
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent divides character data into fixed-size blocks (e.g., 16 characters per vector register) and processes them in parallel segments. Vector instructions load multiple characters simultaneously into registers, where each register holds a segment of the character data. This segmentation enables parallel processing of multiple characters at once, dramatically improving copying efficiency while maintaining reliability through structured block handling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent replaces traditional scalar character-by-character copying mechanisms with vectorized parallel processing mechanisms. Instead of using sequential loop-based copying with individual character operations, the invention employs vector instructions that operate on multiple characters simultaneously, substituting the mechanical sequential processing with a more efficient parallel vector processing system that prevents exceptions through boundary-aware design.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Speed

If parallel processing is used to copy character data, then copying speed is improved, but handling of termination characters becomes complex

Engineering Contradiction:
Improvecharacter data copying speedVSAvoidtermination character handling complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent performs preliminary actions by loading fixed blocks of character data into vector registers before processing. Each vector instruction loads a predetermined number of characters (e.g., 16) into a register in advance, establishing a known boundary structure. This preliminary blocking simplifies termination character handling because the parallel processing knows exactly where each block starts and ends, allowing efficient detection of termination characters within predefined boundaries without complex dynamic analysis.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameter of character data organization from sequential individual characters to fixed-size vector blocks. By transforming the data structure into vector registers containing multiple characters each, the system enables parallel processing while simplifying termination detection. The parameter change from scalar to vector organization allows termination characters to be handled through straightforward block-based comparisons rather than complex sequential searching.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If character data is copied without boundary checking, then copying is faster, but spurious exceptions occur when crossing memory boundaries

Engineering Contradiction:
Improvedata copying throughputVSAvoidspurious exceptions
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent performs preliminary boundary establishment by defining fixed-size blocks for character data copying. Before copying begins, the system determines the number of characters in each block and establishes memory boundaries in advance. This preliminary action ensures that parallel vector operations remain within valid memory regions, preventing spurious exceptions while maintaining high copying throughput through efficient block-based processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces block boundaries as intermediary structures between the parallel processing operations and the underlying memory system. These predefined blocks act as intermediaries that mediate between the high-speed parallel vector instructions and the memory boundary constraints. By processing data through these intermediary blocks, the system achieves fast parallel copying while the block structure itself prevents harmful boundary violations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9454366B2Copying character data having a termination character from one memory location to another
Publication Date: 2016.09.27 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9454366B2 patent drawing
  • US9454366B2 patent drawing
  • US9454366B2 patent drawing

AI summary

Copying characters of a set of terminated character data from one memory location to another memory location using parallel processing and without causing unwarranted exceptions. The character data to be copied is loaded within one or more vector registers. In particular, in one embodiment, an instruction (e.g., a Vector Load to block Boundary instruction) is used that loads data in parallel in a vector register to a specified boundary, and provides a way to determine the number of characters loaded. To determine the number of characters loaded (a count), another instruction (e.g., a Load Count to Block Boundary instruction) is used. Further, an instruction (e.g., a Vector Find Element Not Equal instruction) is used to find the index of the first delimiter character, i.e., the first termination character, such as a zero or null character within the character data. This instruction checks a plurality of bytes of data in parallel.