abc/src/aig/gia/giaEra2.c
/**Function*************************************************************

  Synopsis    [Returns the number of a variable for sharping the cube.]

  Description [Counts the number of variables that have dash in p1 and 
  non-dash in p2. If there is exactly one such variable, returns its index.
  Otherwise returns -1.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Returns the number of a variable for sharping the cube.]

Description [Counts the number of variables that have dash in p1 and
non-dash in p2. If there is exactly one such variable, returns its index.
Otherwise returns -1.]




Function Synopsis [ Returns the number of a variable for sharping the cube . ] Description [ Counts the number of variables that have dash in p1 and non - dash in p2 . If there is exactly one such variable returns its index . Otherwise returns - 1 . ]
static inline int Gia_StaAreSharpVar( Gia_StaAre_t * p1, Gia_StaAre_t * p2, int nWords )
{
    unsigned Word;
    int w, iVar = -1;
    for ( w = 0; w < nWords; w++ )
    {
        Word = (~(p1->pData[w] ^ (p1->pData[w] >> 1))) & (p2->pData[w] ^ (p2->pData[w] >> 1)) & 0x55555555;
        if ( Word == 0 )
            continue;
        if ( !Gia_WordHasOneBit(Word) )
            return -1;
        if ( iVar >= 0 )
            return -1;
        iVar = 16 * w + Gia_WordFindFirstBit( Word ) / 2;
    }
    return iVar;
}
static inline int Gia_StaAreSharpVar ( Gia_StaAre_t * p1 , Gia_StaAre_t * p2 , int nWords ) { unsigned Word ; int w , iVar = -1 ; for ( w = 0 ; w < nWords ; w ++ ) { Word = ( ~ ( p1 -> pData [ w ] ^ ( p1 -> pData [ w ] >> 1 ) ) ) & ( p2 -> pData [ w ] ^ ( p2 -> pData [ w ] >> 1 ) ) & 0x55555555 ; if ( Word == 0 ) continue ; if ( ! Gia_WordHasOneBit ( Word ) ) return -1 ; if ( iVar >= 0 ) return -1 ; iVar = 16 * w + Gia_WordFindFirstBit ( Word ) / 2 ; } return iVar ; }
Function
Synopsis    [Returns the number of a variable for sharping the cube.]
Function Synopsis [ Returns the number of a variable for sharping the cube . ]
// has exactly one bit // the first variable of this type