Changeset 4493 for trunk/psLib/src
- Timestamp:
- Jul 6, 2005, 4:17:54 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 7 edited
-
collections/psScalar.h (modified) (2 diffs)
-
collections/psVector.c (modified) (7 diffs)
-
collections/psVector.h (modified) (5 diffs)
-
image/psImage.c (modified) (2 diffs)
-
image/psImage.h (modified) (5 diffs)
-
image/psImageStructManip.c (modified) (2 diffs)
-
sysUtils/psType.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psScalar.h
r4409 r4493 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 6-28 20:17:52$13 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-07-07 02:17:53 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 typedef struct 33 33 { 34 ps Type type;///< Type of data.34 psMathType type; ///< Type of data. 35 35 36 36 union { -
trunk/psLib/src/collections/psVector.c
r4409 r4493 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 6-28 20:17:52$11 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-07-07 02:17:53 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 48 48 // FUNCTION IMPLEMENTATION - PUBLIC 49 49 50 psVector* psVectorAlloc( unsignedlong nalloc, psElemType type)50 psVector* psVectorAlloc( long nalloc, psElemType type) 51 51 { 52 52 psVector* psVec = NULL; … … 67 67 psVec->type.dimen = PS_DIMEN_VECTOR; 68 68 psVec->type.type = type; 69 *( int*)&psVec->nalloc = nalloc;69 *(long*)&psVec->nalloc = nalloc; 70 70 psVec->n = nalloc; 71 71 … … 76 76 } 77 77 78 psVector* psVectorRealloc(psVector* vector, unsignedlong nalloc)78 psVector* psVectorRealloc(psVector* vector, long nalloc) 79 79 { 80 80 psS32 elementSize = 0; … … 93 93 // Realloc after decrementation to avoid accessing freed array elements 94 94 vector->data.U8 = psRealloc(vector->data.U8, nalloc * elementSize); 95 *( int*)&vector->nalloc = nalloc;95 *(long*)&vector->nalloc = nalloc; 96 96 } 97 97 … … 99 99 } 100 100 101 psVector* psVectorRecycle(psVector* vector, unsignedlong nalloc, psElemType type)101 psVector* psVectorRecycle(psVector* vector, long nalloc, psElemType type) 102 102 { 103 103 psS32 byteSize; … … 120 120 if (byteSize > vector->nalloc*PSELEMTYPE_SIZEOF(vector->type.type)) { 121 121 vector->data.U8 = psRealloc(vector->data.U8, byteSize); 122 *( int*)&vector->nalloc = nalloc;122 *(long*)&vector->nalloc = nalloc; 123 123 } 124 124 -
trunk/psLib/src/collections/psVector.h
r4409 r4493 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 6-28 20:17:52$13 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-07-07 02:17:53 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 typedef struct 52 52 { 53 ps Type type; ///< Type of data.54 int n;///< Number of elements in use.55 const int nalloc;///< Total number of elements available.53 psMathType type; ///< Type of data. 54 long n; ///< Number of elements in use. 55 const long nalloc; ///< Total number of elements available. 56 56 p_psVectorData data; ///< Union for data types. 57 void *lock; ///< Optional lock for thread safety. 57 58 } 58 59 psVector; … … 73 74 */ 74 75 psVector* psVectorAlloc( 75 unsigned long nalloc,///< Total number of elements to make available.76 long nalloc, ///< Total number of elements to make available. 76 77 psElemType type ///< Type of data to be held by vector. 77 ); 78 ) 79 ; 78 80 79 81 /** Reallocate a vector. … … 88 90 psVector* psVectorRealloc( 89 91 psVector* vector, ///< Vector to reallocate. 90 unsigned long nalloc///< Total number of elements to make available.92 long nalloc ///< Total number of elements to make available. 91 93 ); 92 94 … … 120 122 ///< taken to preserve the values. 121 123 122 unsigned long nalloc,///< Total number of elements to make available.124 long nalloc, ///< Total number of elements to make available. 123 125 psElemType type ///< the datatype of the returned vector 124 126 ); -
trunk/psLib/src/image/psImage.c
r4409 r4493 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.7 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 6-28 20:17:52$11 * @version $Revision: 1.73 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-07-07 02:17:53 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 91 91 } 92 92 93 psRegion psRegionSet( psF32x0,94 psF32x1,95 psF32y0,96 psF32y1)93 psRegion psRegionSet(float x0, 94 float x1, 95 float y0, 96 float y1) 97 97 { 98 98 psRegion out; -
trunk/psLib/src/image/psImage.h
r4409 r4493 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 59$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 6-28 20:17:52$13 * @version $Revision: 1.60 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-07-07 02:17:53 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 typedef struct psImage 52 52 { 53 const ps Type type; ///< Image data type and dimension.53 const psMathType type; ///< Image data type and dimension. 54 54 const psU32 numCols; ///< Number of columns in image 55 55 const psU32 numRows; ///< Number of rows in image. … … 87 87 typedef struct 88 88 { 89 psF32x0; ///< the first column of the region.90 psF32x1; ///< the last column of the region.91 psF32y0; ///< the first row of the region.92 psF32y1; ///< the last row of the region.89 float x0; ///< the first column of the region. 90 float x1; ///< the last column of the region. 91 float y0; ///< the first row of the region. 92 float y1; ///< the last row of the region. 93 93 } 94 94 psRegion; … … 113 113 */ 114 114 psRegion psRegionSet( 115 psF32x0, ///< the first column of the region.116 psF32x1, ///< the last column of the region + 1.117 psF32y0, ///< the first row of the region.118 psF32y1 ///< the last row of the region + 1.115 float x0, ///< the first column of the region. 116 float x1, ///< the last column of the region + 1. 117 float y0, ///< the first row of the region. 118 float y1 ///< the last row of the region + 1. 119 119 ); 120 120 … … 152 152 153 153 /** Copy an image to a new buffer 154 * 154 * 155 155 * @return True if image copied or false if error 156 156 */ -
trunk/psLib/src/image/psImageStructManip.c
r3977 r4493 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-0 5-19 05:18:20$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-07-07 02:17:53 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 94 94 95 95 out->data.V = psRealloc(out->data.V,sizeof(psPtr)*numRows); // resize row pointer array 96 *(ps Type*)&out->type = image->type;96 *(psMathType*)&out->type = image->type; 97 97 *(psU32*)&out->numCols = numCols; 98 98 *(psU32*)&out->numRows = numRows; -
trunk/psLib/src/sysUtils/psType.h
r4444 r4493 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-07-0 1 03:57:39$12 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-07 02:17:53 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 278 278 typedef struct 279 279 { 280 psElemType type; ///< Primitive type.281 psDimen dimen; ///< Dimensionality.280 psElemType type; ///< Primitive type. 281 psDimen dimen; ///< Dimensionality. 282 282 } 283 283 psType; 284 285 typedef struct 286 { 287 psElemType type; ///< The type 288 psDimen dimen; ///< The dimensionality. 289 // psElemType type; ///< The type 290 } 291 psMathType; 284 292 285 293 /** The type of a basic data type … … 291 299 typedef struct 292 300 { 293 ps Typetype; ///< Data type information301 psMathType type; ///< Data type information 294 302 } 295 303 psMath;
Note:
See TracChangeset
for help on using the changeset viewer.
