Changeset 3586
- Timestamp:
- Mar 30, 2005, 4:33:17 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 3 edited
-
dataIO/psLookupTable.c (modified) (3 diffs)
-
fileUtils/psLookupTable.c (modified) (3 diffs)
-
types/psLookupTable.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataIO/psLookupTable.c
r3271 r3586 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 21:54:09$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-31 02:33:17 $ 11 11 * 12 12 * Copyright 2004-5 Maui High Performance Computing Center, University of Hawaii … … 563 563 // Initialize vector pointers 564 564 indexVec = table->index; 565 table->values = psArrayAlloc(1);566 values = table->values;565 values = table->values = psArrayAlloc(10); 566 values->n = 0; 567 567 568 568 // Create reusable line for continuous read … … 610 610 611 611 // Realloc number of columns as you go 612 psVector* vec = psVectorAlloc(0, elemType); 612 613 if(numCols == 1) { 613 indexVec = psVectorAlloc(0, elemType);614 indexVec = vec; 614 615 } else { 615 values = psArrayRealloc(values, numCols-1); 616 values->n = values->nalloc; 617 values->data[numCols-2] = psVectorAlloc(0, elemType); 616 psArrayAdd(values,0,vec); 617 psFree(vec); 618 618 } 619 619 -
trunk/psLib/src/fileUtils/psLookupTable.c
r3271 r3586 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 21:54:09$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-31 02:33:17 $ 11 11 * 12 12 * Copyright 2004-5 Maui High Performance Computing Center, University of Hawaii … … 563 563 // Initialize vector pointers 564 564 indexVec = table->index; 565 table->values = psArrayAlloc(1);566 values = table->values;565 values = table->values = psArrayAlloc(10); 566 values->n = 0; 567 567 568 568 // Create reusable line for continuous read … … 610 610 611 611 // Realloc number of columns as you go 612 psVector* vec = psVectorAlloc(0, elemType); 612 613 if(numCols == 1) { 613 indexVec = psVectorAlloc(0, elemType);614 indexVec = vec; 614 615 } else { 615 values = psArrayRealloc(values, numCols-1); 616 values->n = values->nalloc; 617 values->data[numCols-2] = psVectorAlloc(0, elemType); 616 psArrayAdd(values,0,vec); 617 psFree(vec); 618 618 } 619 619 -
trunk/psLib/src/types/psLookupTable.c
r3271 r3586 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 21:54:09$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-31 02:33:17 $ 11 11 * 12 12 * Copyright 2004-5 Maui High Performance Computing Center, University of Hawaii … … 563 563 // Initialize vector pointers 564 564 indexVec = table->index; 565 table->values = psArrayAlloc(1);566 values = table->values;565 values = table->values = psArrayAlloc(10); 566 values->n = 0; 567 567 568 568 // Create reusable line for continuous read … … 610 610 611 611 // Realloc number of columns as you go 612 psVector* vec = psVectorAlloc(0, elemType); 612 613 if(numCols == 1) { 613 indexVec = psVectorAlloc(0, elemType);614 indexVec = vec; 614 615 } else { 615 values = psArrayRealloc(values, numCols-1); 616 values->n = values->nalloc; 617 values->data[numCols-2] = psVectorAlloc(0, elemType); 616 psArrayAdd(values,0,vec); 617 psFree(vec); 618 618 } 619 619
Note:
See TracChangeset
for help on using the changeset viewer.
