Changeset 9730 for trunk/psLib/src/math/psSparse.c
- Timestamp:
- Oct 24, 2006, 12:55:05 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psSparse.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psSparse.c
r8627 r9730 35 35 psMemSetDeallocator(sparse, (psFreeFunc)sparseFree); 36 36 37 sparse->Aij = psVectorAlloc(Nelem, PS_DATA_F32); 38 sparse->Si = psVectorAlloc(Nelem, PS_DATA_S32); 39 sparse->Sj = psVectorAlloc(Nelem, PS_DATA_S32); 40 41 sparse->Aij->n = 0; 42 sparse->Si->n = 0; 43 sparse->Sj->n = 0; 37 sparse->Aij = psVectorAllocEmpty(Nelem, PS_DATA_F32); 38 sparse->Si = psVectorAllocEmpty(Nelem, PS_DATA_S32); 39 sparse->Sj = psVectorAllocEmpty(Nelem, PS_DATA_S32); 40 44 41 sparse->Nelem = 0; 45 42 46 43 sparse->Bfj = psVectorAlloc(Nrows, PS_DATA_F32); 47 44 sparse->Qii = psVectorAlloc(Nrows, PS_DATA_F32); 48 sparse->Bfj->n = Nrows;49 sparse->Qii->n = Nrows;50 45 51 46 sparse->Nrows = Nrows; … … 157 152 // temporary storage for intermediate results 158 153 psVector *dQ = psVectorAlloc(output->n, PS_DATA_F32); 159 dQ->n = output->n;160 154 161 155 for (int j = 0; j < Niter; j++) { … … 197 191 psVector *tSi = psVectorAlloc(Nelem, PS_DATA_S32); 198 192 psVector *tSj = psVectorAlloc(Nelem, PS_DATA_S32); 199 tAij->n = tSi->n = tSj->n = Nelem;200 193 201 194 for (int i = 0; i < Nelem; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
