Changeset 6943 for trunk/psModules/src/pslib/psSparse.c
- Timestamp:
- Apr 21, 2006, 11:28:31 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pslib/psSparse.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pslib/psSparse.c
r6872 r6943 30 30 sparse->Bfj = psVectorAlloc (Nrows, PS_DATA_F32); 31 31 sparse->Qii = psVectorAlloc (Nrows, PS_DATA_F32); 32 sparse->Bfj->n = Nrows; 33 sparse->Qii->n = Nrows; 32 34 33 35 sparse->Nrows = Nrows; … … 109 111 if (output == NULL) { 110 112 output = psVectorAlloc (vector->n, PS_DATA_F32); 113 output->n = vector->n; 111 114 } 112 115 … … 136 139 // temporary storage for intermediate results 137 140 psVector *dQ = psVectorAlloc (guess->n, PS_DATA_F32); 141 dQ->n = guess->n; 138 142 139 143 for (int j = 0; j < Niter; j++) { … … 171 175 psVector *tSi = psVectorAlloc (Nelem, PS_DATA_S32); 172 176 psVector *tSj = psVectorAlloc (Nelem, PS_DATA_S32); 177 tAij->n = tSi->n = tSj->n = Nelem; 178 173 179 for (int i = 0; i < Nelem; i++) { 174 180 int j = index->data.U32[i]; … … 213 219 x->data.F32[1] = 5; 214 220 x->data.F32[2] = 7; 215 fprintf (stderr, "x: %f %f %f\n", x->data.F32[0], x->data.F32[1], x->data.F32[2]); 221 x->n = 3; 222 fprintf (stderr, "x: %f %f %f\n", x->data.F32[0], x->data.F32[1], x->data.F32[2]); 223 216 224 217 225 psVector *B = psSparseMatrixTimesVector (NULL, sparse, x);
Note:
See TracChangeset
for help on using the changeset viewer.
