A GPU-based method for constructing symmetric matrices with compressed sparse matrices

A technology of sparse matrix and construction method, applied in image data processing, instrumentation, computing, etc., can solve the problems of large matrix scale, large computing time, and limited video memory storage space, and achieve the effect of improving operating efficiency and reducing storage space

CN106775598BActive Publication Date: 2018-02-23WENZHOU UNIVERSITY
3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2018-02-23

Smart Images

  • Figure 1
    Figure 1
Patent Text Reader

Abstract

The embodiment of the invention discloses a symmetric matrix construction method for a compressed sparse matrix based on a GPU. The symmetric matrix construction method for the compressed sparse matrix based on the GPU comprises taking a compressed sparse matrix M in a given CSR-based storage format as an input matrix; according to the compressed sparse matrix M, converting the CSR storage format into a triple array T1 in parallel; storing each triple and a corresponding triple thereof in the triple array T1 in parallel, and carrying out parallel sorting to obtain a triple array T3; finding repeated data in the T3, constructing F-labeled repeatedly stored array elements, and deleting repeatedly stored elements with the F label of 1 in the T3 in parallel, so that a triple array T4 without repeated items is obtained; and according to the triple array T4, converting into the CSR storage format in parallel to be taken as an output matrix. By implementing the symmetric matrix construction method disclosed by the invention, processing performance of solving a symmetric matrix of the sparse matrix can be effectively improved, so that each step has parallelizability, and efficient parallel processing capacity in the GPU is played.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of matrix graphics processing, in particular to a method for constructing a symmetric matrix based on a GPU-compressed sparse matrix. Background technique

[0002] A matrix is ​​a commonly used tool in scientific computing and is widely used to solve linear equations, while a sparse matrix refers to a matrix containing only a small number of non-zero elements in the matrix, which is a special case of the matrix. Since there are a large number of elements with a value of 0 in the sparse matrix, the conventional matrix storage method will bring a large number of unnecessary operations during the matrix calculation operation. Therefore, in order to improve the operational efficiency of sparse matrices, more effective storage methods are often adopted, such as CSR (CompressedRow Storage, compressed row storage) storage format (see Dongarra J.Sparse matrix storage formats[J].Templates for the Solution of Algebrai...

Examples

Embodiment Construction

[0017] In order to make the object, technical solution and advantages of the present invention more clear, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0018] Such as figure 1 As shown, in the embodiment of the present invention, a proposed method for constructing a symmetric matrix of a GPU-based compressed sparse matrix, the method includes:

[0019] Step S101, a compressed sparse matrix M=(RowPtr, ColInd, Val) based on the CSR storage format is given as an input matrix, wherein RowPtr represents an array of row offsets, ColInd represents an array of element column numbers, and Val represents an array of element values. Note that n represents the order of the matrix M, then the number of elements in RowPtr is n+1, where the first n elements ...