Packed Data Mask Comparison for SIMD Control Precision
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current processors with SIMD architectures face challenges in efficiently executing packed data operation masks, particularly in performing logical comparisons and conditional operations on multiple data elements simultaneously, which affects instruction throughput and code density.
Innovation Solution
The introduction of packed data operation mask comparison instructions and processors capable of executing these instructions, allowing for logical comparisons and conditional control of packed data operations at a per-data element granularity, using packed data operation masks to predicate operations on individual data elements within packed data registers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If SIMD architectures perform parallel operations on multiple data elements, then processing throughput is improved, but control precision over individual data elements deteriorates
Solution Approach 1:
The patent segments the control mechanism into individual mask bits, where each bit corresponds to a specific data element position. This allows independent control of each data element's operation within the packed data register, resolving the contradiction between parallel processing and individual control precision.
Solution Approach 2:
The patent introduces packed data operation masks as an intermediary between the SIMD instruction and the data elements. These masks act as a control layer that enables selective execution of operations on individual data elements without sacrificing parallel processing efficiency.
2Speed
If packed data operations execute multiple data elements simultaneously, then processing speed is improved, but code density deteriorates due to increased masking instructions
Solution Approach 1:
The patent merges the operation execution and mask control into a single SIMD instruction format. The packed data operation masks are integrated directly into the instruction stream, allowing parallel operations and selective masking to be specified in one instruction rather than requiring separate control instructions.
Solution Approach 2:
The patent creates a universal SIMD instruction format that can handle both parallel operations and individual element control through the integrated mask field. This multi-functional instruction format eliminates the need for separate masking instructions, improving code density while maintaining processing speed.
3Adaptability or versatility
If logical comparisons are performed on packed data operation masks, then conditional control capability is improved, but instruction complexity increases
Solution Approach 1:
The patent performs logical comparisons on packed data operation masks as a preliminary action before executing the main data operations. This allows conditional control to be established in advance through mask comparison results, enabling complex conditional logic without increasing the complexity of the actual data operation instructions.
Data Source
Figure 1
Figure 2A~2B
Figure 3
AI summary
Receive packed data operation mask comparison instruction indicating first packed data operation mask having first packed data operation mask bits and second packed data operation mask having second packed data operation mask bits. Each packed data operation mask bit of first mask corresponds to a packed data operation mask bit of second mask in corresponding position. Modify first flag to first value if bitwise AND of each packed data operation mask bit of first mask with each corresponding packed data operation mask bit of second mask is zero. Otherwise modify first flag to second value. Modify second flag to third value if bitwise AND of each packed data operation mask bit of first mask with bitwise NOT of each corresponding packed data operation mask bit of second mask is zero. Otherwise modify second flag to fourth value.