1
! @@LICENSE@@ see Copyright notice in the top-directory
4
#include "bud_utils.inc"
6
!> @defgroup sm-csc0 CSC0 (Compressed Sparse Column 0-based column pointer)
9
!! A compressed sparse column matrix implementation using
10
!! a 0-based column-pointer.
12
!! This only contains the indices for the sparse matrix, the
13
!! data for the sparse matrix should be contained in an additional
14
!! data array of the corresponding data type.
16
!! The CSC sparsity pattern stored can be sorted in each
17
!! column such that the rows are consecutively aligned.
18
!! This will help ensure a fast access pattern in the matrix
19
!! with a column-based access pattern.
22
!! integer :: nc, nz, ic, idx
23
!! integer, pointer BUD_FORTRAN_CONTIGUOUS :: cptr(:), row(:)
25
!! call attach(this, nr=nc, nz=nz, cptr=cptr, row=row)
28
!! do idx = cptr(ic) + 1 , cptr(ic+1)
29
!! ! access M(row(idx)+1,ic)
34
!! There are no data-consistency checks performed (for performance
35
!! reasons) hence you *can* end up with multiple entries for the
36
!! same matrix element.
37
!! In such cases the developer must take care of these.
38
!! Please note that in certain cases such *duplicate* entries may a
44
# define BUD_MOD_NAME BUD_CC3(BUD_MOD,_,iSM_CSC0)
45
!> @defgroup BUD_MOD_NAME Integer (int)
46
!! `integer(selected_int_kind(9))` data type
49
# define BUD_LIST_NAME BUD_CC2(BUD_TYPE,iList)
50
# define BUD_TYPE_NAME BUD_CC2(BUD_TYPE,iSM_CSC0)
51
# define BUD_TYPE_VAR integer
52
# define BUD_TYPE_VAR_PREC ii_
58
# define BUD_MOD_NAME BUD_CC3(BUD_MOD,_,lSM_CSC0)
59
!> @defgroup BUD_MOD_NAME Integer (long)
60
!! `integer(selected_int_kind(18))` data type
63
# define BUD_LIST_NAME BUD_CC2(BUD_TYPE,lList)
64
# define BUD_TYPE_NAME BUD_CC2(BUD_TYPE,lSM_CSC0)
65
# define BUD_TYPE_VAR integer
66
# define BUD_TYPE_VAR_PREC il_
73
# define BUD_MOD_NAME BUD_CC3(BUD_MOD,_,SM_CSC0)
74
!> @defgroup BUD_MOD_NAME all sparse matrices in CSC0 format
77
use BUD_CC3(BUD_MOD,_,iSM_CSC0)
78
use BUD_CC3(BUD_MOD,_,lSM_CSC0)
86
! project-buds -- local file settings
87
! Anything below this line may be overwritten by scripts
88
! Below are non-editable settings
94
! f90-associate-indent: 2
95
! f90-continuation-indent: 2
96
! f90-structure-indent: 2
97
! f90-critical-indent: 2
98
! f90-program-indent: 2