Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Sparse matrix storage method CSRL (Compressed Sparse Row with Local Information) and SpMV (Sparse Matrix Vector Multiplication) realization method based on same

A sparse matrix and implementation method technology, applied in complex mathematical operations and other directions, can solve problems such as inability to vectorize, sparse storage methods do not contain key local information, etc., to reduce access, improve floating-point execution speed, and reduce storage space requirements. Effect

Active Publication Date: 2013-10-02
INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF5 Cites 44 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
  • Sparse matrix storage method CSRL (Compressed Sparse Row with Local Information) and SpMV (Sparse Matrix Vector Multiplication) realization method based on same
  • Sparse matrix storage method CSRL (Compressed Sparse Row with Local Information) and SpMV (Sparse Matrix Vector Multiplication) realization method based on same
  • Sparse matrix storage method CSRL (Compressed Sparse Row with Local Information) and SpMV (Sparse Matrix Vector Multiplication) realization method based on same

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 the array val in sequence, and its length is the number of non-zero elements in A nz;

[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. Continu...

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 (compressed sparse row with local information) for a sparse matrix and a SpMV implementation method based on the method, which belongs to the technical field of high-performance numerical calculation and is mainly used in meteorology, turbulence simulation, and astrophysics , reservoir simulation and other scientific calculations and practical applications. 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 lower than 10% of the peak value of hard...

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
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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products