A sparse matrix storage method using compressed sparse rows with local information and an implementation method of spmv based on the method

A sparse matrix, local information technology, applied in the field of high-performance numerical computing, can solve problems such as inability to vectorize, sparse storage methods do not contain key local information, etc., to improve performance, improve memory access speed and floating-point execution speed, reduce The effect of access cost

Active Publication Date: 2016-06-01
INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The technical problem solved by the present invention is: to overcome the shortage that the sparse storage method in the prior art does not contain a lot of key local information and cannot be directly vectorized, and to provide a sparse matrix storage method CSRL and a SpMV implementation method based on the method. The column indexes of non-zero elements are merged and stored, which reduces the storage space requirement; reduces the number of memory accesses, and improves the performance of sparse matrix vector multiplication SpMV

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A sparse matrix storage method using compressed sparse rows with local information and an implementation method of spmv based on the method
  • A sparse matrix storage method using compressed sparse rows with local information and an implementation method of spmv based on the method
  • A sparse matrix storage method using compressed sparse rows with local information and an implementation method of spmv based on the method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] Such as figure 1 As shown, the specific implementation process of the CSRL method of the present invention,

[0038] (1) For a row in the matrix, scan all the non-zero elements in the row in the sparse matrix A, and store each non-zero element in sequence in the array val, whose length is the number nz of non-zero elements in A;

[0039] (2) If the current non-zero element is the first non-zero element, record its column subscript index, and set the variable length that records the length of the continuous non-zero element segment to 1; if it is not the first non-zero element, then judge the current non-zero element Whether it is adjacent to the previous non-zero element. If it is adjacent, add 1 to length and continue to judge the next non-zero element. If it is not adjacent, the current continuous non-zero element segment ends, and the column subscript of the first non-zero element is stored in the jas array, and the length is stored Enter the jan array. Continue ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a sparse matrix storage method CSRL (Compressed Sparse Row with Local Information) and an SpMV (Sparse Matrix Vector Multiplication) realization method based on the same. The storage method comprises the following steps of scanning a sparse matrix A in rows and storing each non-zero element value information in an array val sequence; defining a plurality of non-zero elements with continuous row subscripts as a continuous non-zero element section, recording a row subscript of a first element in each continuous non-zero element section by use of an array jas, and recording the number of non-zero elements in each continuous non-zero element section by use of an array jan; and recording an initial index of a first continuous non-zero element section in each row of the sparse matrix A by use of an array ptr. According to the data storage method, row indexes of the non-zero elements are combined and stored, so that the storage space requirement is reduced, the data locality of the sparse matrix is fully excavated, access and calculation can be performed by use of an SIMD (Single Instruction Multiple Data) instruction, the access frequency of an internal storage can be reduced, and the SpMV performance is improved.

Description

technical field [0001] The invention relates to a data storage method CSRL (CompressedSparseRowwithLocalinformation: Compressed Sparse Row with Local Information) for sparse matrices and a SpMV implementation method based on the method, which belongs to the technical field of high-performance numerical calculation and is mainly used for meteorology, turbulence simulation, In scientific computing and practical applications such as astrophysics and reservoir simulation. Background technique [0002] Sparse matrix-vector multiplication (SpMV) y=A*x is a very important calculation kernel in iterative solvers, and iterative methods are widely used in scientific calculations such as meteorology, turbulence simulation, astrophysics, and reservoir simulation. and practical applications. But on the current computing platform based on memory hierarchy, the sparse matrix-vector multiplication performance of traditional CSR storage is very poor, and the operating efficiency is often lo...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/16
Inventor 刘芳芳张云泉张先轶王茜
Owner INST OF SOFTWARE - CHINESE ACAD OF SCI
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products