Pointer-Based Matrix Submatrix Definition
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing linear algebra libraries lack flexibility in defining submatrices for matrix operations, as they typically rely on a fixed leading dimension, limiting the definition of submatrices to those with evenly spaced rows or columns.
Innovation Solution
The use of a one-dimensional buffer in conjunction with a pointer array allows for more efficient and flexible storage and definition of matrices and submatrices, enabling the selection of matrix values based on pointers and predefined sizes of rows or columns.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a fixed leading dimension is used to define submatrices, then the matrix operation is simple and efficient, but the flexibility to define submatrices with arbitrary row or column spacing is limited
Solution Approach 1:
The patent segments the matrix definition into two separate components: a one-dimensional buffer containing all matrix values and a separate array of pointers indicating the starting position of each row or column in the buffer. This segmentation allows flexible submatrix definition without increasing overall system complexity, as the pointer array can be easily constructed from the buffer without requiring complex data structures.
Solution Approach 2:
The patent introduces an intermediary structure (the array of pointers) that mediates between the one-dimensional buffer and the desired submatrix definition. This intermediary layer translates arbitrary row/column spacing requirements into simple pointer offsets, enabling flexible submatrix selection while maintaining efficient memory access patterns through the contiguous buffer storage.
2Adaptability or versatility
If matrices are stored in a one-dimensional array with fixed leading dimension, then memory access is efficient and simple, but the ability to process matrices with rows/columns stored in arbitrary order is limited
Solution Approach 1:
The patent makes the matrix definition dynamic by using an array of pointers that can be constructed to point to any desired starting positions in the one-dimensional buffer. This dynamic pointer configuration allows the same buffer structure to adapt to different matrix storage patterns (contiguous, strided, arbitrary order) without changing the underlying memory layout or requiring complex data structures.
Solution Approach 2:
The patent changes the parameter of matrix definition from a fixed leading dimension to a variable pointer-based offset system. This parameter change enables the system to handle matrices with rows or columns stored in arbitrary order by simply changing the pointer values, while maintaining efficient memory access through the contiguous buffer and avoiding the need for complex reordering operations.
3Adaptability or versatility
If a pointer array is introduced to enable flexible submatrix definition, then the number of possible submatrices increases, but the memory and computational overhead increases
Solution Approach 1:
The patent applies local quality by making the pointer array compact and sparse, with each pointer representing only the starting position of a row or column in the one-dimensional buffer. This localized pointer storage requires minimal memory compared to storing complete matrix copies or complex data structures, while still enabling the definition of a large number of different submatrices through different pointer combinations.
Data Source
AI summary
In some examples, a system can store a first array, which is a one-dimensional array of values (e.g., matrix values), in memory. The system can also store a second array in the memory, where the second array is a one-dimensional array of pointers that point to positions of a subset of the values in the first array. The subset of values can be a first entry of each row or column of a matrix. The system can then provide the second array as input to a program routine, which can perform a matrix operation. To do so, the program routine can access the first array and the second array in memory, select a set of values for the matrix from the first array by using the pointers, execute the matrix operation using the using the selected set of values, and output the result.


