diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-23 16:52:40 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-23 16:52:40 -0700 |
commit | 6f17c44e9167f810d6f7f03582f2f132464115d5 (patch) | |
tree | dd3205f236474b69407e1e7b0118f4ef4567c9ac /src/map/mapper/mapperVec.c | |
parent | f6eb5262a3176a97f4063f1c49a7d56545fcd53e (diff) | |
download | abc-6f17c44e9167f810d6f7f03582f2f132464115d5.tar.gz abc-6f17c44e9167f810d6f7f03582f2f132464115d5.tar.bz2 abc-6f17c44e9167f810d6f7f03582f2f132464115d5.zip |
Integrating barrier buffers into the mapper.
Diffstat (limited to 'src/map/mapper/mapperVec.c')
-rw-r--r-- | src/map/mapper/mapperVec.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/map/mapper/mapperVec.c b/src/map/mapper/mapperVec.c index dd87e752..8316072a 100644 --- a/src/map/mapper/mapperVec.c +++ b/src/map/mapper/mapperVec.c @@ -67,6 +67,8 @@ Map_NodeVec_t * Map_NodeVecAlloc( int nCap ) ***********************************************************************/ void Map_NodeVecFree( Map_NodeVec_t * p ) { + if ( p == NULL ) + return; ABC_FREE( p->pArray ); ABC_FREE( p ); } @@ -82,6 +84,25 @@ void Map_NodeVecFree( Map_NodeVec_t * p ) SeeAlso [] ***********************************************************************/ +Map_NodeVec_t * Map_NodeVecDup( Map_NodeVec_t * p ) +{ + Map_NodeVec_t * pNew = Map_NodeVecAlloc( p->nSize ); + memcpy( pNew->pArray, p->pArray, sizeof(int) * p->nSize ); + pNew->nSize = p->nSize; + return pNew; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ Map_Node_t ** Map_NodeVecReadArray( Map_NodeVec_t * p ) { return p->pArray; |