@@ -54,8 +54,8 @@ contains
54
54
else
55
55
vec_y = zero_${s1}$
56
56
endif
57
- associate( data => matrix%data, index => matrix%index, sym => matrix%sym , nnz => matrix%nnz )
58
- if( sym == k_NOSYMMETRY ) then
57
+ associate( data => matrix%data, index => matrix%index, storage => matrix%storage , nnz => matrix%nnz )
58
+ if( storage == sparse_full ) then
59
59
do concurrent (k = 1:nnz)
60
60
ik = index(1,k)
61
61
jk = index(2,k)
@@ -101,8 +101,8 @@ contains
101
101
if(present(beta)) beta_ = beta
102
102
103
103
associate( data => matrix%data, col => matrix%col, rowptr => matrix%rowptr, &
104
- & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, sym => matrix%sym )
105
- if( sym == k_NOSYMMETRY ) then
104
+ & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, storage => matrix%storage )
105
+ if( storage == sparse_full ) then
106
106
do i = 1, nrows
107
107
aux = zero_${k1}$
108
108
do j = rowptr(i), rowptr(i+1)-1
@@ -115,7 +115,7 @@ contains
115
115
end if
116
116
end do
117
117
118
- else if( sym == k_SYMTRIINF )then
118
+ else if( storage == sparse_lower )then
119
119
do i = 1 , nrows
120
120
aux = zero_${s1}$
121
121
aux2 = alpha_ * vec_x(${rksfx2(rank-1)}$i)
@@ -132,7 +132,7 @@ contains
132
132
end if
133
133
end do
134
134
135
- else if( sym == k_SYMTRISUP )then
135
+ else if( storage == sparse_upper )then
136
136
do i = 1 , nrows
137
137
aux = vec_x(${rksfx2(rank-1)}$i) * data(rowptr(i))
138
138
aux2 = alpha_ * vec_x(${rksfx2(rank-1)}$i)
@@ -184,15 +184,15 @@ contains
184
184
endif
185
185
186
186
associate( data => matrix%data, colptr => matrix%colptr, row => matrix%row, &
187
- & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, sym => matrix%sym )
188
- if( sym == k_NOSYMMETRY ) then
187
+ & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, storage => matrix%storage )
188
+ if( storage == sparse_full ) then
189
189
do concurrent(j=1:ncols)
190
190
do i = colptr(j), colptr(j+1)-1
191
191
vec_y(${rksfx2(rank-1)}$row(i)) = vec_y(${rksfx2(rank-1)}$row(i)) + alpha_ * data(i) * vec_x(${rksfx2(rank-1)}$j)
192
192
end do
193
193
end do
194
194
195
- else if( sym == k_SYMTRIINF )then
195
+ else if( storage == sparse_lower )then
196
196
! NOT TESTED
197
197
do j = 1 , ncols
198
198
aux = vec_x(${rksfx2(rank-1)}$j) * data(colptr(j))
@@ -203,7 +203,7 @@ contains
203
203
vec_y(${rksfx2(rank-1)}$j) = vec_y(${rksfx2(rank-1)}$j) + alpha_ * aux
204
204
end do
205
205
206
- else if( sym == k_SYMTRISUP )then
206
+ else if( storage == sparse_upper )then
207
207
! NOT TESTED
208
208
do j = 1 , ncols
209
209
aux = zero_${s1}$
@@ -242,8 +242,8 @@ contains
242
242
vec_y = zero_${s1}$
243
243
endif
244
244
associate( data => matrix%data, index => matrix%index, MNZ_P_ROW => matrix%K, &
245
- & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, sym => matrix%sym )
246
- if( sym == k_NOSYMMETRY ) then
245
+ & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, storage => matrix%storage )
246
+ if( storage == sparse_full ) then
247
247
do concurrent (i = 1:nrows, k = 1:MNZ_P_ROW)
248
248
j = index(i,k)
249
249
if(j>0) vec_y(${rksfx2(rank-1)}$i) = vec_y(${rksfx2(rank-1)}$i) + alpha_*data(i,k) * vec_x(${rksfx2(rank-1)}$j)
@@ -277,10 +277,10 @@ contains
277
277
vec_y = zero_${s1}$
278
278
endif
279
279
associate( data => matrix%data, ia => matrix%rowptr , ja => matrix%col, cs => matrix%chunk_size, &
280
- & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, sym => matrix%sym )
280
+ & nnz => matrix%nnz, nrows => matrix%nrows, ncols => matrix%ncols, storage => matrix%storage )
281
281
num_chunks = nrows / cs
282
282
rm = nrows - num_chunks * cs
283
- if( sym == k_NOSYMMETRY ) then
283
+ if( storage == sparse_full ) then
284
284
285
285
select case(cs)
286
286
#:for chunk in CHUNKS
0 commit comments