format.h File Reference

Block compressed sparse row data structure. More...

#include <oski/common.h>
#include <oski/matrix.h>

Go to the source code of this file.

Data Structures

struct  tagBebop_matBCSR_t
 Block compressed sparse row (BCSR) format. More...

Defines

#define INC_OSKI_BCSR_FORMAT_H
 BCSR/format.h included.
Name mangling.
#define oski_matBCSR_t   MANGLE_(oski_matBCSR_t)
 BCSR matrix representation.

Typedefs

typedef struct tagBebop_matBCSR_t oski_matBCSR_t
 Block compressed sparse row (BCSR) format.


Detailed Description

Block compressed sparse row data structure.

For an overview, see Block Compressed Sparse Row (BCSR) Format.


Typedef Documentation

Block compressed sparse row (BCSR) format.

An $m\times n$ matrix $A$ is stored in $r\times c$ BCSR format using six arrays, $(P, J, V, \hat{P}, \hat{J}, \hat{V})$. The triplet $(P, J, V)$ stores rows 1 through $M = \lfloor\frac{m}{r}\rfloor$ using uniformly aligned $r\times c$ blocks, and the triplet $(\hat{P}, \hat{J}, \hat{V})$ stores any remaining $r' = m\bmod r$ rows using uniformly aligned $r'\times c$ blocks.

  1. $P$ is an integer array of block-row pointers, of length at least $M+1$.
  2. $J$ is an integer array of block column indices, of length at least $P[M]$.
  3. $V$ is an array of non-zero block values, of length at least $P[M]\cdot r\cdot c$.

Define block-row $I$ to be rows $1 + (I-1)\cdot r$ through $I\cdot r$ of $A$, where $1 \leq I \leq M$. For each $k$ such that $P[I-1] \leq k \leq P[I]$, $j_0=J[k]+1$ is the column index $(1,1)$ entry of an explicitly stored non-zero block whose values are laid out in row-major order in the subarray $V[krc : (k+1)rc-1]$.

These blocks are uniformly aligned, meaning that $(j_0-1)\bmod c = 0$. However, there is one exception: if $c$ does not divide $n$, then each block row may contain one block with $j_0 = n - c + 1$. If such a block overlaps with another block starting at column index $j_0'$, then the initial columns of the block at $j_0$ are set to zero.

If $r$ does not divide $m$, then the remaining rows are stored in $(\hat{P},\hat{J},\hat{V})$ as a single block row with $r'\times c$ blocks. These arrays follow the same conventions as $(P,J,V)$.


Generated on Fri Apr 8 22:35:19 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9