Matrix transposition in a computer system
Abstract
Improved transposition of a matrix in a computer system may be accomplished while utilizing at most a single permutation vector. This greatly improves the speed and parallelability of the transpose operation. For a standard rectangular matrix having M rows and N columns and a size M×N, first n and q are determined, wherein N=n*q, and wherein M×q represents a block size and wherein N is evenly divisible by p. Then, the matrix is partitioned into n columns of size M×q. Then for each column n, elements are sequentially read within the column row-wise and sequentially written into a cache, then sequentially read from the cache and sequentially written row-wise back into the matrix in a memory in a column of size q×M. A permutation vector may then be applied to the matrix to arrive at the transpose. This method may be modified for special cases, such as square matrices, to further improve efficiency.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 57.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method for transposing a matrix of numbers using a computer system, said computer system having a processor, a memory, and a cache, the matrix stored in the memory and having M rows and N columns and a size M×N, the method including: determining n and q, wherein N=n*q, and wherein M×q represents a block size and wherein N is evenly divisible by q, partitioning said matrix into n columns of size M×q; for each column n: sequentially reading elements within said column n row-wise and sequentially writing said elements into the cache; and sequentially reading elements from the cache and sequenti
- Claim 2Depends on #1
The method of claim 1 , wherein said block size is the largest block size that fits into the cache wherein N is evenly divisible by
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 57 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (1)
- Cate, Esko G. et al., "Algorithm 513, Analysis of In-Situ Transposition [F1]", ACM Transactions on Mathematical Software, vol. 3, No. 1, pp. 104-110 (Mar. 1977).