Vector Instruction Parallel Extremum Data Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for finding extreme values in data sets, such as arrays or image data, are inefficient due to sequential pairwise comparisons, which limit processing speed and can be further hindered by CPU branch prediction failures.
Innovation Solution
A method utilizing vector instructions to perform parallel operations on groups of data, allowing for simultaneous comparison and calculation of extreme values, thereby improving processing speed and reducing the impact of CPU branch prediction failures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If pairwise comparison is performed on data elements sequentially, then the comparison logic is simple, but the data processing speed is low
Solution Approach 1:
The patent divides the data set into multiple groups, where each group contains multiple data elements that can be processed simultaneously. By segmenting the data into parallelizable units, the system performs extremum operations on multiple elements at once rather than sequentially comparing pairs, thereby increasing processing speed while managing instruction complexity through structured data organization
Solution Approach 2:
The patent transitions from one-dimensional sequential pairwise comparison to multi-dimensional parallel processing by organizing data into groups that can be processed simultaneously across multiple dimensions. This dimensional change allows the system to exploit parallelism in the processing architecture, achieving faster extremum calculation by operating on multiple data elements concurrently rather than in a single sequence
2Loss of time
If multiple loops are used for data processing, then the logic is clear and systematic, but the processing time increases
Solution Approach 1:
The patent merges multiple sequential loops into a single parallel processing structure where multiple data elements are processed within one loop iteration. By combining the operations that previously required separate loops into a unified parallel execution model, the system reduces the total number of loop iterations and eliminates redundant overhead, thereby decreasing processing time while maintaining clear logic through vectorized operations
Solution Approach 2:
The patent ensures continuous useful action by eliminating idle loop iterations and ensuring that each processing cycle performs meaningful extremum operations on multiple data elements simultaneously. This continuity reduces the total processing time by keeping the processor actively engaged in useful computations throughout the execution, rather than having gaps or redundant iterations where no productive work occurs
3Productivity
If conventional sequential processing is used, then the memory access pattern is simple, but the memory locality is poor
Solution Approach 1:
The patent segments the data set into groups that are loaded into memory and processed in parallel. This segmentation allows for optimized memory access patterns where data is loaded once into memory and then processed multiple times through parallel operations, improving memory locality by reducing repeated memory accesses and enhancing processing efficiency through better utilization of cached data
Solution Approach 2:
The patent performs preliminary action by pre-loading data groups into memory before processing begins. This preliminary memory loading ensures that data is readily available in fast memory during parallel processing operations, improving memory locality and reducing the need for repeated memory accesses during computation, thereby enhancing overall processing efficiency
Data Source
AI summary
The present application discloses a method and an apparatus for a processor, and a computer-readable storage medium. The method for a processor includes: reading a plurality of groups of data from a data set by using a first vector instruction, where each group of data includes a plurality of pieces of data; performing an extremum operation on the plurality of groups of data in parallel by using a second vector instruction to obtain a first group of intermediate results; and calculating an extreme value of the data set based on the first group of intermediate results. In the foregoing technical solution, a plurality of groups of data in a data set are operated in parallel to determine an extreme value of the data set, which helps to improve a speed of data processing.


