ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mvc.h File Reference
#include <stdio.h>
#include "misc/extra/extra.h"
Include dependency graph for mvc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MvcCubeStruct
 
struct  MvcListStruct
 
struct  MvcCoverStruct
 
struct  MvcDataStruct
 
struct  MvcManagerStruct
 

Macros

#define BITS_PER_WORD   32
 INCLUDES ///.
 
#define BITS_PER_WORD_MINUS   31
 
#define BITS_PER_WORD_LOG   5
 
#define BITS_DISJOINT   ((Mvc_CubeWord_t)0x55555555)
 
#define BITS_FULL   ((Mvc_CubeWord_t)0xffffffff)
 
#define Mvc_CubeReadNext(Cube)
 MACRO DEFINITIONS ///.
 
#define Mvc_CubeReadNextP(Cube)
 
#define Mvc_CubeReadLast(Cube)
 
#define Mvc_CubeReadSize(Cube)
 
#define Mvc_CubeSetNext(Cube, Next)
 
#define Mvc_CubeSetLast(Cube, Last)
 
#define Mvc_CubeSetSize(Cube, Size)
 
#define Mvc_Cube1Words(Cube)
 
#define Mvc_Cube2Words(Cube)
 
#define Mvc_CubeNWords(Cube)
 
#define Mvc_CubeWhichWord(Bit)
 
#define Mvc_CubeWhichBit(Bit)
 
#define Mvc_CubeBitValue(Cube, Bit)
 
#define Mvc_CubeBitInsert(Cube, Bit)
 
#define Mvc_CubeBitRemove(Cube, Bit)
 
#define Mvc_CubeVarValue(Cube, Var)
 
#define Mvc_Cube1BitClean(Cube)
 
#define Mvc_Cube2BitClean(Cube)
 
#define Mvc_CubeNBitClean(Cube)
 
#define Mvc_CubeBitCleanUnused(Cube)
 
#define Mvc_Cube1BitFill(Cube)
 
#define Mvc_Cube2BitFill(Cube)
 
#define Mvc_CubeNBitFill(Cube)
 
#define Mvc_Cube1BitNot(Cube)
 
#define Mvc_Cube2BitNot(Cube)
 
#define Mvc_CubeNBitNot(Cube)
 
#define Mvc_Cube1BitCopy(Cube1, Cube2)
 
#define Mvc_Cube2BitCopy(Cube1, Cube2)
 
#define Mvc_CubeNBitCopy(Cube1, Cube2)
 
#define Mvc_Cube1BitOr(CubeR, Cube1, Cube2)
 
#define Mvc_Cube2BitOr(CubeR, Cube1, Cube2)
 
#define Mvc_CubeNBitOr(CubeR, Cube1, Cube2)
 
#define Mvc_Cube1BitExor(CubeR, Cube1, Cube2)
 
#define Mvc_Cube2BitExor(CubeR, Cube1, Cube2)
 
#define Mvc_CubeNBitExor(CubeR, Cube1, Cube2)
 
#define Mvc_Cube1BitAnd(CubeR, Cube1, Cube2)
 
#define Mvc_Cube2BitAnd(CubeR, Cube1, Cube2)
 
#define Mvc_CubeNBitAnd(CubeR, Cube1, Cube2)
 
#define Mvc_Cube1BitSharp(CubeR, Cube1, Cube2)
 
#define Mvc_Cube2BitSharp(CubeR, Cube1, Cube2)
 
#define Mvc_CubeNBitSharp(CubeR, Cube1, Cube2)
 
#define Mvc_Cube1BitEmpty(Res, Cube)
 
#define Mvc_Cube2BitEmpty(Res, Cube)
 
#define Mvc_CubeNBitEmpty(Res, Cube)
 
#define Mvc_Cube1BitEqual(Res, Cube1, Cube2)
 
#define Mvc_Cube2BitEqual(Res, Cube1, Cube2)
 
#define Mvc_CubeNBitEqual(Res, Cube1, Cube2)
 
#define Mvc_Cube1BitLess(Res, Cube1, Cube2)
 
#define Mvc_Cube2BitLess(Res, Cube1, Cube2)
 
#define Mvc_CubeNBitLess(Res, Cube1, Cube2)
 
#define Mvc_Cube1BitMore(Res, Cube1, Cube2)
 
#define Mvc_Cube2BitMore(Res, Cube1, Cube2)
 
#define Mvc_CubeNBitMore(Res, Cube1, Cube2)
 
#define Mvc_Cube1BitNotImpl(Res, Cube1, Cube2)
 
#define Mvc_Cube2BitNotImpl(Res, Cube1, Cube2)
 
#define Mvc_CubeNBitNotImpl(Res, Cube1, Cube2)
 
#define Mvc_Cube1BitDisjoint(Res, Cube1, Cube2)
 
#define Mvc_Cube2BitDisjoint(Res, Cube1, Cube2)
 
#define Mvc_CubeNBitDisjoint(Res, Cube1, Cube2)
 
#define Mvc_Cube1BitEqualUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube2BitEqualUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeNBitEqualUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube1BitEqualOutsideMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube2BitEqualOutsideMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeNBitEqualOutsideMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube1BitIntersectUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube2BitIntersectUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeNBitIntersectUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube1BitNotImplUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_Cube2BitNotImplUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeNBitNotImplUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeBitClean(Cube)
 
#define Mvc_CubeBitFill(Cube)
 
#define Mvc_CubeBitNot(Cube)
 
#define Mvc_CubeBitCopy(Cube1, Cube2)
 
#define Mvc_CubeBitOr(CubeR, Cube1, Cube2)
 
#define Mvc_CubeBitExor(CubeR, Cube1, Cube2)
 
#define Mvc_CubeBitAnd(CubeR, Cube1, Cube2)
 
#define Mvc_CubeBitSharp(CubeR, Cube1, Cube2)
 
#define Mvc_CubeBitEmpty(Res, Cube)
 
#define Mvc_CubeBitEqual(Res, Cube1, Cube2)
 
#define Mvc_CubeBitLess(Res, Cube1, Cube2)
 
#define Mvc_CubeBitMore(Res, Cube1, Cube2)
 
#define Mvc_CubeBitNotImpl(Res, Cube1, Cube2)
 
#define Mvc_CubeBitDisjoint(Res, Cube1, Cube2)
 
#define Mvc_CubeBitEqualUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeBitEqualOutsideMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeBitIntersectUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_CubeBitNotImplUnderMask(Res, Cube1, Cube2, Mask)
 
#define Mvc_ListAddCubeHead(pList, pCube)
 
#define Mvc_ListAddCubeTail(pList, pCube)
 
#define Mvc_ListDeleteCube(pList, pPrev, pCube)
 
#define Mvc_CoverAddCubeHead(pCover, pCube)
 
#define Mvc_CoverAddCubeTail(pCover, pCube)
 
#define Mvc_CoverDeleteCube(pCover, pPrev, pCube)
 
#define Mvc_ListForEachCube(List, Cube)
 
#define Mvc_ListForEachCubeSafe(List, Cube, Cube2)
 
#define Mvc_CoverForEachCube(Cover, Cube)
 
#define Mvc_CoverForEachCubeWithIndex(Cover, Cube, Index)
 
#define Mvc_CoverForEachCubeSafe(Cover, Cube, Cube2)
 
#define Mvc_CoverForEachCubeStart(Start, Cube)
 
#define Mvc_CoverForEachCubeStartSafe(Start, Cube, Cube2)
 
#define Mvc_CubeForEachBit(Cover, Cube, iBit, Value)
 
#define Mvc_CubeForEachVarValue(Cover, Cube, iVar, Value)
 
#define MEM_ALLOC(Manager, Type, Size)
 
#define MEM_FREE(Manager, Type, Size, Pointer)
 

Typedefs

typedef unsigned int Mvc_CubeWord_t
 STRUCTURE DEFINITIONS ///.
 
typedef struct MvcCubeStruct Mvc_Cube_t
 
typedef struct MvcListStruct Mvc_List_t
 
typedef struct MvcCoverStruct Mvc_Cover_t
 
typedef struct MvcDataStruct Mvc_Data_t
 
typedef struct MvcManagerStruct Mvc_Manager_t
 

Functions

int Mvc_CoverReadWordNum (Mvc_Cover_t *pCover)
 FUNCTION DEFINITIONS ///.
 
int Mvc_CoverReadBitNum (Mvc_Cover_t *pCover)
 
int Mvc_CoverReadCubeNum (Mvc_Cover_t *pCover)
 
Mvc_Cube_tMvc_CoverReadCubeHead (Mvc_Cover_t *pCover)
 
Mvc_Cube_tMvc_CoverReadCubeTail (Mvc_Cover_t *pCover)
 
Mvc_List_tMvc_CoverReadCubeList (Mvc_Cover_t *pCover)
 
int Mvc_ListReadCubeNum (Mvc_List_t *pList)
 
Mvc_Cube_tMvc_ListReadCubeHead (Mvc_List_t *pList)
 
Mvc_Cube_tMvc_ListReadCubeTail (Mvc_List_t *pList)
 
void Mvc_CoverSetCubeNum (Mvc_Cover_t *pCover, int nItems)
 
void Mvc_CoverSetCubeHead (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverSetCubeTail (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverSetCubeList (Mvc_Cover_t *pCover, Mvc_List_t *pList)
 
int Mvc_CoverIsEmpty (Mvc_Cover_t *pCover)
 
int Mvc_CoverIsTautology (Mvc_Cover_t *pCover)
 
int Mvc_CoverIsBinaryBuffer (Mvc_Cover_t *pCover)
 
void Mvc_CoverMakeEmpty (Mvc_Cover_t *pCover)
 
void Mvc_CoverMakeTautology (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverCreateEmpty (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverCreateTautology (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverAlloc (Mvc_Manager_t *pMem, int nBits)
 DECLARATIONS ///.
 
Mvc_Cover_tMvc_CoverCreateConst (Mvc_Manager_t *pMem, int nBits, int Phase)
 
Mvc_Cover_tMvc_CoverClone (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverDup (Mvc_Cover_t *pCover)
 
void Mvc_CoverFree (Mvc_Cover_t *pCover)
 
void Mvc_CoverAllocateMask (Mvc_Cover_t *pCover)
 
void Mvc_CoverAllocateArrayLits (Mvc_Cover_t *pCover)
 
void Mvc_CoverAllocateArrayCubes (Mvc_Cover_t *pCover)
 
void Mvc_CoverDeallocateMask (Mvc_Cover_t *pCover)
 
void Mvc_CoverDeallocateArrayLits (Mvc_Cover_t *pCover)
 
Mvc_Cube_tMvc_CubeAlloc (Mvc_Cover_t *pCover)
 DECLARATIONS ///.
 
Mvc_Cube_tMvc_CubeDup (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CubeFree (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CubeBitRemoveDcs (Mvc_Cube_t *pCube)
 
int Mvc_CubeCompareInt (Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
 DECLARATIONS ///.
 
int Mvc_CubeCompareSizeAndInt (Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
 
int Mvc_CubeCompareIntUnderMask (Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
 
int Mvc_CubeCompareIntOutsideMask (Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
 
int Mvc_CubeCompareIntOutsideAndUnderMask (Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
 
Mvc_Cover_tMvc_CoverDivisor (Mvc_Cover_t *pCover)
 FUNCTION DEFINITIONS ///.
 
void Mvc_CoverDivide (Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
 FUNCTION DEFINITIONS ///.
 
void Mvc_CoverDivideInternal (Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
 
void Mvc_CoverDivideByLiteral (Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
 
void Mvc_CoverDivideByCube (Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
 
void Mvc_CoverDivideByLiteralQuo (Mvc_Cover_t *pCover, int iLit)
 
void Mvc_ListAddCubeHead_ (Mvc_List_t *pList, Mvc_Cube_t *pCube)
 DECLARATIONS ///.
 
void Mvc_ListAddCubeTail_ (Mvc_List_t *pList, Mvc_Cube_t *pCube)
 
void Mvc_ListDeleteCube_ (Mvc_List_t *pList, Mvc_Cube_t *pPrev, Mvc_Cube_t *pCube)
 
void Mvc_CoverAddCubeHead_ (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverAddCubeTail_ (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverDeleteCube_ (Mvc_Cover_t *pCover, Mvc_Cube_t *pPrev, Mvc_Cube_t *pCube)
 
void Mvc_CoverAddDupCubeHead (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverAddDupCubeTail (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverAddLiteralsOfCube (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverDeleteLiteralsOfCube (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverList2Array (Mvc_Cover_t *pCover)
 
void Mvc_CoverArray2List (Mvc_Cover_t *pCover)
 
Mvc_Cube_tMvc_ListGetTailFromHead (Mvc_Cube_t *pHead)
 
void Mvc_CoverPrint (Mvc_Cover_t *pCover)
 FUNCTION DEFINITIONS ///.
 
void Mvc_CubePrint (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverPrintMv (Mvc_Data_t *pData, Mvc_Cover_t *pCover)
 
void Mvc_CubePrintMv (Mvc_Data_t *pData, Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverSort (Mvc_Cover_t *pCover, Mvc_Cube_t *pMask, int(*pCompareFunc)(Mvc_Cube_t *, Mvc_Cube_t *, Mvc_Cube_t *))
 FuNCTION DEFINITIONS ///.
 
void Mvc_CoverSupport (Mvc_Cover_t *pCover, Mvc_Cube_t *pSupp)
 FUNCTION DEFINITIONS ///.
 
int Mvc_CoverSupportSizeBinary (Mvc_Cover_t *pCover)
 
int Mvc_CoverSupportVarBelongs (Mvc_Cover_t *pCover, int iVar)
 
void Mvc_CoverCommonCube (Mvc_Cover_t *pCover, Mvc_Cube_t *pComCube)
 
int Mvc_CoverIsCubeFree (Mvc_Cover_t *pCover)
 
void Mvc_CoverMakeCubeFree (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverCommonCubeCover (Mvc_Cover_t *pCover)
 
int Mvc_CoverCheckSuppContainment (Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 
int Mvc_CoverSetCubeSizes (Mvc_Cover_t *pCover)
 
int Mvc_CoverGetCubeSize (Mvc_Cube_t *pCube)
 
int Mvc_CoverCountCubePairDiffs (Mvc_Cover_t *pCover, unsigned char pDiffs[])
 
Mvc_Cover_tMvc_CoverRemap (Mvc_Cover_t *pCover, int *pVarsRem, int nVarsRem)
 
void Mvc_CoverInverse (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverRemoveDontCareLits (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverCofactor (Mvc_Cover_t *pCover, int iValue, int iValueOther)
 
Mvc_Cover_tMvc_CoverFlipVar (Mvc_Cover_t *pCover, int iValue0, int iValue1)
 
Mvc_Cover_tMvc_CoverUnivQuantify (Mvc_Cover_t *p, int iValueA0, int iValueA1, int iValueB0, int iValueB1)
 
Mvc_Cover_t ** Mvc_CoverCofactors (Mvc_Data_t *pData, Mvc_Cover_t *pCover, int iVar)
 
int Mvr_CoverCountLitsWithValue (Mvc_Data_t *pData, Mvc_Cover_t *pCover, int iVar, int iValue)
 
Mvc_Cover_tMvc_CoverTranspose (Mvc_Cover_t *pCover)
 
int Mvc_UtilsCheckUnusedZeros (Mvc_Cover_t *pCover)
 
int Mvc_CoverAnyLiteral (Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
 DECLARATIONS ///.
 
int Mvc_CoverBestLiteral (Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
 
int Mvc_CoverWorstLiteral (Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
 
Mvc_Cover_tMvc_CoverBestLiteralCover (Mvc_Cover_t *pCover, Mvc_Cover_t *pSimple)
 
int Mvc_CoverFirstCubeFirstLit (Mvc_Cover_t *pCover)
 
int Mvc_CoverCountLiterals (Mvc_Cover_t *pCover)
 
int Mvc_CoverIsOneLiteral (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverAlgebraicMultiply (Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 DECLARATIONS ///.
 
Mvc_Cover_tMvc_CoverAlgebraicSubtract (Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 
int Mvc_CoverAlgebraicEqual (Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 
Mvc_Cover_tMvc_CoverBooleanOr (Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 DECLARATIONS ///.
 
Mvc_Cover_tMvc_CoverBooleanAnd (Mvc_Data_t *p, Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 
int Mvc_CoverBooleanEqual (Mvc_Data_t *p, Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
 
int Mvc_CoverContain (Mvc_Cover_t *pCover)
 FUNCTION DEFINITIONS ///.
 
int Mvc_CoverTautology (Mvc_Data_t *p, Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverComplement (Mvc_Data_t *p, Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverSharp (Mvc_Data_t *p, Mvc_Cover_t *pA, Mvc_Cover_t *pB)
 
int Mvc_CoverDist0Cubes (Mvc_Data_t *pData, Mvc_Cube_t *pA, Mvc_Cube_t *pB)
 
void Mvc_CoverIntersectCubes (Mvc_Data_t *pData, Mvc_Cover_t *pC1, Mvc_Cover_t *pC2)
 
int Mvc_CoverIsIntersecting (Mvc_Data_t *pData, Mvc_Cover_t *pC1, Mvc_Cover_t *pC2)
 
void Mvc_CoverAppendCubes (Mvc_Cover_t *pC1, Mvc_Cover_t *pC2)
 
void Mvc_CoverCopyAndAppendCubes (Mvc_Cover_t *pC1, Mvc_Cover_t *pC2)
 
void Mvc_CoverRemoveCubes (Mvc_Cover_t *pC)
 
void Mvc_CoverMinimizeByReshape (Mvc_Data_t *pData, Mvc_Cover_t *pCover)
 
void Mvc_CoverDist1Merge (Mvc_Data_t *p, Mvc_Cover_t *pCover)
 
void Mvc_ManagerFree (Mvc_Manager_t *p)
 
Mvc_Manager_tMvc_ManagerStart ()
 DECLARATIONS ///.
 
Mvc_Manager_tMvc_ManagerAllocCover ()
 
Mvc_Manager_tMvc_ManagerAllocCube (int nWords)
 
Mvc_Manager_tMvc_ManagerFreeCover (Mvc_Cover_t *pCover)
 
Mvc_Manager_tMvc_ManagerFreeCube (Mvc_Cover_t *pCube, int nWords)
 

Macro Definition Documentation

◆ BITS_DISJOINT

#define BITS_DISJOINT   ((Mvc_CubeWord_t)0x55555555)

Definition at line 44 of file mvc.h.

◆ BITS_FULL

#define BITS_FULL   ((Mvc_CubeWord_t)0xffffffff)

Definition at line 45 of file mvc.h.

◆ BITS_PER_WORD

#define BITS_PER_WORD   32

INCLUDES ///.

CFile****************************************************************

FileName [mvc.h]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Data structure for MV cube/cover manipulation.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvc.h,v 1.10 2003/05/02 23:23:59 wjiang Exp

] PARAMETERS ///

Definition at line 41 of file mvc.h.

◆ BITS_PER_WORD_LOG

#define BITS_PER_WORD_LOG   5

Definition at line 43 of file mvc.h.

◆ BITS_PER_WORD_MINUS

#define BITS_PER_WORD_MINUS   31

Definition at line 42 of file mvc.h.

◆ MEM_ALLOC

#define MEM_ALLOC ( Manager,
Type,
Size )
Value:
((Type *)ABC_ALLOC( char, (Size) * sizeof(Type) ))
#define ABC_ALLOC(type, num)
Definition abc_global.h:264

Definition at line 567 of file mvc.h.

◆ MEM_FREE

#define MEM_FREE ( Manager,
Type,
Size,
Pointer )
Value:
if ( Pointer ) { ABC_FREE(Pointer); Pointer = NULL; }
#define ABC_FREE(obj)
Definition abc_global.h:267

Definition at line 568 of file mvc.h.

◆ Mvc_CoverAddCubeHead

#define Mvc_CoverAddCubeHead ( pCover,
pCube )
Value:
{\
Mvc_List_t * pList = &pCover->lCubes;\
Mvc_ListAddCubeHead( pList, pCube );\
}
struct MvcListStruct Mvc_List_t
Definition mvc.h:57

Definition at line 496 of file mvc.h.

496#define Mvc_CoverAddCubeHead( pCover, pCube )\
497{\
498 Mvc_List_t * pList = &pCover->lCubes;\
499 Mvc_ListAddCubeHead( pList, pCube );\
500}

◆ Mvc_CoverAddCubeTail

#define Mvc_CoverAddCubeTail ( pCover,
pCube )
Value:
{\
Mvc_List_t * pList = &pCover->lCubes;\
Mvc_ListAddCubeTail( pList, pCube );\
}

Definition at line 501 of file mvc.h.

501#define Mvc_CoverAddCubeTail( pCover, pCube )\
502{\
503 Mvc_List_t * pList = &pCover->lCubes;\
504 Mvc_ListAddCubeTail( pList, pCube );\
505}

◆ Mvc_CoverDeleteCube

#define Mvc_CoverDeleteCube ( pCover,
pPrev,
pCube )
Value:
{\
Mvc_List_t * pList = &pCover->lCubes;\
Mvc_ListDeleteCube( pList, pPrev, pCube );\
}

Definition at line 506 of file mvc.h.

506#define Mvc_CoverDeleteCube( pCover, pPrev, pCube )\
507{\
508 Mvc_List_t * pList = &pCover->lCubes;\
509 Mvc_ListDeleteCube( pList, pPrev, pCube );\
510}

◆ Mvc_CoverForEachCube

#define Mvc_CoverForEachCube ( Cover,
Cube )
Value:
for ( Cube = (Cover)->lCubes.pHead;\
Cube;\
Cube = Cube->pNext )
struct cube Cube

Definition at line 528 of file mvc.h.

528#define Mvc_CoverForEachCube( Cover, Cube )\
529 for ( Cube = (Cover)->lCubes.pHead;\
530 Cube;\
531 Cube = Cube->pNext )

◆ Mvc_CoverForEachCubeSafe

#define Mvc_CoverForEachCubeSafe ( Cover,
Cube,
Cube2 )
Value:
for ( Cube = (Cover)->lCubes.pHead, Cube2 = (Cube? Cube->pNext: NULL);\
Cube;\
Cube = Cube2, Cube2 = (Cube? Cube->pNext: NULL) )

Definition at line 536 of file mvc.h.

536#define Mvc_CoverForEachCubeSafe( Cover, Cube, Cube2 )\
537 for ( Cube = (Cover)->lCubes.pHead, Cube2 = (Cube? Cube->pNext: NULL);\
538 Cube;\
539 Cube = Cube2, Cube2 = (Cube? Cube->pNext: NULL) )

◆ Mvc_CoverForEachCubeStart

#define Mvc_CoverForEachCubeStart ( Start,
Cube )
Value:
for ( Cube = Start;\
Cube;\
Cube = Cube->pNext )

Definition at line 542 of file mvc.h.

542#define Mvc_CoverForEachCubeStart( Start, Cube )\
543 for ( Cube = Start;\
544 Cube;\
545 Cube = Cube->pNext )

◆ Mvc_CoverForEachCubeStartSafe

#define Mvc_CoverForEachCubeStartSafe ( Start,
Cube,
Cube2 )
Value:
for ( Cube = Start, Cube2 = (Cube? Cube->pNext: NULL);\
Cube;\
Cube = Cube2, Cube2 = (Cube? Cube->pNext: NULL) )

Definition at line 546 of file mvc.h.

546#define Mvc_CoverForEachCubeStartSafe( Start, Cube, Cube2 )\
547 for ( Cube = Start, Cube2 = (Cube? Cube->pNext: NULL);\
548 Cube;\
549 Cube = Cube2, Cube2 = (Cube? Cube->pNext: NULL) )

◆ Mvc_CoverForEachCubeWithIndex

#define Mvc_CoverForEachCubeWithIndex ( Cover,
Cube,
Index )
Value:
for ( Index = 0, Cube = (Cover)->lCubes.pHead;\
Cube;\
Index++, Cube = Cube->pNext )

Definition at line 532 of file mvc.h.

532#define Mvc_CoverForEachCubeWithIndex( Cover, Cube, Index )\
533 for ( Index = 0, Cube = (Cover)->lCubes.pHead;\
534 Cube;\
535 Index++, Cube = Cube->pNext )

◆ Mvc_Cube1BitAnd

#define Mvc_Cube1BitAnd ( CubeR,
Cube1,
Cube2 )
Value:
(((CubeR)->pData[0]) = ((Cube1)->pData[0] & (Cube2)->pData[0]))

Definition at line 227 of file mvc.h.

227#define Mvc_Cube1BitAnd( CubeR, Cube1, Cube2 )\
228 (((CubeR)->pData[0]) = ((Cube1)->pData[0] & (Cube2)->pData[0]))

◆ Mvc_Cube1BitClean

#define Mvc_Cube1BitClean ( Cube)
Value:
((Cube)->pData[0] = 0)

Definition at line 147 of file mvc.h.

147#define Mvc_Cube1BitClean( Cube )\
148 ((Cube)->pData[0] = 0)

◆ Mvc_Cube1BitCopy

#define Mvc_Cube1BitCopy ( Cube1,
Cube2 )
Value:
(((Cube1)->pData[0]) = ((Cube2)->pData[0]))

Definition at line 191 of file mvc.h.

191#define Mvc_Cube1BitCopy( Cube1, Cube2 )\
192 (((Cube1)->pData[0]) = ((Cube2)->pData[0]))

◆ Mvc_Cube1BitDisjoint

#define Mvc_Cube1BitDisjoint ( Res,
Cube1,
Cube2 )
Value:
(Res = ((((Cube1)->pData[0]) & ((Cube2)->pData[0])) == 0 ))

Definition at line 315 of file mvc.h.

315#define Mvc_Cube1BitDisjoint( Res, Cube1, Cube2 )\
316 (Res = ((((Cube1)->pData[0]) & ((Cube2)->pData[0])) == 0 ))

◆ Mvc_Cube1BitEmpty

#define Mvc_Cube1BitEmpty ( Res,
Cube )
Value:
(Res = ((Cube)->pData[0] == 0))

Definition at line 251 of file mvc.h.

251#define Mvc_Cube1BitEmpty( Res, Cube )\
252 (Res = ((Cube)->pData[0] == 0))

◆ Mvc_Cube1BitEqual

#define Mvc_Cube1BitEqual ( Res,
Cube1,
Cube2 )
Value:
(Res = (((Cube1)->pData[0]) == ((Cube2)->pData[0])))

Definition at line 263 of file mvc.h.

263#define Mvc_Cube1BitEqual( Res, Cube1, Cube2 )\
264 (Res = (((Cube1)->pData[0]) == ((Cube2)->pData[0])))

◆ Mvc_Cube1BitEqualOutsideMask

#define Mvc_Cube1BitEqualOutsideMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = ((((Cube1)->pData[0]) | ((Mask)->pData[0])) == (((Cube2)->pData[0]) | ((Mask)->pData[0]))))

Definition at line 341 of file mvc.h.

341#define Mvc_Cube1BitEqualOutsideMask( Res, Cube1, Cube2, Mask )\
342 (Res = ((((Cube1)->pData[0]) | ((Mask)->pData[0])) == (((Cube2)->pData[0]) | ((Mask)->pData[0]))))

◆ Mvc_Cube1BitEqualUnderMask

#define Mvc_Cube1BitEqualUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = ((((Cube1)->pData[0]) & ((Mask)->pData[0])) == (((Cube2)->pData[0]) & ((Mask)->pData[0]))))

Definition at line 328 of file mvc.h.

328#define Mvc_Cube1BitEqualUnderMask( Res, Cube1, Cube2, Mask )\
329 (Res = ((((Cube1)->pData[0]) & ((Mask)->pData[0])) == (((Cube2)->pData[0]) & ((Mask)->pData[0]))))

◆ Mvc_Cube1BitExor

#define Mvc_Cube1BitExor ( CubeR,
Cube1,
Cube2 )
Value:
(((CubeR)->pData[0]) = ((Cube1)->pData[0] ^ (Cube2)->pData[0]))

Definition at line 215 of file mvc.h.

215#define Mvc_Cube1BitExor( CubeR, Cube1, Cube2 )\
216 (((CubeR)->pData[0]) = ((Cube1)->pData[0] ^ (Cube2)->pData[0]))

◆ Mvc_Cube1BitFill

#define Mvc_Cube1BitFill ( Cube)
Value:
(Cube)->pData[0] = (BITS_FULL >> (Cube)->nUnused);
#define BITS_FULL
Definition mvc.h:45

Definition at line 164 of file mvc.h.

164#define Mvc_Cube1BitFill( Cube )\
165 (Cube)->pData[0] = (BITS_FULL >> (Cube)->nUnused);

◆ Mvc_Cube1BitIntersectUnderMask

#define Mvc_Cube1BitIntersectUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = ((((Cube1)->pData[0]) & ((Cube2)->pData[0]) & ((Mask)->pData[0])) > 0))

Definition at line 354 of file mvc.h.

354#define Mvc_Cube1BitIntersectUnderMask( Res, Cube1, Cube2, Mask)\
355 (Res = ((((Cube1)->pData[0]) & ((Cube2)->pData[0]) & ((Mask)->pData[0])) > 0))

◆ Mvc_Cube1BitLess

#define Mvc_Cube1BitLess ( Res,
Cube1,
Cube2 )
Value:
(Res = (((Cube1)->pData[0]) < ((Cube2)->pData[0])))

Definition at line 276 of file mvc.h.

276#define Mvc_Cube1BitLess( Res, Cube1, Cube2 )\
277 (Res = (((Cube1)->pData[0]) < ((Cube2)->pData[0])))

◆ Mvc_Cube1BitMore

#define Mvc_Cube1BitMore ( Res,
Cube1,
Cube2 )
Value:
(Res = (((Cube1)->pData[0]) > ((Cube2)->pData[0])))

Definition at line 289 of file mvc.h.

289#define Mvc_Cube1BitMore( Res, Cube1, Cube2 )\
290 (Res = (((Cube1)->pData[0]) > ((Cube2)->pData[0])))

◆ Mvc_Cube1BitNot

#define Mvc_Cube1BitNot ( Cube)
Value:
((Cube)->pData[0] ^= (BITS_FULL >> (Cube)->nUnused))

Definition at line 178 of file mvc.h.

178#define Mvc_Cube1BitNot( Cube )\
179 ((Cube)->pData[0] ^= (BITS_FULL >> (Cube)->nUnused))

◆ Mvc_Cube1BitNotImpl

#define Mvc_Cube1BitNotImpl ( Res,
Cube1,
Cube2 )
Value:
(Res = (((Cube1)->pData[0]) & ~((Cube2)->pData[0])))

Definition at line 302 of file mvc.h.

302#define Mvc_Cube1BitNotImpl( Res, Cube1, Cube2 )\
303 (Res = (((Cube1)->pData[0]) & ~((Cube2)->pData[0])))

◆ Mvc_Cube1BitNotImplUnderMask

#define Mvc_Cube1BitNotImplUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = (((Mask)->pData[0]) & ((Cube1)->pData[0]) & ~((Cube2)->pData[0])))

Definition at line 367 of file mvc.h.

367#define Mvc_Cube1BitNotImplUnderMask( Res, Cube1, Cube2, Mask )\
368 (Res = (((Mask)->pData[0]) & ((Cube1)->pData[0]) & ~((Cube2)->pData[0])))

◆ Mvc_Cube1BitOr

#define Mvc_Cube1BitOr ( CubeR,
Cube1,
Cube2 )
Value:
(((CubeR)->pData[0]) = ((Cube1)->pData[0] | (Cube2)->pData[0]))

Definition at line 203 of file mvc.h.

203#define Mvc_Cube1BitOr( CubeR, Cube1, Cube2 )\
204 (((CubeR)->pData[0]) = ((Cube1)->pData[0] | (Cube2)->pData[0]))

◆ Mvc_Cube1BitSharp

#define Mvc_Cube1BitSharp ( CubeR,
Cube1,
Cube2 )
Value:
(((CubeR)->pData[0]) = ((Cube1)->pData[0] & ~((Cube2)->pData[0])))

Definition at line 239 of file mvc.h.

239#define Mvc_Cube1BitSharp( CubeR, Cube1, Cube2 )\
240 (((CubeR)->pData[0]) = ((Cube1)->pData[0] & ~((Cube2)->pData[0])))

◆ Mvc_Cube1Words

#define Mvc_Cube1Words ( Cube)
Value:
((Cube)->iLast == 0)

Definition at line 131 of file mvc.h.

◆ Mvc_Cube2BitAnd

#define Mvc_Cube2BitAnd ( CubeR,
Cube1,
Cube2 )
Value:
((((CubeR)->pData[0]) = ((Cube1)->pData[0] & (Cube2)->pData[0])),\
(((CubeR)->pData[1]) = ((Cube1)->pData[1] & (Cube2)->pData[1])))

Definition at line 229 of file mvc.h.

229#define Mvc_Cube2BitAnd( CubeR, Cube1, Cube2 )\
230 ((((CubeR)->pData[0]) = ((Cube1)->pData[0] & (Cube2)->pData[0])),\
231 (((CubeR)->pData[1]) = ((Cube1)->pData[1] & (Cube2)->pData[1])))

◆ Mvc_Cube2BitClean

#define Mvc_Cube2BitClean ( Cube)
Value:
(((Cube)->pData[0] = 0),\
((Cube)->pData[1] = 0))

Definition at line 149 of file mvc.h.

149#define Mvc_Cube2BitClean( Cube )\
150 (((Cube)->pData[0] = 0),\
151 ((Cube)->pData[1] = 0))

◆ Mvc_Cube2BitCopy

#define Mvc_Cube2BitCopy ( Cube1,
Cube2 )
Value:
((((Cube1)->pData[0]) = ((Cube2)->pData[0])),\
(((Cube1)->pData[1])= ((Cube2)->pData[1])))

Definition at line 193 of file mvc.h.

193#define Mvc_Cube2BitCopy( Cube1, Cube2 )\
194 ((((Cube1)->pData[0]) = ((Cube2)->pData[0])),\
195 (((Cube1)->pData[1])= ((Cube2)->pData[1])))

◆ Mvc_Cube2BitDisjoint

#define Mvc_Cube2BitDisjoint ( Res,
Cube1,
Cube2 )
Value:
(Res = (((((Cube1)->pData[0]) & ((Cube2)->pData[0])) == 0 ) &&\
((((Cube1)->pData[1]) & ((Cube2)->pData[1])) == 0 )))

Definition at line 317 of file mvc.h.

317#define Mvc_Cube2BitDisjoint( Res, Cube1, Cube2 )\
318 (Res = (((((Cube1)->pData[0]) & ((Cube2)->pData[0])) == 0 ) &&\
319 ((((Cube1)->pData[1]) & ((Cube2)->pData[1])) == 0 )))

◆ Mvc_Cube2BitEmpty

#define Mvc_Cube2BitEmpty ( Res,
Cube )
Value:
(Res = ((Cube)->pData[0] == 0 && (Cube)->pData[1] == 0))

Definition at line 253 of file mvc.h.

253#define Mvc_Cube2BitEmpty( Res, Cube )\
254 (Res = ((Cube)->pData[0] == 0 && (Cube)->pData[1] == 0))

◆ Mvc_Cube2BitEqual

#define Mvc_Cube2BitEqual ( Res,
Cube1,
Cube2 )
Value:
(Res = ((((Cube1)->pData[0]) == ((Cube2)->pData[0])) &&\
(((Cube1)->pData[1]) == ((Cube2)->pData[1]))))

Definition at line 265 of file mvc.h.

265#define Mvc_Cube2BitEqual( Res, Cube1, Cube2 )\
266 (Res = ((((Cube1)->pData[0]) == ((Cube2)->pData[0])) &&\
267 (((Cube1)->pData[1]) == ((Cube2)->pData[1]))))

◆ Mvc_Cube2BitEqualOutsideMask

#define Mvc_Cube2BitEqualOutsideMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = (((((Cube1)->pData[0]) | ((Mask)->pData[0])) == (((Cube2)->pData[0]) | ((Mask)->pData[0]))) &&\
((((Cube1)->pData[1]) | ((Mask)->pData[1])) == (((Cube2)->pData[1]) | ((Mask)->pData[1])))))

Definition at line 343 of file mvc.h.

343#define Mvc_Cube2BitEqualOutsideMask( Res, Cube1, Cube2, Mask )\
344 (Res = (((((Cube1)->pData[0]) | ((Mask)->pData[0])) == (((Cube2)->pData[0]) | ((Mask)->pData[0]))) &&\
345 ((((Cube1)->pData[1]) | ((Mask)->pData[1])) == (((Cube2)->pData[1]) | ((Mask)->pData[1])))))

◆ Mvc_Cube2BitEqualUnderMask

#define Mvc_Cube2BitEqualUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = (((((Cube1)->pData[0]) & ((Mask)->pData[0])) == (((Cube2)->pData[0]) & ((Mask)->pData[0]))) &&\
((((Cube1)->pData[1]) & ((Mask)->pData[1])) == (((Cube2)->pData[1]) & ((Mask)->pData[1])))))

Definition at line 330 of file mvc.h.

330#define Mvc_Cube2BitEqualUnderMask( Res, Cube1, Cube2, Mask )\
331 (Res = (((((Cube1)->pData[0]) & ((Mask)->pData[0])) == (((Cube2)->pData[0]) & ((Mask)->pData[0]))) &&\
332 ((((Cube1)->pData[1]) & ((Mask)->pData[1])) == (((Cube2)->pData[1]) & ((Mask)->pData[1])))))

◆ Mvc_Cube2BitExor

#define Mvc_Cube2BitExor ( CubeR,
Cube1,
Cube2 )
Value:
((((CubeR)->pData[0]) = ((Cube1)->pData[0] ^ (Cube2)->pData[0])),\
(((CubeR)->pData[1]) = ((Cube1)->pData[1] ^ (Cube2)->pData[1])))

Definition at line 217 of file mvc.h.

217#define Mvc_Cube2BitExor( CubeR, Cube1, Cube2 )\
218 ((((CubeR)->pData[0]) = ((Cube1)->pData[0] ^ (Cube2)->pData[0])),\
219 (((CubeR)->pData[1]) = ((Cube1)->pData[1] ^ (Cube2)->pData[1])))

◆ Mvc_Cube2BitFill

#define Mvc_Cube2BitFill ( Cube)
Value:
(((Cube)->pData[0] = BITS_FULL),\
((Cube)->pData[1] = (BITS_FULL >> (Cube)->nUnused)))

Definition at line 166 of file mvc.h.

166#define Mvc_Cube2BitFill( Cube )\
167 (((Cube)->pData[0] = BITS_FULL),\
168 ((Cube)->pData[1] = (BITS_FULL >> (Cube)->nUnused)))

◆ Mvc_Cube2BitIntersectUnderMask

#define Mvc_Cube2BitIntersectUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = (((((Cube1)->pData[0]) & ((Cube2)->pData[0]) & ((Mask)->pData[0])) > 0) ||\
((((Cube1)->pData[1]) & ((Cube2)->pData[1]) & ((Mask)->pData[1])) > 0)))

Definition at line 356 of file mvc.h.

356#define Mvc_Cube2BitIntersectUnderMask( Res, Cube1, Cube2, Mask)\
357 (Res = (((((Cube1)->pData[0]) & ((Cube2)->pData[0]) & ((Mask)->pData[0])) > 0) ||\
358 ((((Cube1)->pData[1]) & ((Cube2)->pData[1]) & ((Mask)->pData[1])) > 0)))

◆ Mvc_Cube2BitLess

#define Mvc_Cube2BitLess ( Res,
Cube1,
Cube2 )
Value:
(Res = ((((Cube1)->pData[0]) < ((Cube2)->pData[0])) ||\
((((Cube1)->pData[0]) == ((Cube2)->pData[0])) && (((Cube1)->pData[1]) < ((Cube2)->pData[1])))))

Definition at line 278 of file mvc.h.

278#define Mvc_Cube2BitLess( Res, Cube1, Cube2 )\
279 (Res = ((((Cube1)->pData[0]) < ((Cube2)->pData[0])) ||\
280 ((((Cube1)->pData[0]) == ((Cube2)->pData[0])) && (((Cube1)->pData[1]) < ((Cube2)->pData[1])))))

◆ Mvc_Cube2BitMore

#define Mvc_Cube2BitMore ( Res,
Cube1,
Cube2 )
Value:
(Res = ((((Cube1)->pData[0]) > ((Cube2)->pData[0])) ||\
((((Cube1)->pData[0]) == ((Cube2)->pData[0])) && (((Cube1)->pData[1]) > ((Cube2)->pData[1])))))

Definition at line 291 of file mvc.h.

291#define Mvc_Cube2BitMore( Res, Cube1, Cube2 )\
292 (Res = ((((Cube1)->pData[0]) > ((Cube2)->pData[0])) ||\
293 ((((Cube1)->pData[0]) == ((Cube2)->pData[0])) && (((Cube1)->pData[1]) > ((Cube2)->pData[1])))))

◆ Mvc_Cube2BitNot

#define Mvc_Cube2BitNot ( Cube)
Value:
(((Cube)->pData[0] ^= BITS_FULL),\
((Cube)->pData[1] ^= (BITS_FULL >> (Cube)->nUnused)))

Definition at line 180 of file mvc.h.

180#define Mvc_Cube2BitNot( Cube )\
181 (((Cube)->pData[0] ^= BITS_FULL),\
182 ((Cube)->pData[1] ^= (BITS_FULL >> (Cube)->nUnused)))

◆ Mvc_Cube2BitNotImpl

#define Mvc_Cube2BitNotImpl ( Res,
Cube1,
Cube2 )
Value:
(Res = ((((Cube1)->pData[0]) & ~((Cube2)->pData[0])) ||\
(((Cube1)->pData[1]) & ~((Cube2)->pData[1]))))

Definition at line 304 of file mvc.h.

304#define Mvc_Cube2BitNotImpl( Res, Cube1, Cube2 )\
305 (Res = ((((Cube1)->pData[0]) & ~((Cube2)->pData[0])) ||\
306 (((Cube1)->pData[1]) & ~((Cube2)->pData[1]))))

◆ Mvc_Cube2BitNotImplUnderMask

#define Mvc_Cube2BitNotImplUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
(Res = ((((Mask)->pData[0]) & ((Cube1)->pData[0]) & ~((Cube2)->pData[0])) ||\
(((Mask)->pData[1]) & ((Cube1)->pData[1]) & ~((Cube2)->pData[1]))))

Definition at line 369 of file mvc.h.

369#define Mvc_Cube2BitNotImplUnderMask( Res, Cube1, Cube2, Mask )\
370 (Res = ((((Mask)->pData[0]) & ((Cube1)->pData[0]) & ~((Cube2)->pData[0])) ||\
371 (((Mask)->pData[1]) & ((Cube1)->pData[1]) & ~((Cube2)->pData[1]))))

◆ Mvc_Cube2BitOr

#define Mvc_Cube2BitOr ( CubeR,
Cube1,
Cube2 )
Value:
((((CubeR)->pData[0]) = ((Cube1)->pData[0] | (Cube2)->pData[0])),\
(((CubeR)->pData[1]) = ((Cube1)->pData[1] | (Cube2)->pData[1])))

Definition at line 205 of file mvc.h.

205#define Mvc_Cube2BitOr( CubeR, Cube1, Cube2 )\
206 ((((CubeR)->pData[0]) = ((Cube1)->pData[0] | (Cube2)->pData[0])),\
207 (((CubeR)->pData[1]) = ((Cube1)->pData[1] | (Cube2)->pData[1])))

◆ Mvc_Cube2BitSharp

#define Mvc_Cube2BitSharp ( CubeR,
Cube1,
Cube2 )
Value:
((((CubeR)->pData[0]) = ((Cube1)->pData[0] & ~((Cube2)->pData[0]))),\
(((CubeR)->pData[1]) = ((Cube1)->pData[1] & ~((Cube2)->pData[1]))))

Definition at line 241 of file mvc.h.

241#define Mvc_Cube2BitSharp( CubeR, Cube1, Cube2 )\
242 ((((CubeR)->pData[0]) = ((Cube1)->pData[0] & ~((Cube2)->pData[0]))),\
243 (((CubeR)->pData[1]) = ((Cube1)->pData[1] & ~((Cube2)->pData[1]))))

◆ Mvc_Cube2Words

#define Mvc_Cube2Words ( Cube)
Value:
((Cube)->iLast == 1)

Definition at line 132 of file mvc.h.

◆ Mvc_CubeBitAnd

#define Mvc_CubeBitAnd ( CubeR,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitAnd( CubeR, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitAnd( CubeR, Cube1, Cube2 ); }\
else { Mvc_CubeNBitAnd( CubeR, Cube1, Cube2 ); }
#define Mvc_Cube1BitAnd(CubeR, Cube1, Cube2)
Definition mvc.h:227
#define Mvc_CubeNBitAnd(CubeR, Cube1, Cube2)
Definition mvc.h:232
#define Mvc_Cube2Words(Cube)
Definition mvc.h:132
#define Mvc_Cube1Words(Cube)
Definition mvc.h:131
#define Mvc_Cube2BitAnd(CubeR, Cube1, Cube2)
Definition mvc.h:229

Definition at line 405 of file mvc.h.

405#define Mvc_CubeBitAnd( CubeR, Cube1, Cube2 )\
406 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitAnd( CubeR, Cube1, Cube2 ); }\
407 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitAnd( CubeR, Cube1, Cube2 ); }\
408 else { Mvc_CubeNBitAnd( CubeR, Cube1, Cube2 ); }

◆ Mvc_CubeBitClean

#define Mvc_CubeBitClean ( Cube)
Value:
else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitClean( Cube ); }\
else { Mvc_CubeNBitClean( Cube ); }
#define Mvc_Cube1BitClean(Cube)
Definition mvc.h:147
#define Mvc_Cube2BitClean(Cube)
Definition mvc.h:149
#define Mvc_CubeNBitClean(Cube)
Definition mvc.h:152

Definition at line 381 of file mvc.h.

381#define Mvc_CubeBitClean( Cube )\
382 if ( Mvc_Cube1Words(Cube) ) { Mvc_Cube1BitClean( Cube ); }\
383 else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitClean( Cube ); }\
384 else { Mvc_CubeNBitClean( Cube ); }

◆ Mvc_CubeBitCleanUnused

#define Mvc_CubeBitCleanUnused ( Cube)
Value:
((Cube)->pData[(Cube)->iLast] &= (BITS_FULL >> (Cube)->nUnused))

Definition at line 160 of file mvc.h.

160#define Mvc_CubeBitCleanUnused( Cube )\
161 ((Cube)->pData[(Cube)->iLast] &= (BITS_FULL >> (Cube)->nUnused))

◆ Mvc_CubeBitCopy

#define Mvc_CubeBitCopy ( Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitCopy( Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitCopy( Cube1, Cube2 ); }\
else { Mvc_CubeNBitCopy( Cube1, Cube2 ); }
#define Mvc_CubeNBitCopy(Cube1, Cube2)
Definition mvc.h:196
#define Mvc_Cube2BitCopy(Cube1, Cube2)
Definition mvc.h:193
#define Mvc_Cube1BitCopy(Cube1, Cube2)
Definition mvc.h:191

Definition at line 393 of file mvc.h.

393#define Mvc_CubeBitCopy( Cube1, Cube2 )\
394 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitCopy( Cube1, Cube2 ); }\
395 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitCopy( Cube1, Cube2 ); }\
396 else { Mvc_CubeNBitCopy( Cube1, Cube2 ); }

◆ Mvc_CubeBitDisjoint

#define Mvc_CubeBitDisjoint ( Res,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitDisjoint( Res, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitDisjoint( Res, Cube1, Cube2 ); }\
else { Mvc_CubeNBitDisjoint( Res, Cube1, Cube2 ); }
#define Mvc_CubeNBitDisjoint(Res, Cube1, Cube2)
Definition mvc.h:320
#define Mvc_Cube1BitDisjoint(Res, Cube1, Cube2)
Definition mvc.h:315
#define Mvc_Cube2BitDisjoint(Res, Cube1, Cube2)
Definition mvc.h:317

Definition at line 433 of file mvc.h.

433#define Mvc_CubeBitDisjoint( Res, Cube1, Cube2 )\
434 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitDisjoint( Res, Cube1, Cube2 ); }\
435 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitDisjoint( Res, Cube1, Cube2 ); }\
436 else { Mvc_CubeNBitDisjoint( Res, Cube1, Cube2 ); }

◆ Mvc_CubeBitEmpty

#define Mvc_CubeBitEmpty ( Res,
Cube )
Value:
if ( Mvc_Cube1Words(Cube) ) { Mvc_Cube1BitEmpty( Res, Cube ); }\
else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitEmpty( Res, Cube ); }\
else { Mvc_CubeNBitEmpty( Res, Cube ); }
#define Mvc_CubeNBitEmpty(Res, Cube)
Definition mvc.h:255
#define Mvc_Cube1BitEmpty(Res, Cube)
Definition mvc.h:251
#define Mvc_Cube2BitEmpty(Res, Cube)
Definition mvc.h:253

Definition at line 413 of file mvc.h.

413#define Mvc_CubeBitEmpty( Res, Cube )\
414 if ( Mvc_Cube1Words(Cube) ) { Mvc_Cube1BitEmpty( Res, Cube ); }\
415 else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitEmpty( Res, Cube ); }\
416 else { Mvc_CubeNBitEmpty( Res, Cube ); }

◆ Mvc_CubeBitEqual

#define Mvc_CubeBitEqual ( Res,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitEqual( Res, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitEqual( Res, Cube1, Cube2 ); }\
else { Mvc_CubeNBitEqual( Res, Cube1, Cube2 ); }
#define Mvc_CubeNBitEqual(Res, Cube1, Cube2)
Definition mvc.h:268
#define Mvc_Cube2BitEqual(Res, Cube1, Cube2)
Definition mvc.h:265
#define Mvc_Cube1BitEqual(Res, Cube1, Cube2)
Definition mvc.h:263

Definition at line 417 of file mvc.h.

417#define Mvc_CubeBitEqual( Res, Cube1, Cube2 )\
418 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitEqual( Res, Cube1, Cube2 ); }\
419 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitEqual( Res, Cube1, Cube2 ); }\
420 else { Mvc_CubeNBitEqual( Res, Cube1, Cube2 ); }

◆ Mvc_CubeBitEqualOutsideMask

#define Mvc_CubeBitEqualOutsideMask ( Res,
Cube1,
Cube2,
Mask )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitEqualOutsideMask( Res, Cube1, Cube2, Mask ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitEqualOutsideMask( Res, Cube1, Cube2, Mask ); }\
else { Mvc_CubeNBitEqualOutsideMask( Res, Cube1, Cube2, Mask ); }
#define Mvc_CubeNBitEqualOutsideMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:346
#define Mvc_Cube2BitEqualOutsideMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:343
#define Mvc_Cube1BitEqualOutsideMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:341

Definition at line 441 of file mvc.h.

441#define Mvc_CubeBitEqualOutsideMask( Res, Cube1, Cube2, Mask )\
442 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitEqualOutsideMask( Res, Cube1, Cube2, Mask ); }\
443 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitEqualOutsideMask( Res, Cube1, Cube2, Mask ); }\
444 else { Mvc_CubeNBitEqualOutsideMask( Res, Cube1, Cube2, Mask ); }

◆ Mvc_CubeBitEqualUnderMask

#define Mvc_CubeBitEqualUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitEqualUnderMask( Res, Cube1, Cube2, Mask ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitEqualUnderMask( Res, Cube1, Cube2, Mask ); }\
else { Mvc_CubeNBitEqualUnderMask( Res, Cube1, Cube2, Mask ); }
#define Mvc_Cube2BitEqualUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:330
#define Mvc_CubeNBitEqualUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:333
#define Mvc_Cube1BitEqualUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:328

Definition at line 437 of file mvc.h.

437#define Mvc_CubeBitEqualUnderMask( Res, Cube1, Cube2, Mask )\
438 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitEqualUnderMask( Res, Cube1, Cube2, Mask ); }\
439 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitEqualUnderMask( Res, Cube1, Cube2, Mask ); }\
440 else { Mvc_CubeNBitEqualUnderMask( Res, Cube1, Cube2, Mask ); }

◆ Mvc_CubeBitExor

#define Mvc_CubeBitExor ( CubeR,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitExor( CubeR, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitExor( CubeR, Cube1, Cube2 ); }\
else { Mvc_CubeNBitExor( CubeR, Cube1, Cube2 ); }
#define Mvc_Cube2BitExor(CubeR, Cube1, Cube2)
Definition mvc.h:217
#define Mvc_CubeNBitExor(CubeR, Cube1, Cube2)
Definition mvc.h:220
#define Mvc_Cube1BitExor(CubeR, Cube1, Cube2)
Definition mvc.h:215

Definition at line 401 of file mvc.h.

401#define Mvc_CubeBitExor( CubeR, Cube1, Cube2 )\
402 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitExor( CubeR, Cube1, Cube2 ); }\
403 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitExor( CubeR, Cube1, Cube2 ); }\
404 else { Mvc_CubeNBitExor( CubeR, Cube1, Cube2 ); }

◆ Mvc_CubeBitFill

#define Mvc_CubeBitFill ( Cube)
Value:
else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitFill( Cube ); }\
else { Mvc_CubeNBitFill( Cube ); }
#define Mvc_Cube2BitFill(Cube)
Definition mvc.h:166
#define Mvc_Cube1BitFill(Cube)
Definition mvc.h:164
#define Mvc_CubeNBitFill(Cube)
Definition mvc.h:169

Definition at line 385 of file mvc.h.

385#define Mvc_CubeBitFill( Cube )\
386 if ( Mvc_Cube1Words(Cube) ) { Mvc_Cube1BitFill( Cube ); }\
387 else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitFill( Cube ); }\
388 else { Mvc_CubeNBitFill( Cube ); }

◆ Mvc_CubeBitInsert

#define Mvc_CubeBitInsert ( Cube,
Bit )
Value:
((Cube)->pData[Mvc_CubeWhichWord(Bit)] |= (((Mvc_CubeWord_t)1)<<(Mvc_CubeWhichBit(Bit))))
#define Mvc_CubeWhichWord(Bit)
Definition mvc.h:135
unsigned int Mvc_CubeWord_t
STRUCTURE DEFINITIONS ///.
Definition mvc.h:55
#define Mvc_CubeWhichBit(Bit)
Definition mvc.h:136

Definition at line 139 of file mvc.h.

◆ Mvc_CubeBitIntersectUnderMask

#define Mvc_CubeBitIntersectUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitIntersectUnderMask( Res, Cube1, Cube2, Mask ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitIntersectUnderMask( Res, Cube1, Cube2, Mask ); }\
else { Mvc_CubeNBitIntersectUnderMask( Res, Cube1, Cube2, Mask ); }
#define Mvc_Cube2BitIntersectUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:356
#define Mvc_CubeNBitIntersectUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:359
#define Mvc_Cube1BitIntersectUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:354

Definition at line 445 of file mvc.h.

445#define Mvc_CubeBitIntersectUnderMask( Res, Cube1, Cube2, Mask )\
446 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitIntersectUnderMask( Res, Cube1, Cube2, Mask ); }\
447 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitIntersectUnderMask( Res, Cube1, Cube2, Mask ); }\
448 else { Mvc_CubeNBitIntersectUnderMask( Res, Cube1, Cube2, Mask ); }

◆ Mvc_CubeBitLess

#define Mvc_CubeBitLess ( Res,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitLess( Res, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitLess( Res, Cube1, Cube2 ); }\
else { Mvc_CubeNBitLess( Res, Cube1, Cube2 ); }
#define Mvc_Cube2BitLess(Res, Cube1, Cube2)
Definition mvc.h:278
#define Mvc_Cube1BitLess(Res, Cube1, Cube2)
Definition mvc.h:276
#define Mvc_CubeNBitLess(Res, Cube1, Cube2)
Definition mvc.h:281

Definition at line 421 of file mvc.h.

421#define Mvc_CubeBitLess( Res, Cube1, Cube2 )\
422 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitLess( Res, Cube1, Cube2 ); }\
423 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitLess( Res, Cube1, Cube2 ); }\
424 else { Mvc_CubeNBitLess( Res, Cube1, Cube2 ); }

◆ Mvc_CubeBitMore

#define Mvc_CubeBitMore ( Res,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitMore( Res, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitMore( Res, Cube1, Cube2 ); }\
else { Mvc_CubeNBitMore( Res, Cube1, Cube2 ); }
#define Mvc_Cube2BitMore(Res, Cube1, Cube2)
Definition mvc.h:291
#define Mvc_Cube1BitMore(Res, Cube1, Cube2)
Definition mvc.h:289
#define Mvc_CubeNBitMore(Res, Cube1, Cube2)
Definition mvc.h:294

Definition at line 425 of file mvc.h.

425#define Mvc_CubeBitMore( Res, Cube1, Cube2 )\
426 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitMore( Res, Cube1, Cube2 ); }\
427 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitMore( Res, Cube1, Cube2 ); }\
428 else { Mvc_CubeNBitMore( Res, Cube1, Cube2 ); }

◆ Mvc_CubeBitNot

#define Mvc_CubeBitNot ( Cube)
Value:
else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitNot( Cube ); }\
else { Mvc_CubeNBitNot( Cube ); }
#define Mvc_Cube1BitNot(Cube)
Definition mvc.h:178
#define Mvc_CubeNBitNot(Cube)
Definition mvc.h:183
#define Mvc_Cube2BitNot(Cube)
Definition mvc.h:180

Definition at line 389 of file mvc.h.

389#define Mvc_CubeBitNot( Cube )\
390 if ( Mvc_Cube1Words(Cube) ) { Mvc_Cube1BitNot( Cube ); }\
391 else if ( Mvc_Cube2Words(Cube) ) { Mvc_Cube2BitNot( Cube ); }\
392 else { Mvc_CubeNBitNot( Cube ); }

◆ Mvc_CubeBitNotImpl

#define Mvc_CubeBitNotImpl ( Res,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitNotImpl( Res, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitNotImpl( Res, Cube1, Cube2 ); }\
else { Mvc_CubeNBitNotImpl( Res, Cube1, Cube2 ); }
#define Mvc_Cube1BitNotImpl(Res, Cube1, Cube2)
Definition mvc.h:302
#define Mvc_Cube2BitNotImpl(Res, Cube1, Cube2)
Definition mvc.h:304
#define Mvc_CubeNBitNotImpl(Res, Cube1, Cube2)
Definition mvc.h:307

Definition at line 429 of file mvc.h.

429#define Mvc_CubeBitNotImpl( Res, Cube1, Cube2 )\
430 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitNotImpl( Res, Cube1, Cube2 ); }\
431 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitNotImpl( Res, Cube1, Cube2 ); }\
432 else { Mvc_CubeNBitNotImpl( Res, Cube1, Cube2 ); }

◆ Mvc_CubeBitNotImplUnderMask

#define Mvc_CubeBitNotImplUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitNotImplUnderMask( Res, Cube1, Cube2, Mask ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitNotImplUnderMask( Res, Cube1, Cube2, Mask ); }\
else { Mvc_CubeNBitNotImplUnderMask( Res, Cube1, Cube2, Mask ); }
#define Mvc_Cube2BitNotImplUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:369
#define Mvc_CubeNBitNotImplUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:372
#define Mvc_Cube1BitNotImplUnderMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:367

Definition at line 449 of file mvc.h.

449#define Mvc_CubeBitNotImplUnderMask( Res, Cube1, Cube2, Mask )\
450 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitNotImplUnderMask( Res, Cube1, Cube2, Mask ); }\
451 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitNotImplUnderMask( Res, Cube1, Cube2, Mask ); }\
452 else { Mvc_CubeNBitNotImplUnderMask( Res, Cube1, Cube2, Mask ); }

◆ Mvc_CubeBitOr

#define Mvc_CubeBitOr ( CubeR,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitOr( CubeR, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitOr( CubeR, Cube1, Cube2 ); }\
else { Mvc_CubeNBitOr( CubeR, Cube1, Cube2 ); }
#define Mvc_CubeNBitOr(CubeR, Cube1, Cube2)
Definition mvc.h:208
#define Mvc_Cube1BitOr(CubeR, Cube1, Cube2)
Definition mvc.h:203
#define Mvc_Cube2BitOr(CubeR, Cube1, Cube2)
Definition mvc.h:205

Definition at line 397 of file mvc.h.

397#define Mvc_CubeBitOr( CubeR, Cube1, Cube2 )\
398 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitOr( CubeR, Cube1, Cube2 ); }\
399 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitOr( CubeR, Cube1, Cube2 ); }\
400 else { Mvc_CubeNBitOr( CubeR, Cube1, Cube2 ); }

◆ Mvc_CubeBitRemove

#define Mvc_CubeBitRemove ( Cube,
Bit )
Value:
((Cube)->pData[Mvc_CubeWhichWord(Bit)] &= ~(((Mvc_CubeWord_t)1)<<(Mvc_CubeWhichBit(Bit))))

Definition at line 140 of file mvc.h.

◆ Mvc_CubeBitSharp

#define Mvc_CubeBitSharp ( CubeR,
Cube1,
Cube2 )
Value:
if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitSharp( CubeR, Cube1, Cube2 ); }\
else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitSharp( CubeR, Cube1, Cube2 ); }\
else { Mvc_CubeNBitSharp( CubeR, Cube1, Cube2 ); }
#define Mvc_Cube1BitSharp(CubeR, Cube1, Cube2)
Definition mvc.h:239
#define Mvc_Cube2BitSharp(CubeR, Cube1, Cube2)
Definition mvc.h:241
#define Mvc_CubeNBitSharp(CubeR, Cube1, Cube2)
Definition mvc.h:244

Definition at line 409 of file mvc.h.

409#define Mvc_CubeBitSharp( CubeR, Cube1, Cube2 )\
410 if ( Mvc_Cube1Words(Cube1) ) { Mvc_Cube1BitSharp( CubeR, Cube1, Cube2 ); }\
411 else if ( Mvc_Cube2Words(Cube1) ){ Mvc_Cube2BitSharp( CubeR, Cube1, Cube2 ); }\
412 else { Mvc_CubeNBitSharp( CubeR, Cube1, Cube2 ); }

◆ Mvc_CubeBitValue

#define Mvc_CubeBitValue ( Cube,
Bit )
Value:
(((Cube)->pData[Mvc_CubeWhichWord(Bit)] & (((Mvc_CubeWord_t)1)<<(Mvc_CubeWhichBit(Bit)))) > 0)

Definition at line 138 of file mvc.h.

◆ Mvc_CubeForEachBit

#define Mvc_CubeForEachBit ( Cover,
Cube,
iBit,
Value )
Value:
for ( iBit = 0;\
iBit < Cover->nBits && ((Value = Mvc_CubeBitValue(Cube,iBit)), 1);\
iBit++ )
#define Mvc_CubeBitValue(Cube, Bit)
Definition mvc.h:138

Definition at line 553 of file mvc.h.

553#define Mvc_CubeForEachBit( Cover, Cube, iBit, Value )\
554 for ( iBit = 0;\
555 iBit < Cover->nBits && ((Value = Mvc_CubeBitValue(Cube,iBit)), 1);\
556 iBit++ )

◆ Mvc_CubeForEachVarValue

#define Mvc_CubeForEachVarValue ( Cover,
Cube,
iVar,
Value )
Value:
for ( iVar = 0;\
iVar < Cover->nBits/2 && (Value = Mvc_CubeVarValue(Cube,iVar));\
iVar++ )
#define Mvc_CubeVarValue(Cube, Var)
Definition mvc.h:142

Definition at line 558 of file mvc.h.

558#define Mvc_CubeForEachVarValue( Cover, Cube, iVar, Value )\
559 for ( iVar = 0;\
560 iVar < Cover->nBits/2 && (Value = Mvc_CubeVarValue(Cube,iVar));\
561 iVar++ )

◆ Mvc_CubeNBitAnd

#define Mvc_CubeNBitAnd ( CubeR,
Cube1,
Cube2 )
Value:
{\
int _i_;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
(((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] & (Cube2)->pData[_i_]));\
}

Definition at line 232 of file mvc.h.

232#define Mvc_CubeNBitAnd( CubeR, Cube1, Cube2 )\
233{\
234 int _i_;\
235 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
236 (((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] & (Cube2)->pData[_i_]));\
237}

◆ Mvc_CubeNBitClean

#define Mvc_CubeNBitClean ( Cube)
Value:
{\
int _i_;\
for( _i_ = (Cube)->iLast; _i_ >= 0; _i_--)\
(Cube)->pData[_i_] = 0;\
}

Definition at line 152 of file mvc.h.

152#define Mvc_CubeNBitClean( Cube )\
153{\
154 int _i_;\
155 for( _i_ = (Cube)->iLast; _i_ >= 0; _i_--)\
156 (Cube)->pData[_i_] = 0;\
157}

◆ Mvc_CubeNBitCopy

#define Mvc_CubeNBitCopy ( Cube1,
Cube2 )
Value:
{\
int _i_;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
((Cube1)->pData[_i_]) = ((Cube2)->pData[_i_]);\
}

Definition at line 196 of file mvc.h.

196#define Mvc_CubeNBitCopy( Cube1, Cube2 )\
197{\
198 int _i_;\
199 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
200 ((Cube1)->pData[_i_]) = ((Cube2)->pData[_i_]);\
201}

◆ Mvc_CubeNBitDisjoint

#define Mvc_CubeNBitDisjoint ( Res,
Cube1,
Cube2 )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Cube1)->pData[_i_]) & ((Cube2)->pData[_i_]))\
{ Res = 0; break; }\
}

Definition at line 320 of file mvc.h.

320#define Mvc_CubeNBitDisjoint( Res, Cube1, Cube2 )\
321{\
322 int _i_; Res = 1;\
323 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
324 if (((Cube1)->pData[_i_]) & ((Cube2)->pData[_i_]))\
325 { Res = 0; break; }\
326}

◆ Mvc_CubeNBitEmpty

#define Mvc_CubeNBitEmpty ( Res,
Cube )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube)->iLast; _i_ >= 0; _i_--)\
if ( (Cube)->pData[_i_] )\
{ Res = 0; break; }\
}

Definition at line 255 of file mvc.h.

255#define Mvc_CubeNBitEmpty( Res, Cube )\
256{\
257 int _i_; Res = 1;\
258 for (_i_ = (Cube)->iLast; _i_ >= 0; _i_--)\
259 if ( (Cube)->pData[_i_] )\
260 { Res = 0; break; }\
261}

◆ Mvc_CubeNBitEqual

#define Mvc_CubeNBitEqual ( Res,
Cube1,
Cube2 )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Cube1)->pData[_i_]) != ((Cube2)->pData[_i_]))\
{ Res = 0; break; }\
}

Definition at line 268 of file mvc.h.

268#define Mvc_CubeNBitEqual( Res, Cube1, Cube2 )\
269{\
270 int _i_; Res = 1;\
271 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
272 if (((Cube1)->pData[_i_]) != ((Cube2)->pData[_i_]))\
273 { Res = 0; break; }\
274}

◆ Mvc_CubeNBitEqualOutsideMask

#define Mvc_CubeNBitEqualOutsideMask ( Res,
Cube1,
Cube2,
Mask )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if ((((Cube1)->pData[_i_]) | ((Mask)->pData[_i_])) != (((Cube2)->pData[_i_]) | ((Mask)->pData[_i_])))\
{ Res = 0; break; }\
}

Definition at line 346 of file mvc.h.

346#define Mvc_CubeNBitEqualOutsideMask( Res, Cube1, Cube2, Mask )\
347{\
348 int _i_; Res = 1;\
349 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
350 if ((((Cube1)->pData[_i_]) | ((Mask)->pData[_i_])) != (((Cube2)->pData[_i_]) | ((Mask)->pData[_i_])))\
351 { Res = 0; break; }\
352}

◆ Mvc_CubeNBitEqualUnderMask

#define Mvc_CubeNBitEqualUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if ((((Cube1)->pData[_i_]) & ((Mask)->pData[_i_])) != (((Cube2)->pData[_i_]) & ((Mask)->pData[_i_])))\
{ Res = 0; break; }\
}

Definition at line 333 of file mvc.h.

333#define Mvc_CubeNBitEqualUnderMask( Res, Cube1, Cube2, Mask )\
334{\
335 int _i_; Res = 1;\
336 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
337 if ((((Cube1)->pData[_i_]) & ((Mask)->pData[_i_])) != (((Cube2)->pData[_i_]) & ((Mask)->pData[_i_])))\
338 { Res = 0; break; }\
339}

◆ Mvc_CubeNBitExor

#define Mvc_CubeNBitExor ( CubeR,
Cube1,
Cube2 )
Value:
{\
int _i_;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
(((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] ^ (Cube2)->pData[_i_]));\
}

Definition at line 220 of file mvc.h.

220#define Mvc_CubeNBitExor( CubeR, Cube1, Cube2 )\
221{\
222 int _i_;\
223 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
224 (((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] ^ (Cube2)->pData[_i_]));\
225}

◆ Mvc_CubeNBitFill

#define Mvc_CubeNBitFill ( Cube)
Value:
{\
int _i_;\
(Cube)->pData[(Cube)->iLast] = (BITS_FULL >> (Cube)->nUnused);\
for( _i_ = (Cube)->iLast - 1; _i_ >= 0; _i_-- )\
(Cube)->pData[_i_] = BITS_FULL;\
}

Definition at line 169 of file mvc.h.

169#define Mvc_CubeNBitFill( Cube )\
170{\
171 int _i_;\
172 (Cube)->pData[(Cube)->iLast] = (BITS_FULL >> (Cube)->nUnused);\
173 for( _i_ = (Cube)->iLast - 1; _i_ >= 0; _i_-- )\
174 (Cube)->pData[_i_] = BITS_FULL;\
175}

◆ Mvc_CubeNBitIntersectUnderMask

#define Mvc_CubeNBitIntersectUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
{\
int _i_; Res = 0;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Cube1)->pData[_i_]) & ((Cube2)->pData[_i_]) & ((Mask)->pData[_i_]))\
{ Res = 1; break; }\
}

Definition at line 359 of file mvc.h.

359#define Mvc_CubeNBitIntersectUnderMask( Res, Cube1, Cube2, Mask)\
360{\
361 int _i_; Res = 0;\
362 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
363 if (((Cube1)->pData[_i_]) & ((Cube2)->pData[_i_]) & ((Mask)->pData[_i_]))\
364 { Res = 1; break; }\
365}

◆ Mvc_CubeNBitLess

#define Mvc_CubeNBitLess ( Res,
Cube1,
Cube2 )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Cube1)->pData[_i_]) >= ((Cube2)->pData[_i_]))\
{ Res = 0; break; }\
}

Definition at line 281 of file mvc.h.

281#define Mvc_CubeNBitLess( Res, Cube1, Cube2 )\
282{\
283 int _i_; Res = 1;\
284 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
285 if (((Cube1)->pData[_i_]) >= ((Cube2)->pData[_i_]))\
286 { Res = 0; break; }\
287}

◆ Mvc_CubeNBitMore

#define Mvc_CubeNBitMore ( Res,
Cube1,
Cube2 )
Value:
{\
int _i_; Res = 1;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Cube1)->pData[_i_]) <= ((Cube2)->pData[_i_]))\
{ Res = 0; break; }\
}

Definition at line 294 of file mvc.h.

294#define Mvc_CubeNBitMore( Res, Cube1, Cube2 )\
295{\
296 int _i_; Res = 1;\
297 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
298 if (((Cube1)->pData[_i_]) <= ((Cube2)->pData[_i_]))\
299 { Res = 0; break; }\
300}

◆ Mvc_CubeNBitNot

#define Mvc_CubeNBitNot ( Cube)
Value:
{\
int _i_;\
(Cube)->pData[(Cube)->iLast] ^= (BITS_FULL >> (Cube)->nUnused);\
for( _i_ = (Cube)->iLast - 1; _i_ >= 0; _i_-- )\
(Cube)->pData[_i_] ^= BITS_FULL;\
}

Definition at line 183 of file mvc.h.

183#define Mvc_CubeNBitNot( Cube )\
184{\
185 int _i_;\
186 (Cube)->pData[(Cube)->iLast] ^= (BITS_FULL >> (Cube)->nUnused);\
187 for( _i_ = (Cube)->iLast - 1; _i_ >= 0; _i_-- )\
188 (Cube)->pData[_i_] ^= BITS_FULL;\
189}

◆ Mvc_CubeNBitNotImpl

#define Mvc_CubeNBitNotImpl ( Res,
Cube1,
Cube2 )
Value:
{\
int _i_; Res = 0;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Cube1)->pData[_i_]) & ~((Cube2)->pData[_i_]))\
{ Res = 1; break; }\
}

Definition at line 307 of file mvc.h.

307#define Mvc_CubeNBitNotImpl( Res, Cube1, Cube2 )\
308{\
309 int _i_; Res = 0;\
310 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
311 if (((Cube1)->pData[_i_]) & ~((Cube2)->pData[_i_]))\
312 { Res = 1; break; }\
313}

◆ Mvc_CubeNBitNotImplUnderMask

#define Mvc_CubeNBitNotImplUnderMask ( Res,
Cube1,
Cube2,
Mask )
Value:
{\
int _i_; Res = 0;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
if (((Mask)->pData[_i_]) & ((Cube1)->pData[_i_]) & ~((Cube2)->pData[_i_]))\
{ Res = 1; break; }\
}

Definition at line 372 of file mvc.h.

372#define Mvc_CubeNBitNotImplUnderMask( Res, Cube1, Cube2, Mask )\
373{\
374 int _i_; Res = 0;\
375 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
376 if (((Mask)->pData[_i_]) & ((Cube1)->pData[_i_]) & ~((Cube2)->pData[_i_]))\
377 { Res = 1; break; }\
378}

◆ Mvc_CubeNBitOr

#define Mvc_CubeNBitOr ( CubeR,
Cube1,
Cube2 )
Value:
{\
int _i_;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
(((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] | (Cube2)->pData[_i_]));\
}

Definition at line 208 of file mvc.h.

208#define Mvc_CubeNBitOr( CubeR, Cube1, Cube2 )\
209{\
210 int _i_;\
211 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
212 (((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] | (Cube2)->pData[_i_]));\
213}

◆ Mvc_CubeNBitSharp

#define Mvc_CubeNBitSharp ( CubeR,
Cube1,
Cube2 )
Value:
{\
int _i_;\
for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
(((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] & ~(Cube2)->pData[_i_]));\
}

Definition at line 244 of file mvc.h.

244#define Mvc_CubeNBitSharp( CubeR, Cube1, Cube2 )\
245{\
246 int _i_;\
247 for (_i_ = (Cube1)->iLast; _i_ >= 0; _i_--)\
248 (((CubeR)->pData[_i_]) = ((Cube1)->pData[_i_] & ~(Cube2)->pData[_i_]));\
249}

◆ Mvc_CubeNWords

#define Mvc_CubeNWords ( Cube)
Value:
((Cube)->iLast > 1)

Definition at line 133 of file mvc.h.

◆ Mvc_CubeReadLast

#define Mvc_CubeReadLast ( Cube)
Value:
((Cube)->iLast)

Definition at line 123 of file mvc.h.

◆ Mvc_CubeReadNext

#define Mvc_CubeReadNext ( Cube)
Value:
((Cube)->pNext)

MACRO DEFINITIONS ///.

Definition at line 121 of file mvc.h.

◆ Mvc_CubeReadNextP

#define Mvc_CubeReadNextP ( Cube)
Value:
(&(Cube)->pNext)

Definition at line 122 of file mvc.h.

◆ Mvc_CubeReadSize

#define Mvc_CubeReadSize ( Cube)
Value:
((Cube)->nOnes)

Definition at line 124 of file mvc.h.

◆ Mvc_CubeSetLast

#define Mvc_CubeSetLast ( Cube,
Last )
Value:
((Cube)->iLast = (Last))

Definition at line 127 of file mvc.h.

◆ Mvc_CubeSetNext

#define Mvc_CubeSetNext ( Cube,
Next )
Value:
((Cube)->pNext = (Next))

Definition at line 126 of file mvc.h.

◆ Mvc_CubeSetSize

#define Mvc_CubeSetSize ( Cube,
Size )
Value:
((Cube)->nOnes = (Size))

Definition at line 128 of file mvc.h.

◆ Mvc_CubeVarValue

#define Mvc_CubeVarValue ( Cube,
Var )
Value:
(((Cube)->pData[Mvc_CubeWhichWord(2*(Var))] >> (Mvc_CubeWhichBit(2*(Var)))) & ((Mvc_CubeWord_t)3))
int Var
Definition exorList.c:228

Definition at line 142 of file mvc.h.

◆ Mvc_CubeWhichBit

#define Mvc_CubeWhichBit ( Bit)
Value:
#define BITS_PER_WORD_MINUS
Definition mvc.h:42

Definition at line 136 of file mvc.h.

◆ Mvc_CubeWhichWord

#define Mvc_CubeWhichWord ( Bit)
Value:
#define BITS_PER_WORD_LOG
Definition mvc.h:43

Definition at line 135 of file mvc.h.

◆ Mvc_ListAddCubeHead

#define Mvc_ListAddCubeHead ( pList,
pCube )
Value:
{\
if ( pList->pHead == NULL )\
{\
Mvc_CubeSetNext( pCube, NULL );\
pList->pHead = pCube;\
pList->pTail = pCube;\
}\
else\
{\
Mvc_CubeSetNext( pCube, pList->pHead );\
pList->pHead = pCube;\
}\
pList->nItems++;\
}

Definition at line 456 of file mvc.h.

456#define Mvc_ListAddCubeHead( pList, pCube )\
457 {\
458 if ( pList->pHead == NULL )\
459 {\
460 Mvc_CubeSetNext( pCube, NULL );\
461 pList->pHead = pCube;\
462 pList->pTail = pCube;\
463 }\
464 else\
465 {\
466 Mvc_CubeSetNext( pCube, pList->pHead );\
467 pList->pHead = pCube;\
468 }\
469 pList->nItems++;\
470 }

◆ Mvc_ListAddCubeTail

#define Mvc_ListAddCubeTail ( pList,
pCube )
Value:
{\
if ( pList->pHead == NULL )\
pList->pHead = pCube;\
else\
Mvc_CubeSetNext( pList->pTail, pCube );\
pList->pTail = pCube;\
Mvc_CubeSetNext( pCube, NULL );\
pList->nItems++;\
}

Definition at line 471 of file mvc.h.

471#define Mvc_ListAddCubeTail( pList, pCube )\
472 {\
473 if ( pList->pHead == NULL )\
474 pList->pHead = pCube;\
475 else\
476 Mvc_CubeSetNext( pList->pTail, pCube );\
477 pList->pTail = pCube;\
478 Mvc_CubeSetNext( pCube, NULL );\
479 pList->nItems++;\
480 }

◆ Mvc_ListDeleteCube

#define Mvc_ListDeleteCube ( pList,
pPrev,
pCube )
Value:
{\
if ( pPrev == NULL )\
pList->pHead = pCube->pNext;\
else\
pPrev->pNext = pCube->pNext;\
if ( pList->pTail == pCube )\
{\
assert( pCube->pNext == NULL );\
pList->pTail = pPrev;\
}\
pList->nItems--;\
}

Definition at line 481 of file mvc.h.

481#define Mvc_ListDeleteCube( pList, pPrev, pCube )\
482{\
483 if ( pPrev == NULL )\
484 pList->pHead = pCube->pNext;\
485 else\
486 pPrev->pNext = pCube->pNext;\
487 if ( pList->pTail == pCube )\
488 {\
489 assert( pCube->pNext == NULL );\
490 pList->pTail = pPrev;\
491 }\
492 pList->nItems--;\
493}

◆ Mvc_ListForEachCube

#define Mvc_ListForEachCube ( List,
Cube )
Value:
for ( Cube = List->pHead;\
Cube;\
Cube = Cube->pNext )

Definition at line 518 of file mvc.h.

518#define Mvc_ListForEachCube( List, Cube )\
519 for ( Cube = List->pHead;\
520 Cube;\
521 Cube = Cube->pNext )

◆ Mvc_ListForEachCubeSafe

#define Mvc_ListForEachCubeSafe ( List,
Cube,
Cube2 )
Value:
for ( Cube = List->pHead, Cube2 = (Cube? Cube->pNext: NULL);\
Cube;\
Cube = Cube2, Cube2 = (Cube? Cube->pNext: NULL) )

Definition at line 522 of file mvc.h.

522#define Mvc_ListForEachCubeSafe( List, Cube, Cube2 )\
523 for ( Cube = List->pHead, Cube2 = (Cube? Cube->pNext: NULL);\
524 Cube;\
525 Cube = Cube2, Cube2 = (Cube? Cube->pNext: NULL) )

Typedef Documentation

◆ Mvc_Cover_t

typedef struct MvcCoverStruct Mvc_Cover_t

Definition at line 58 of file mvc.h.

◆ Mvc_Cube_t

typedef struct MvcCubeStruct Mvc_Cube_t

Definition at line 56 of file mvc.h.

◆ Mvc_CubeWord_t

typedef unsigned int Mvc_CubeWord_t

STRUCTURE DEFINITIONS ///.

Definition at line 55 of file mvc.h.

◆ Mvc_Data_t

typedef struct MvcDataStruct Mvc_Data_t

Definition at line 59 of file mvc.h.

◆ Mvc_List_t

typedef struct MvcListStruct Mvc_List_t

Definition at line 57 of file mvc.h.

◆ Mvc_Manager_t

Definition at line 60 of file mvc.h.

Function Documentation

◆ Mvc_CoverAddCubeHead_()

void Mvc_CoverAddCubeHead_ ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 121 of file mvcList.c.

122{
123 Mvc_List_t * pList = &pCover->lCubes;
124 if ( pList->pHead == NULL )
125 {
126 Mvc_CubeSetNext( pCube, NULL );
127 pList->pHead = pCube;
128 pList->pTail = pCube;
129 }
130 else
131 {
132 Mvc_CubeSetNext( pCube, pList->pHead );
133 pList->pHead = pCube;
134 }
135 pList->nItems++;
136}
#define Mvc_CubeSetNext(Cube, Next)
Definition mvc.h:126
Mvc_List_t lCubes
Definition mvc.h:88
Mvc_Cube_t * pHead
Definition mvc.h:77
Mvc_Cube_t * pTail
Definition mvc.h:78
int nItems
Definition mvc.h:79

◆ Mvc_CoverAddCubeTail_()

void Mvc_CoverAddCubeTail_ ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 149 of file mvcList.c.

150{
151 Mvc_List_t * pList = &pCover->lCubes;
152
153 if ( pList->pHead == NULL )
154 pList->pHead = pCube;
155 else
156 Mvc_CubeSetNext( pList->pTail, pCube );
157 pList->pTail = pCube;
158 Mvc_CubeSetNext( pCube, NULL );
159 pList->nItems++;
160}

◆ Mvc_CoverAddDupCubeHead()

void Mvc_CoverAddDupCubeHead ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 202 of file mvcList.c.

203{
204 Mvc_Cube_t * pCubeNew;
205 pCubeNew = Mvc_CubeAlloc( pCover );
206 Mvc_CubeBitCopy( pCubeNew, pCube );
207 Mvc_CoverAddCubeHead( pCover, pCubeNew );
208}
struct MvcCubeStruct Mvc_Cube_t
Definition mvc.h:56
Mvc_Cube_t * Mvc_CubeAlloc(Mvc_Cover_t *pCover)
DECLARATIONS ///.
Definition mvcCube.c:43
#define Mvc_CoverAddCubeHead(pCover, pCube)
Definition mvc.h:496
#define Mvc_CubeBitCopy(Cube1, Cube2)
Definition mvc.h:393
Here is the call graph for this function:

◆ Mvc_CoverAddDupCubeTail()

void Mvc_CoverAddDupCubeTail ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 221 of file mvcList.c.

222{
223 Mvc_Cube_t * pCubeNew;
224 // copy the cube as part of this cover
225 pCubeNew = Mvc_CubeAlloc( pCover );
226 Mvc_CubeBitCopy( pCubeNew, pCube );
227 // clean the last bits of the new cube
228// pCubeNew->pData[pCubeNew->iLast] &= (BITS_FULL >> pCubeNew->nUnused);
229 // add the cube at the end
230 Mvc_CoverAddCubeTail( pCover, pCubeNew );
231}
#define Mvc_CoverAddCubeTail(pCover, pCube)
Definition mvc.h:501
Here is the call graph for this function:

◆ Mvc_CoverAddLiteralsOfCube()

void Mvc_CoverAddLiteralsOfCube ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 245 of file mvcList.c.

246{
247// int iBit, Value;
248// assert( pCover->pLits );
249// Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
250// if ( Value )
251// pCover->pLits[iBit] += Value;
252}

◆ Mvc_CoverAlgebraicEqual()

int Mvc_CoverAlgebraicEqual ( Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 134 of file mvcOpAlg.c.

135{
136 Mvc_Cube_t * pCube1, * pCube2;
137 int fFound;
138 int CompResult;
139
140 // covers should be the same base
141 assert( pCover1->nBits == pCover2->nBits );
142 // iterate through the cubes
143 Mvc_CoverForEachCube( pCover1, pCube1 )
144 {
145 fFound = 0;
146 Mvc_CoverForEachCube( pCover2, pCube2 )
147 {
148 Mvc_CubeBitEqual( CompResult, pCube1, pCube2 );
149 if ( CompResult )
150 {
151 fFound = 1;
152 break;
153 }
154 }
155 if ( !fFound )
156 return 0;
157 }
158 return 1;
159}
#define Mvc_CoverForEachCube(Cover, Cube)
Definition mvc.h:528
#define Mvc_CubeBitEqual(Res, Cube1, Cube2)
Definition mvc.h:417
int nBits
Definition mvc.h:87
#define assert(ex)
Definition util_old.h:213

◆ Mvc_CoverAlgebraicMultiply()

Mvc_Cover_t * Mvc_CoverAlgebraicMultiply ( Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcOperAlg.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Miscellaneous operations on covers.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcOpAlg.c,v 1.4 2003/04/26 20:41:36 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Multiplies two disjoint-support covers.]

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcOpAlg.c.

44{
45 Mvc_Cover_t * pCover;
46 Mvc_Cube_t * pCube1, * pCube2, * pCube;
47 int CompResult;
48
49 // covers should be the same base
50 assert( pCover1->nBits == pCover2->nBits );
51 // make sure that supports do not overlap
52 Mvc_CoverAllocateMask( pCover1 );
53 Mvc_CoverAllocateMask( pCover2 );
54 Mvc_CoverSupport( pCover1, pCover1->pMask );
55 Mvc_CoverSupport( pCover2, pCover2->pMask );
56 // check if the cubes are bit-wise disjoint
57 Mvc_CubeBitDisjoint( CompResult, pCover1->pMask, pCover2->pMask );
58 if ( !CompResult )
59 printf( "Mvc_CoverMultiply(): Cover supports are not disjoint!\n" );
60
61 // iterate through the cubes
62 pCover = Mvc_CoverClone( pCover1 );
63 Mvc_CoverForEachCube( pCover1, pCube1 )
64 Mvc_CoverForEachCube( pCover2, pCube2 )
65 {
66 // create the product cube
67 pCube = Mvc_CubeAlloc( pCover );
68 // set the product cube equal to the product of the two cubes
69 Mvc_CubeBitOr( pCube, pCube1, pCube2 );
70 // add the cube to the cover
71 Mvc_CoverAddCubeTail( pCover, pCube );
72 }
73 return pCover;
74}
#define Mvc_CubeBitOr(CubeR, Cube1, Cube2)
Definition mvc.h:397
Mvc_Cover_t * Mvc_CoverClone(Mvc_Cover_t *pCover)
Definition mvcCover.c:79
void Mvc_CoverAllocateMask(Mvc_Cover_t *pCover)
Definition mvcCover.c:168
struct MvcCoverStruct Mvc_Cover_t
Definition mvc.h:58
void Mvc_CoverSupport(Mvc_Cover_t *pCover, Mvc_Cube_t *pSupp)
FUNCTION DEFINITIONS ///.
Definition mvcUtils.c:58
#define Mvc_CubeBitDisjoint(Res, Cube1, Cube2)
Definition mvc.h:433
Mvc_Cube_t * pMask
Definition mvc.h:92
Here is the call graph for this function:

◆ Mvc_CoverAlgebraicSubtract()

Mvc_Cover_t * Mvc_CoverAlgebraicSubtract ( Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

Function*************************************************************

Synopsis [Subtracts the second cover from the first.]

Description []

SideEffects []

SeeAlso []

Definition at line 88 of file mvcOpAlg.c.

89{
90 Mvc_Cover_t * pCover;
91 Mvc_Cube_t * pCube1, * pCube2, * pCube;
92 int fFound;
93 int CompResult;
94
95 // covers should be the same base
96 assert( pCover1->nBits == pCover2->nBits );
97
98 // iterate through the cubes
99 pCover = Mvc_CoverClone( pCover1 );
100 Mvc_CoverForEachCube( pCover1, pCube1 )
101 {
102 fFound = 0;
103 Mvc_CoverForEachCube( pCover2, pCube2 )
104 {
105 Mvc_CubeBitEqual( CompResult, pCube1, pCube2 );
106 if ( CompResult )
107 {
108 fFound = 1;
109 break;
110 }
111 }
112 if ( !fFound )
113 {
114 // create the copy of the cube
115 pCube = Mvc_CubeDup( pCover, pCube1 );
116 // add the cube copy to the cover
117 Mvc_CoverAddCubeTail( pCover, pCube );
118 }
119 }
120 return pCover;
121}
Mvc_Cube_t * Mvc_CubeDup(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition mvcCube.c:94
Here is the call graph for this function:

◆ Mvc_CoverAlloc()

Mvc_Cover_t * Mvc_CoverAlloc ( Mvc_Manager_t * pMem,
int nBits )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcCover.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Basic procedures to manipulate unate cube covers.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcCover.c,v 1.5 2003/04/09 18:02:05 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcCover.c.

44{
45 Mvc_Cover_t * p;
46 int nBitsInUnsigned;
47
48 nBitsInUnsigned = 8 * sizeof(Mvc_CubeWord_t);
49#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
50 p = (Mvc_Cover_t *)ABC_ALLOC( char, sizeof(Mvc_Cover_t) );
51#else
53#endif
54 p->pMem = pMem;
55 p->nBits = nBits;
56 p->nWords = nBits / nBitsInUnsigned + (int)(nBits % nBitsInUnsigned > 0);
57 p->nUnused = p->nWords * nBitsInUnsigned - p->nBits;
58 p->lCubes.nItems = 0;
59 p->lCubes.pHead = NULL;
60 p->lCubes.pTail = NULL;
61 p->nCubesAlloc = 0;
62 p->pCubes = NULL;
63 p->pMask = NULL;
64 p->pLits = NULL;
65 return p;
66}
Cube * p
Definition exorList.c:222
char * Extra_MmFixedEntryFetch(Extra_MmFixed_t *p)
Extra_MmFixed_t * pManC
Definition mvc.h:110
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverAllocateArrayCubes()

void Mvc_CoverAllocateArrayCubes ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 202 of file mvcCover.c.

203{
204 if ( pCover->nCubesAlloc < pCover->lCubes.nItems )
205 {
206 if ( pCover->nCubesAlloc > 0 )
207 MEM_FREE( pCover->pMem, Mvc_Cube_t *, pCover->nCubesAlloc, pCover->pCubes );
208 pCover->nCubesAlloc = pCover->lCubes.nItems;
209 pCover->pCubes = MEM_ALLOC( pCover->pMem, Mvc_Cube_t *, pCover->nCubesAlloc );
210 }
211}
#define MEM_FREE(Manager, Type, Size, Pointer)
Definition mvc.h:568
#define MEM_ALLOC(Manager, Type, Size)
Definition mvc.h:567
int nCubesAlloc
Definition mvc.h:90
Mvc_Cube_t ** pCubes
Definition mvc.h:89
Mvc_Manager_t * pMem
Definition mvc.h:93
Here is the caller graph for this function:

◆ Mvc_CoverAllocateArrayLits()

void Mvc_CoverAllocateArrayLits ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 185 of file mvcCover.c.

186{
187 if ( pCover->pLits == NULL )
188 pCover->pLits = MEM_ALLOC( pCover->pMem, int, pCover->nBits );
189}
int * pLits
Definition mvc.h:91

◆ Mvc_CoverAllocateMask()

void Mvc_CoverAllocateMask ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 168 of file mvcCover.c.

169{
170 if ( pCover->pMask == NULL )
171 pCover->pMask = Mvc_CubeAlloc( pCover );
172}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverAnyLiteral()

int Mvc_CoverAnyLiteral ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pMask )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcLits.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Literal counting/updating procedures.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcLits.c,v 1.4 2003/04/03 06:31:50 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Find the any literal that occurs more than once.]

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcLits.c.

44{
45 Mvc_Cube_t * pCube;
46 int nWord, nBit, i;
47 int nLitsCur;
48 int fUseFirst = 0;
49
50 // go through each literal
51 if ( fUseFirst )
52 {
53 for ( i = 0; i < pCover->nBits; i++ )
54 if ( !pMask || Mvc_CubeBitValue(pMask,i) )
55 {
56 // get the word and bit of this literal
57 nWord = Mvc_CubeWhichWord(i);
58 nBit = Mvc_CubeWhichBit(i);
59 // go through all the cubes
60 nLitsCur = 0;
61 Mvc_CoverForEachCube( pCover, pCube )
62 if ( pCube->pData[nWord] & (1<<nBit) )
63 {
64 nLitsCur++;
65 if ( nLitsCur > 1 )
66 return i;
67 }
68 }
69 }
70 else
71 {
72 for ( i = pCover->nBits - 1; i >=0; i-- )
73 if ( !pMask || Mvc_CubeBitValue(pMask,i) )
74 {
75 // get the word and bit of this literal
76 nWord = Mvc_CubeWhichWord(i);
77 nBit = Mvc_CubeWhichBit(i);
78 // go through all the cubes
79 nLitsCur = 0;
80 Mvc_CoverForEachCube( pCover, pCube )
81 if ( pCube->pData[nWord] & (1<<nBit) )
82 {
83 nLitsCur++;
84 if ( nLitsCur > 1 )
85 return i;
86 }
87 }
88 }
89 return -1;
90}
Mvc_CubeWord_t pData[1]
Definition mvc.h:71
Here is the caller graph for this function:

◆ Mvc_CoverAppendCubes()

void Mvc_CoverAppendCubes ( Mvc_Cover_t * pC1,
Mvc_Cover_t * pC2 )
extern

◆ Mvc_CoverArray2List()

void Mvc_CoverArray2List ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Transfers the cubes from the array into list.]

Description []

SideEffects []

SeeAlso []

Definition at line 310 of file mvcList.c.

311{
312 Mvc_Cube_t * pCube;
313 int nCubes, i;
314
315 assert( pCover->pCubes );
316
317 nCubes = Mvc_CoverReadCubeNum(pCover);
318 if ( nCubes == 0 )
319 return;
320 if ( nCubes == 1 )
321 {
322 pCube = pCover->pCubes[0];
323 pCube->pNext = NULL;
324 pCover->lCubes.pHead = pCover->lCubes.pTail = pCube;
325 return;
326 }
327 // set up the first cube
328 pCube = pCover->pCubes[0];
329 pCover->lCubes.pHead = pCube;
330 // set up the last cube
331 pCube = pCover->pCubes[nCubes-1];
332 pCube->pNext = NULL;
333 pCover->lCubes.pTail = pCube;
334
335 // link all cubes starting from the first one
336 for ( i = 0; i < nCubes - 1; i++ )
337 pCover->pCubes[i]->pNext = pCover->pCubes[i+1];
338}
int Mvc_CoverReadCubeNum(Mvc_Cover_t *pCover)
Definition mvcApi.c:45
Mvc_Cube_t * pNext
Definition mvc.h:65
Here is the call graph for this function:

◆ Mvc_CoverBestLiteral()

int Mvc_CoverBestLiteral ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pMask )
extern

Function*************************************************************

Synopsis [Find the most often occurring literal.]

Description [Find the most often occurring literal among those that occur more than once.]

SideEffects []

SeeAlso []

Definition at line 104 of file mvcLits.c.

105{
106 Mvc_Cube_t * pCube;
107 int nWord, nBit;
108 int i, iMax, nLitsMax, nLitsCur;
109 int fUseFirst = 1;
110
111 // go through each literal
112 iMax = -1;
113 nLitsMax = -1;
114 for ( i = 0; i < pCover->nBits; i++ )
115 if ( !pMask || Mvc_CubeBitValue(pMask,i) )
116 {
117 // get the word and bit of this literal
118 nWord = Mvc_CubeWhichWord(i);
119 nBit = Mvc_CubeWhichBit(i);
120 // go through all the cubes
121 nLitsCur = 0;
122 Mvc_CoverForEachCube( pCover, pCube )
123 if ( pCube->pData[nWord] & (1<<nBit) )
124 nLitsCur++;
125
126 // check if this is the best literal
127 if ( fUseFirst )
128 {
129 if ( nLitsMax < nLitsCur )
130 {
131 nLitsMax = nLitsCur;
132 iMax = i;
133 }
134 }
135 else
136 {
137 if ( nLitsMax <= nLitsCur )
138 {
139 nLitsMax = nLitsCur;
140 iMax = i;
141 }
142 }
143 }
144
145 if ( nLitsMax > 1 )
146 return iMax;
147 return -1;
148}
Here is the caller graph for this function:

◆ Mvc_CoverBestLiteralCover()

Mvc_Cover_t * Mvc_CoverBestLiteralCover ( Mvc_Cover_t * pCover,
Mvc_Cover_t * pSimple )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 223 of file mvcLits.c.

224{
225 Mvc_Cover_t * pCoverNew;
226 Mvc_Cube_t * pCubeNew;
227 Mvc_Cube_t * pCubeS;
228 int iLitBest;
229
230 // create the new cover
231 pCoverNew = Mvc_CoverClone( pCover );
232 // get the new cube
233 pCubeNew = Mvc_CubeAlloc( pCoverNew );
234 // clean the cube
235 Mvc_CubeBitClean( pCubeNew );
236
237 // get the first cube of pSimple
238 assert( Mvc_CoverReadCubeNum(pSimple) == 1 );
239 pCubeS = Mvc_CoverReadCubeHead( pSimple );
240 // find the best literal among those of pCubeS
241 iLitBest = Mvc_CoverBestLiteral( pCover, pCubeS );
242
243 // insert this literal into the cube
244 Mvc_CubeBitInsert( pCubeNew, iLitBest );
245 // add the cube to the cover
246 Mvc_CoverAddCubeTail( pCoverNew, pCubeNew );
247 return pCoverNew;
248}
int Mvc_CoverBestLiteral(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
Definition mvcLits.c:104
#define Mvc_CubeBitClean(Cube)
Definition mvc.h:381
Mvc_Cube_t * Mvc_CoverReadCubeHead(Mvc_Cover_t *pCover)
Definition mvcApi.c:46
#define Mvc_CubeBitInsert(Cube, Bit)
Definition mvc.h:139
Here is the call graph for this function:

◆ Mvc_CoverBooleanAnd()

Mvc_Cover_t * Mvc_CoverBooleanAnd ( Mvc_Data_t * p,
Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

◆ Mvc_CoverBooleanEqual()

int Mvc_CoverBooleanEqual ( Mvc_Data_t * p,
Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

◆ Mvc_CoverBooleanOr()

Mvc_Cover_t * Mvc_CoverBooleanOr ( Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcProc.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Various boolean procedures working with covers.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcOpBool.c,v 1.4 2003/04/16 01:55:37 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcOpBool.c.

44{
45 Mvc_Cover_t * pCover;
46 Mvc_Cube_t * pCube, * pCubeCopy;
47 // make sure the covers are compatible
48 assert( pCover1->nBits == pCover2->nBits );
49 // clone the cover
50 pCover = Mvc_CoverClone( pCover1 );
51 // create the cubes by making pair-wise products
52 // of cubes in pCover1 and pCover2
53 Mvc_CoverForEachCube( pCover1, pCube )
54 {
55 pCubeCopy = Mvc_CubeDup( pCover, pCube );
56 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
57 }
58 Mvc_CoverForEachCube( pCover2, pCube )
59 {
60 pCubeCopy = Mvc_CubeDup( pCover, pCube );
61 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
62 }
63 return pCover;
64}
Here is the call graph for this function:

◆ Mvc_CoverCheckSuppContainment()

int Mvc_CoverCheckSuppContainment ( Mvc_Cover_t * pCover1,
Mvc_Cover_t * pCover2 )
extern

Function*************************************************************

Synopsis [Returns 1 if the support of cover2 is contained in the support of cover1.]

Description []

SideEffects []

SeeAlso []

Definition at line 247 of file mvcUtils.c.

248{
249 int Result;
250 assert( pCover1->nBits == pCover2->nBits );
251 // set the supports
252 Mvc_CoverAllocateMask( pCover1 );
253 Mvc_CoverSupport( pCover1, pCover1->pMask );
254 Mvc_CoverAllocateMask( pCover2 );
255 Mvc_CoverSupport( pCover2, pCover2->pMask );
256 // check the containment
257 Mvc_CubeBitNotImpl( Result, pCover2->pMask, pCover1->pMask );
258 return !Result;
259}
void Mvc_CoverSupport(Mvc_Cover_t *pCover, Mvc_Cube_t *pSupp)
FUNCTION DEFINITIONS ///.
Definition mvcUtils.c:58
#define Mvc_CubeBitNotImpl(Res, Cube1, Cube2)
Definition mvc.h:429
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverClone()

Mvc_Cover_t * Mvc_CoverClone ( Mvc_Cover_t * p)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 79 of file mvcCover.c.

80{
81 Mvc_Cover_t * pCover;
82#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
83 pCover = (Mvc_Cover_t *)ABC_ALLOC( char, sizeof(Mvc_Cover_t) );
84#else
85 pCover = (Mvc_Cover_t *)Extra_MmFixedEntryFetch( p->pMem->pManC );
86#endif
87 pCover->pMem = p->pMem;
88 pCover->nBits = p->nBits;
89 pCover->nWords = p->nWords;
90 pCover->nUnused = p->nUnused;
91 pCover->lCubes.nItems = 0;
92 pCover->lCubes.pHead = NULL;
93 pCover->lCubes.pTail = NULL;
94 pCover->nCubesAlloc = 0;
95 pCover->pCubes = NULL;
96 pCover->pMask = NULL;
97 pCover->pLits = NULL;
98 return pCover;
99}
int nWords
Definition mvc.h:85
int nUnused
Definition mvc.h:86
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverCofactor()

Mvc_Cover_t * Mvc_CoverCofactor ( Mvc_Cover_t * p,
int iValue,
int iValueOther )
extern

Function*************************************************************

Synopsis [Returns the cofactor w.r.t. to a binary var.]

Description []

SideEffects []

SeeAlso []

Definition at line 522 of file mvcUtils.c.

523{
524 Mvc_Cover_t * pCover;
525 Mvc_Cube_t * pCube, * pCubeCopy;
526 // clone the cover
527 pCover = Mvc_CoverClone( p );
528 // copy the cube list
529 Mvc_CoverForEachCube( p, pCube )
530 if ( Mvc_CubeBitValue( pCube, iValue ) )
531 {
532 pCubeCopy = Mvc_CubeDup( pCover, pCube );
533 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
534 Mvc_CubeBitInsert( pCubeCopy, iValueOther );
535 }
536 return pCover;
537}
Here is the call graph for this function:

◆ Mvc_CoverCofactors()

Mvc_Cover_t ** Mvc_CoverCofactors ( Mvc_Data_t * pData,
Mvc_Cover_t * pCover,
int iVar )
extern

◆ Mvc_CoverCommonCube()

void Mvc_CoverCommonCube ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pComCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 155 of file mvcUtils.c.

156{
157 Mvc_Cube_t * pCube;
158 // clean the support
159 Mvc_CubeBitFill( pComCube );
160 // collect the support
161 Mvc_CoverForEachCube( pCover, pCube )
162 Mvc_CubeBitAnd( pComCube, pComCube, pCube );
163}
#define Mvc_CubeBitAnd(CubeR, Cube1, Cube2)
Definition mvc.h:405
#define Mvc_CubeBitFill(Cube)
Definition mvc.h:385
Here is the caller graph for this function:

◆ Mvc_CoverCommonCubeCover()

Mvc_Cover_t * Mvc_CoverCommonCubeCover ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 220 of file mvcUtils.c.

221{
222 Mvc_Cover_t * pRes;
223 Mvc_Cube_t * pCube;
224 // create the new cover
225 pRes = Mvc_CoverClone( pCover );
226 // get the new cube
227 pCube = Mvc_CubeAlloc( pRes );
228 // get the common cube
229 Mvc_CoverCommonCube( pCover, pCube );
230 // add the cube to the cover
231 Mvc_CoverAddCubeTail( pRes, pCube );
232 return pRes;
233}
void Mvc_CoverCommonCube(Mvc_Cover_t *pCover, Mvc_Cube_t *pComCube)
Definition mvcUtils.c:155
Here is the call graph for this function:

◆ Mvc_CoverComplement()

Mvc_Cover_t * Mvc_CoverComplement ( Mvc_Data_t * p,
Mvc_Cover_t * pCover )
extern

◆ Mvc_CoverContain()

int Mvc_CoverContain ( Mvc_Cover_t * pCover)
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Removes the contained cubes.]

Description [Returns 1 if the cover has been changed.]

SideEffects []

SeeAlso []

Definition at line 47 of file mvcContain.c.

48{
49 int nCubes;
50 nCubes = Mvc_CoverReadCubeNum( pCover );
51 if ( nCubes < 2 )
52 return 0;
55 Mvc_CoverRemoveDuplicates( pCover );
56 if ( nCubes > 1 )
57 Mvc_CoverRemoveContained( pCover );
58 return (nCubes != Mvc_CoverReadCubeNum(pCover));
59}
void Mvc_CoverSort(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask, int(*pCompareFunc)(Mvc_Cube_t *, Mvc_Cube_t *, Mvc_Cube_t *))
FuNCTION DEFINITIONS ///.
Definition mvcSort.c:47
int Mvc_CubeCompareSizeAndInt(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
Definition mvcCompare.c:91
int Mvc_CoverSetCubeSizes(Mvc_Cover_t *pCover)
Definition mvcUtils.c:272
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverCopyAndAppendCubes()

void Mvc_CoverCopyAndAppendCubes ( Mvc_Cover_t * pC1,
Mvc_Cover_t * pC2 )
extern

◆ Mvc_CoverCountCubePairDiffs()

int Mvc_CoverCountCubePairDiffs ( Mvc_Cover_t * pCover,
unsigned char pDiffs[] )
extern

Function*************************************************************

Synopsis [Counts the cube sizes.]

Description [This procedure works incorrectly on big-endian machines.]

SideEffects []

SeeAlso [] Function*************************************************************

Synopsis [Counts the differences in each cube pair in the cover.]

Description [Takes the cover (pCover) and the array where the diff counters go (pDiffs). The array pDiffs should have as many entries as there are different pairs of cubes in the cover: n(n-1)/2. Fills out the array pDiffs with the following info: For each cube pair, included in the array is the number of literals in both cubes after they are made cube ABC_FREE.]

SideEffects []

SeeAlso []

Definition at line 345 of file mvcUtils.c.

346{
347 Mvc_Cube_t * pCube1;
348 Mvc_Cube_t * pCube2;
349 Mvc_Cube_t * pMask;
350 unsigned char * pByte, * pByteStart, * pByteStop;
351 int nBytes, nOnes;
352 int nCubePairs;
353
354 // allocate a temporary mask
355 pMask = Mvc_CubeAlloc( pCover );
356 // get the number of unsigned chars in the cube's bit strings
357// nBytes = pCover->nBits / (8 * sizeof(unsigned char)) + (int)(pCover->nBits % (8 * sizeof(unsigned char)) > 0);
358 nBytes = sizeof(Mvc_CubeWord_t) * pCover->nWords; // big-endian issue
359 // iterate through the cubes
360 nCubePairs = 0;
361 Mvc_CoverForEachCube( pCover, pCube1 )
362 {
364 {
365 // find the bit-wise exor of cubes
366 Mvc_CubeBitExor( pMask, pCube1, pCube2 );
367 // set the starting and stopping positions
368 pByteStart = (unsigned char *)pMask->pData;
369 pByteStop = pByteStart + nBytes;
370 // clean the counter of ones
371 nOnes = 0;
372 // iterate through the positions
373 for ( pByte = pByteStart; pByte < pByteStop; pByte++ )
374 nOnes += bit_count[*pByte];
375 // set the nOnes
376 pDiffs[nCubePairs++] = nOnes;
377 }
378 }
379 // deallocate the mask
380 Mvc_CubeFree( pCover, pMask );
381 return 1;
382}
#define Mvc_CubeBitExor(CubeR, Cube1, Cube2)
Definition mvc.h:401
#define Mvc_CubeReadNext(Cube)
MACRO DEFINITIONS ///.
Definition mvc.h:121
void Mvc_CubeFree(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition mvcCube.c:114
#define Mvc_CoverForEachCubeStart(Start, Cube)
Definition mvc.h:542
Here is the call graph for this function:

◆ Mvc_CoverCountLiterals()

int Mvc_CoverCountLiterals ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Returns the number of literals in the cover.]

Description [Allocates storage for literal counters and fills it up using the current information.]

SideEffects []

SeeAlso []

Definition at line 287 of file mvcLits.c.

288{
289 Mvc_Cube_t * pCube;
290 int nWord, nBit;
291 int i, CounterTot, CounterCur;
292
293 // allocate/clean the storage for literals
294// Mvc_CoverAllocateArrayLits( pCover );
295// memset( pCover->pLits, 0, pCover->nBits * sizeof(int) );
296 // go through each literal
297 CounterTot = 0;
298 for ( i = 0; i < pCover->nBits; i++ )
299 {
300 // get the word and bit of this literal
301 nWord = Mvc_CubeWhichWord(i);
302 nBit = Mvc_CubeWhichBit(i);
303 // go through all the cubes
304 CounterCur = 0;
305 Mvc_CoverForEachCube( pCover, pCube )
306 if ( pCube->pData[nWord] & (1<<nBit) )
307 CounterCur++;
308 CounterTot += CounterCur;
309 }
310 return CounterTot;
311}

◆ Mvc_CoverCreateConst()

Mvc_Cover_t * Mvc_CoverCreateConst ( Mvc_Manager_t * pMem,
int nBits,
int Phase )
extern

◆ Mvc_CoverCreateEmpty()

Mvc_Cover_t * Mvc_CoverCreateEmpty ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 202 of file mvcApi.c.

203{
204 Mvc_Cover_t * pCoverNew;
205 pCoverNew = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
206 return pCoverNew;
207}
Mvc_Cover_t * Mvc_CoverAlloc(Mvc_Manager_t *pMem, int nBits)
DECLARATIONS ///.
Definition mvcCover.c:43
Here is the call graph for this function:

◆ Mvc_CoverCreateTautology()

Mvc_Cover_t * Mvc_CoverCreateTautology ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 220 of file mvcApi.c.

221{
222 Mvc_Cube_t * pCubeNew;
223 Mvc_Cover_t * pCoverNew;
224 pCoverNew = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
225 pCubeNew = Mvc_CubeAlloc( pCoverNew );
226 Mvc_CubeBitFill( pCubeNew );
227 Mvc_CoverAddCubeTail( pCoverNew, pCubeNew );
228 return pCoverNew;
229}
Here is the call graph for this function:

◆ Mvc_CoverDeallocateArrayLits()

void Mvc_CoverDeallocateArrayLits ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 241 of file mvcCover.c.

242{
243 if ( pCover->pLits )
244 {
245 MEM_FREE( pCover->pMem, int, pCover->nBits, pCover->pLits );
246 pCover->pLits = NULL;
247 }
248}

◆ Mvc_CoverDeallocateMask()

void Mvc_CoverDeallocateMask ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 224 of file mvcCover.c.

225{
226 Mvc_CubeFree( pCover, pCover->pMask );
227 pCover->pMask = NULL;
228}
Here is the call graph for this function:

◆ Mvc_CoverDeleteCube_()

void Mvc_CoverDeleteCube_ ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pPrev,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 173 of file mvcList.c.

174{
175 Mvc_List_t * pList = &pCover->lCubes;
176
177 if ( pPrev == NULL ) // deleting the head cube
178 pList->pHead = Mvc_CubeReadNext(pCube);
179 else
180 pPrev->pNext = pCube->pNext;
181 if ( pList->pTail == pCube ) // deleting the tail cube
182 {
183 assert( Mvc_CubeReadNext(pCube) == NULL );
184 pList->pTail = pPrev;
185 }
186 pList->nItems--;
187}

◆ Mvc_CoverDeleteLiteralsOfCube()

void Mvc_CoverDeleteLiteralsOfCube ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 265 of file mvcList.c.

266{
267// int iBit, Value;
268// assert( pCover->pLits );
269// Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
270// if ( Value )
271// pCover->pLits[iBit] -= Value;
272}

◆ Mvc_CoverDist0Cubes()

int Mvc_CoverDist0Cubes ( Mvc_Data_t * pData,
Mvc_Cube_t * pA,
Mvc_Cube_t * pB )
extern

◆ Mvc_CoverDist1Merge()

void Mvc_CoverDist1Merge ( Mvc_Data_t * p,
Mvc_Cover_t * pCover )
extern

◆ Mvc_CoverDivide()

void Mvc_CoverDivide ( Mvc_Cover_t * pCover,
Mvc_Cover_t * pDiv,
Mvc_Cover_t ** ppQuo,
Mvc_Cover_t ** ppRem )
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file mvcDivide.c.

48{
49 // check the number of cubes
50 if ( Mvc_CoverReadCubeNum( pCover ) < Mvc_CoverReadCubeNum( pDiv ) )
51 {
52 *ppQuo = NULL;
53 *ppRem = NULL;
54 return;
55 }
56
57 // make sure that support of pCover contains that of pDiv
58 if ( !Mvc_CoverCheckSuppContainment( pCover, pDiv ) )
59 {
60 *ppQuo = NULL;
61 *ppRem = NULL;
62 return;
63 }
64
65 // perform the general division
66 Mvc_CoverDivideInternal( pCover, pDiv, ppQuo, ppRem );
67}
void Mvc_CoverDivideInternal(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
Definition mvcDivide.c:81
int Mvc_CoverCheckSuppContainment(Mvc_Cover_t *pCover1, Mvc_Cover_t *pCover2)
Definition mvcUtils.c:247
Here is the call graph for this function:

◆ Mvc_CoverDivideByCube()

void Mvc_CoverDivideByCube ( Mvc_Cover_t * pCover,
Mvc_Cover_t * pDiv,
Mvc_Cover_t ** ppQuo,
Mvc_Cover_t ** ppRem )
extern

Function*************************************************************

Synopsis [Divides the cover by a cube.]

Description []

SideEffects []

SeeAlso []

Definition at line 269 of file mvcDivide.c.

270{
271 Mvc_Cover_t * pQuo, * pRem;
272 Mvc_Cube_t * pCubeC, * pCubeD, * pCubeCopy;
273 int CompResult;
274
275 // get the only cube of D
276 assert( Mvc_CoverReadCubeNum(pDiv) == 1 );
277
278 // start the quotient and the remainder
279 pQuo = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
280 pRem = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
281
282 // get the first and only cube of the divisor
283 pCubeD = Mvc_CoverReadCubeHead( pDiv );
284
285 // iterate through the cubes in the cover
286 Mvc_CoverForEachCube( pCover, pCubeC )
287 {
288 // check the containment of literals from pCubeD in pCube
289 Mvc_Cube2BitNotImpl( CompResult, pCubeD, pCubeC );
290 if ( !CompResult )
291 { // this cube belongs to the quotient
292 // alloc the cube
293 pCubeCopy = Mvc_CubeAlloc( pQuo );
294 // clean the support of D
295 Mvc_CubeBitSharp( pCubeCopy, pCubeC, pCubeD );
296 // add the cube to the quotient
297 Mvc_CoverAddCubeTail( pQuo, pCubeCopy );
298 }
299 else
300 {
301 // copy the cube
302 pCubeCopy = Mvc_CubeDup( pRem, pCubeC );
303 // add the cube to the remainder
304 Mvc_CoverAddCubeTail( pRem, pCubeCopy );
305 }
306 }
307 // return the results
308 *ppRem = pRem;
309 *ppQuo = pQuo;
310}
#define Mvc_CubeBitSharp(CubeR, Cube1, Cube2)
Definition mvc.h:409
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverDivideByLiteral()

void Mvc_CoverDivideByLiteral ( Mvc_Cover_t * pCover,
Mvc_Cover_t * pDiv,
Mvc_Cover_t ** ppQuo,
Mvc_Cover_t ** ppRem )
extern

Function*************************************************************

Synopsis [Divides the cover by a literal.]

Description []

SideEffects []

SeeAlso []

Definition at line 323 of file mvcDivide.c.

324{
325 Mvc_Cover_t * pQuo, * pRem;
326 Mvc_Cube_t * pCubeC, * pCubeCopy;
327 int iLit;
328
329 // get the only cube of D
330 assert( Mvc_CoverReadCubeNum(pDiv) == 1 );
331
332 // start the quotient and the remainder
333 pQuo = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
334 pRem = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
335
336 // get the first and only literal in the divisor cube
337 iLit = Mvc_CoverFirstCubeFirstLit( pDiv );
338
339 // iterate through the cubes in the cover
340 Mvc_CoverForEachCube( pCover, pCubeC )
341 {
342 // copy the cube
343 pCubeCopy = Mvc_CubeDup( pCover, pCubeC );
344 // add the cube to the quotient or to the remainder depending on the literal
345 if ( Mvc_CubeBitValue( pCubeCopy, iLit ) )
346 { // remove the literal
347 Mvc_CubeBitRemove( pCubeCopy, iLit );
348 // add the cube ot the quotient
349 Mvc_CoverAddCubeTail( pQuo, pCubeCopy );
350 }
351 else
352 { // add the cube ot the remainder
353 Mvc_CoverAddCubeTail( pRem, pCubeCopy );
354 }
355 }
356 // return the results
357 *ppRem = pRem;
358 *ppQuo = pQuo;
359}
#define Mvc_CubeBitRemove(Cube, Bit)
Definition mvc.h:140
int Mvc_CoverFirstCubeFirstLit(Mvc_Cover_t *pCover)
Definition mvcLits.c:261
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverDivideByLiteralQuo()

void Mvc_CoverDivideByLiteralQuo ( Mvc_Cover_t * pCover,
int iLit )
extern

Function*************************************************************

Synopsis [Derives the quotient of division by literal.]

Description [Reduces the cover to be the equal to the result of division of the given cover by the literal.]

SideEffects []

SeeAlso []

Definition at line 374 of file mvcDivide.c.

375{
376 Mvc_Cube_t * pCube, * pCube2, * pPrev;
377 // delete those cubes that do not have this literal
378 // remove this literal from other cubes
379 pPrev = NULL;
380 Mvc_CoverForEachCubeSafe( pCover, pCube, pCube2 )
381 {
382 if ( Mvc_CubeBitValue( pCube, iLit ) == 0 )
383 { // delete the cube from the cover
384 Mvc_CoverDeleteCube( pCover, pPrev, pCube );
385 Mvc_CubeFree( pCover, pCube );
386 // don't update the previous cube
387 }
388 else
389 { // delete this literal from the cube
390 Mvc_CubeBitRemove( pCube, iLit );
391 // update the previous cube
392 pPrev = pCube;
393 }
394 }
395}
#define Mvc_CoverForEachCubeSafe(Cover, Cube, Cube2)
Definition mvc.h:536
#define Mvc_CoverDeleteCube(pCover, pPrev, pCube)
Definition mvc.h:506
Here is the call graph for this function:

◆ Mvc_CoverDivideInternal()

void Mvc_CoverDivideInternal ( Mvc_Cover_t * pCover,
Mvc_Cover_t * pDiv,
Mvc_Cover_t ** ppQuo,
Mvc_Cover_t ** ppRem )
extern

Function*************************************************************

Synopsis [Merge the cubes inside the groups.]

Description []

SideEffects []

SeeAlso []

Definition at line 81 of file mvcDivide.c.

82{
83 Mvc_Cover_t * pQuo, * pRem;
84 Mvc_Cube_t * pCubeC, * pCubeD, * pCubeCopy;
85 Mvc_Cube_t * pCube1, * pCube2;
86 int * pGroups, nGroups; // the cube groups
87 int nCubesC, nCubesD, nMerges, iCubeC, iCubeD;
88 int iMerge = -1; // Suppress "might be used uninitialized"
89 int fSkipG, GroupSize, g, c, RetValue;
90 int nCubes;
91
92 // get cover sizes
93 nCubesD = Mvc_CoverReadCubeNum( pDiv );
94 nCubesC = Mvc_CoverReadCubeNum( pCover );
95
96 // check trivial cases
97 if ( nCubesD == 1 )
98 {
99 if ( Mvc_CoverIsOneLiteral( pDiv ) )
100 Mvc_CoverDivideByLiteral( pCover, pDiv, ppQuo, ppRem );
101 else
102 Mvc_CoverDivideByCube( pCover, pDiv, ppQuo, ppRem );
103 return;
104 }
105
106 // create the divisor and the remainder
107 pQuo = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
108 pRem = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
109
110 // get the support of the divisor
111 Mvc_CoverAllocateMask( pDiv );
112 Mvc_CoverSupport( pDiv, pDiv->pMask );
113
114 // sort the cubes of the divisor
115 Mvc_CoverSort( pDiv, NULL, Mvc_CubeCompareInt );
116 // sort the cubes of the cover
118
119 // allocate storage for cube groups
120 pGroups = MEM_ALLOC( pCover->pMem, int, nCubesC + 1 );
121
122 // mask contains variables in the support of Div
123 // split the cubes into groups using the mask
124 Mvc_CoverList2Array( pCover );
125 Mvc_CoverList2Array( pDiv );
126 pGroups[0] = 0;
127 nGroups = 1;
128 for ( c = 1; c < nCubesC; c++ )
129 {
130 // get the cubes
131 pCube1 = pCover->pCubes[c-1];
132 pCube2 = pCover->pCubes[c ];
133 // compare the cubes
134 Mvc_CubeBitEqualOutsideMask( RetValue, pCube1, pCube2, pDiv->pMask );
135 if ( !RetValue )
136 pGroups[nGroups++] = c;
137 }
138 // finish off the last group
139 pGroups[nGroups] = nCubesC;
140
141 // consider each group separately and decide
142 // whether it can produce a quotient cube
143 nCubes = 0;
144 for ( g = 0; g < nGroups; g++ )
145 {
146 // if the group has less than nCubesD cubes,
147 // there is no way it can produce the quotient cube
148 // copy the cubes to the remainder
149 GroupSize = pGroups[g+1] - pGroups[g];
150 if ( GroupSize < nCubesD )
151 {
152 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
153 {
154 pCubeCopy = Mvc_CubeDup( pRem, pCover->pCubes[c] );
155 Mvc_CoverAddCubeTail( pRem, pCubeCopy );
156 nCubes++;
157 }
158 continue;
159 }
160
161 // mark the cubes as those that should be added to the remainder
162 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
163 Mvc_CubeSetSize( pCover->pCubes[c], 1 );
164
165 // go through the cubes in the group and at the same time
166 // go through the cubes in the divisor
167 iCubeD = 0;
168 iCubeC = 0;
169 pCubeD = pDiv->pCubes[iCubeD++];
170 pCubeC = pCover->pCubes[pGroups[g]+iCubeC++];
171 fSkipG = 0;
172 nMerges = 0;
173
174 while ( 1 )
175 {
176 // compare the topmost cubes in F and in D
177 RetValue = Mvc_CubeCompareIntUnderMask( pCubeC, pCubeD, pDiv->pMask );
178 // cube are ordered in increasing order of their int value
179 if ( RetValue == -1 ) // pCubeC is above pCubeD
180 { // cube in C should be added to the remainder
181 // check that there is enough cubes in the group
182 if ( GroupSize - iCubeC < nCubesD - nMerges )
183 {
184 fSkipG = 1;
185 break;
186 }
187 // get the next cube in the cover
188 pCubeC = pCover->pCubes[pGroups[g]+iCubeC++];
189 continue;
190 }
191 if ( RetValue == 1 ) // pCubeD is above pCubeC
192 { // given cube in D does not have a corresponding cube in the cover
193 fSkipG = 1;
194 break;
195 }
196 // mark the cube as the one that should NOT be added to the remainder
197 Mvc_CubeSetSize( pCubeC, 0 );
198 // remember this merged cube
199 iMerge = iCubeC-1;
200 nMerges++;
201
202 // stop if we considered the last cube of the group
203 if ( iCubeD == nCubesD )
204 break;
205
206 // advance the cube of the divisor
207 assert( iCubeD < nCubesD );
208 pCubeD = pDiv->pCubes[iCubeD++];
209
210 // advance the cube of the group
211 assert( pGroups[g]+iCubeC < nCubesC );
212 pCubeC = pCover->pCubes[pGroups[g]+iCubeC++];
213 }
214
215 if ( fSkipG )
216 {
217 // the group has failed, add all the cubes to the remainder
218 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
219 {
220 pCubeCopy = Mvc_CubeDup( pRem, pCover->pCubes[c] );
221 Mvc_CoverAddCubeTail( pRem, pCubeCopy );
222 nCubes++;
223 }
224 continue;
225 }
226
227 // the group has worked, add left-over cubes to the remainder
228 for ( c = pGroups[g]; c < pGroups[g+1]; c++ )
229 {
230 pCubeC = pCover->pCubes[c];
231 if ( Mvc_CubeReadSize(pCubeC) )
232 {
233 pCubeCopy = Mvc_CubeDup( pRem, pCubeC );
234 Mvc_CoverAddCubeTail( pRem, pCubeCopy );
235 nCubes++;
236 }
237 }
238
239 // create the quotient cube
240 pCube1 = Mvc_CubeAlloc( pQuo );
241 Mvc_CubeBitSharp( pCube1, pCover->pCubes[pGroups[g]+iMerge], pDiv->pMask );
242 // add the cube to the quotient
243 Mvc_CoverAddCubeTail( pQuo, pCube1 );
244 nCubes += nCubesD;
245 }
246 assert( nCubes == nCubesC );
247
248 // deallocate the memory
249 MEM_FREE( pCover->pMem, int, nCubesC + 1, pGroups );
250
251 // return the results
252 *ppRem = pRem;
253 *ppQuo = pQuo;
254// Mvc_CoverVerifyDivision( pCover, pDiv, pQuo, pRem );
255}
void Mvc_CoverDivideByCube(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
Definition mvcDivide.c:269
void Mvc_CoverDivideByLiteral(Mvc_Cover_t *pCover, Mvc_Cover_t *pDiv, Mvc_Cover_t **ppQuo, Mvc_Cover_t **ppRem)
Definition mvcDivide.c:323
#define Mvc_CubeBitEqualOutsideMask(Res, Cube1, Cube2, Mask)
Definition mvc.h:441
int Mvc_CubeCompareIntUnderMask(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
Definition mvcCompare.c:146
#define Mvc_CubeSetSize(Cube, Size)
Definition mvc.h:128
void Mvc_CoverList2Array(Mvc_Cover_t *pCover)
Definition mvcList.c:286
#define Mvc_CubeReadSize(Cube)
Definition mvc.h:124
int Mvc_CubeCompareIntOutsideAndUnderMask(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
Definition mvcCompare.c:265
int Mvc_CubeCompareInt(Mvc_Cube_t *pC1, Mvc_Cube_t *pC2, Mvc_Cube_t *pMask)
DECLARATIONS ///.
Definition mvcCompare.c:43
int Mvc_CoverIsOneLiteral(Mvc_Cover_t *pCover)
Definition mvcLits.c:324
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverDivisor()

Mvc_Cover_t * Mvc_CoverDivisor ( Mvc_Cover_t * pCover)
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Returns the quick divisor of the cover.]

Description [Returns NULL, if there is not divisor other than trivial.]

SideEffects []

SeeAlso []

Definition at line 46 of file mvcDivisor.c.

47{
48 Mvc_Cover_t * pKernel;
49 if ( Mvc_CoverReadCubeNum(pCover) <= 1 )
50 return NULL;
51 // allocate the literal array and count literals
52 if ( Mvc_CoverAnyLiteral( pCover, NULL ) == -1 )
53 return NULL;
54 // duplicate the cover
55 pKernel = Mvc_CoverDup(pCover);
56 // perform the kerneling
57 Mvc_CoverDivisorZeroKernel( pKernel );
58 assert( Mvc_CoverReadCubeNum(pKernel) );
59 return pKernel;
60}
Mvc_Cover_t * Mvc_CoverDup(Mvc_Cover_t *pCover)
Definition mvcCover.c:112
int Mvc_CoverAnyLiteral(Mvc_Cover_t *pCover, Mvc_Cube_t *pMask)
DECLARATIONS ///.
Definition mvcLits.c:43
Here is the call graph for this function:

◆ Mvc_CoverDup()

Mvc_Cover_t * Mvc_CoverDup ( Mvc_Cover_t * p)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 112 of file mvcCover.c.

113{
114 Mvc_Cover_t * pCover;
115 Mvc_Cube_t * pCube, * pCubeCopy;
116 // clone the cover
117 pCover = Mvc_CoverClone( p );
118 // copy the cube list
119 Mvc_CoverForEachCube( p, pCube )
120 {
121 pCubeCopy = Mvc_CubeDup( p, pCube );
122 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
123 }
124 return pCover;
125}
Mvc_Cover_t * Mvc_CoverClone(Mvc_Cover_t *p)
Definition mvcCover.c:79
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverFirstCubeFirstLit()

int Mvc_CoverFirstCubeFirstLit ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 261 of file mvcLits.c.

262{
263 Mvc_Cube_t * pCube;
264 int iBit, Value;
265
266 // get the first cube
267 pCube = Mvc_CoverReadCubeHead( pCover );
268 // get the first literal
269 Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
270 if ( Value )
271 return iBit;
272 return -1;
273}
#define Mvc_CubeForEachBit(Cover, Cube, iBit, Value)
Definition mvc.h:553
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverFlipVar()

Mvc_Cover_t * Mvc_CoverFlipVar ( Mvc_Cover_t * p,
int iValue0,
int iValue1 )
extern

Function*************************************************************

Synopsis [Returns the cover, in which the binary var is complemented.]

Description []

SideEffects []

SeeAlso []

Definition at line 550 of file mvcUtils.c.

551{
552 Mvc_Cover_t * pCover;
553 Mvc_Cube_t * pCube, * pCubeCopy;
554 int Value0, Value1, Temp;
555
556 assert( iValue0 + 1 == iValue1 ); // should be adjacent
557
558 // clone the cover
559 pCover = Mvc_CoverClone( p );
560 // copy the cube list
561 Mvc_CoverForEachCube( p, pCube )
562 {
563 pCubeCopy = Mvc_CubeDup( pCover, pCube );
564 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
565
566 // get the bits
567 Value0 = Mvc_CubeBitValue( pCubeCopy, iValue0 );
568 Value1 = Mvc_CubeBitValue( pCubeCopy, iValue1 );
569
570 // if both bits are one, nothing to swap
571 if ( Value0 && Value1 )
572 continue;
573 // cannot be both zero because they belong to the same var
574 assert( Value0 || Value1 );
575
576 // swap the bits
577 Temp = Value0;
578 Value0 = Value1;
579 Value1 = Temp;
580
581 // set the bits after the swap
582 if ( Value0 )
583 Mvc_CubeBitInsert( pCubeCopy, iValue0 );
584 else
585 Mvc_CubeBitRemove( pCubeCopy, iValue0 );
586
587 if ( Value1 )
588 Mvc_CubeBitInsert( pCubeCopy, iValue1 );
589 else
590 Mvc_CubeBitRemove( pCubeCopy, iValue1 );
591 }
592 return pCover;
593}
Here is the call graph for this function:

◆ Mvc_CoverFree()

void Mvc_CoverFree ( Mvc_Cover_t * p)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 138 of file mvcCover.c.

139{
140 Mvc_Cube_t * pCube, * pCube2;
141 // recycle cube list
142 Mvc_CoverForEachCubeSafe( p, pCube, pCube2 )
143 Mvc_CubeFree( p, pCube );
144 // recycle other pointers
145 Mvc_CubeFree( p, p->pMask );
146 MEM_FREE( p->pMem, Mvc_Cube_t *, p->nCubesAlloc, p->pCubes );
147 MEM_FREE( p->pMem, int, p->nBits, p->pLits );
148
149#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
150 ABC_FREE( p );
151#else
152 Extra_MmFixedEntryRecycle( p->pMem->pManC, (char *)p );
153#endif
154}
void Extra_MmFixedEntryRecycle(Extra_MmFixed_t *p, char *pEntry)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverGetCubeSize()

int Mvc_CoverGetCubeSize ( Mvc_Cube_t * pCube)
extern

◆ Mvc_CoverIntersectCubes()

void Mvc_CoverIntersectCubes ( Mvc_Data_t * pData,
Mvc_Cover_t * pC1,
Mvc_Cover_t * pC2 )
extern

◆ Mvc_CoverInverse()

void Mvc_CoverInverse ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 481 of file mvcUtils.c.

482{
483 Mvc_Cube_t * pCube;
484 // complement the cubes
485 Mvc_CoverForEachCube( pCover, pCube )
486 Mvc_CubeBitNot( pCube );
487}
#define Mvc_CubeBitNot(Cube)
Definition mvc.h:389
Here is the caller graph for this function:

◆ Mvc_CoverIsBinaryBuffer()

int Mvc_CoverIsBinaryBuffer ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Returns 1 if the cover is a binary buffer.]

Description []

SideEffects []

SeeAlso []

Definition at line 135 of file mvcApi.c.

136{
137 Mvc_Cube_t * pCube;
138 if ( pCover->nBits != 2 )
139 return 0;
140 if ( Mvc_CoverReadCubeNum(pCover) != 1 )
141 return 0;
142 pCube = pCover->lCubes.pHead;
143 if ( Mvc_CubeBitValue(pCube, 0) == 0 && Mvc_CubeBitValue(pCube, 1) == 1 )
144 return 1;
145 return 0;
146}
int Mvc_CoverReadCubeNum(Mvc_Cover_t *pCover)
Definition mvcApi.c:45
Here is the call graph for this function:

◆ Mvc_CoverIsCubeFree()

int Mvc_CoverIsCubeFree ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 176 of file mvcUtils.c.

177{
178 int Result;
179 // get the common cube
180 Mvc_CoverAllocateMask( pCover );
181 Mvc_CoverCommonCube( pCover, pCover->pMask );
182 // check whether the common cube is empty
183 Mvc_CubeBitEmpty( Result, pCover->pMask );
184 return Result;
185}
#define Mvc_CubeBitEmpty(Res, Cube)
Definition mvc.h:413
Here is the call graph for this function:

◆ Mvc_CoverIsEmpty()

int Mvc_CoverIsEmpty ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 93 of file mvcApi.c.

94{
95 return Mvc_CoverReadCubeNum(pCover) == 0;
96}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverIsIntersecting()

int Mvc_CoverIsIntersecting ( Mvc_Data_t * pData,
Mvc_Cover_t * pC1,
Mvc_Cover_t * pC2 )
extern

◆ Mvc_CoverIsOneLiteral()

int Mvc_CoverIsOneLiteral ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Returns the number of literals in the cover.]

Description []

SideEffects []

SeeAlso []

Definition at line 324 of file mvcLits.c.

325{
326 Mvc_Cube_t * pCube;
327 int iBit, Counter, Value;
328 if ( Mvc_CoverReadCubeNum(pCover) != 1 )
329 return 0;
330 pCube = Mvc_CoverReadCubeHead(pCover);
331 // count literals
332 Counter = 0;
333 Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
334 {
335 if ( Value )
336 {
337 if ( Counter++ )
338 return 0;
339 }
340 }
341 return 1;
342}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverIsTautology()

int Mvc_CoverIsTautology ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 109 of file mvcApi.c.

110{
111 Mvc_Cube_t * pCube;
112 int iBit, Value;
113
114 if ( Mvc_CoverReadCubeNum(pCover) != 1 )
115 return 0;
116
117 pCube = Mvc_CoverReadCubeHead( pCover );
118 Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
119 if ( Value == 0 )
120 return 0;
121 return 1;
122}
Mvc_Cube_t * Mvc_CoverReadCubeHead(Mvc_Cover_t *pCover)
Definition mvcApi.c:46
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverList2Array()

void Mvc_CoverList2Array ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Transfers the cubes from the list into the array.]

Description []

SideEffects []

SeeAlso []

Definition at line 286 of file mvcList.c.

287{
288 Mvc_Cube_t * pCube;
289 int Counter;
290 // resize storage if necessary
292 // iterate through the cubes
293 Counter = 0;
294 Mvc_CoverForEachCube( pCover, pCube )
295 pCover->pCubes[ Counter++ ] = pCube;
296 assert( Counter == Mvc_CoverReadCubeNum(pCover) );
297}
void Mvc_CoverAllocateArrayCubes(Mvc_Cover_t *pCover)
Definition mvcCover.c:202
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverMakeCubeFree()

void Mvc_CoverMakeCubeFree ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 198 of file mvcUtils.c.

199{
200 Mvc_Cube_t * pCube;
201 // get the common cube
202 Mvc_CoverAllocateMask( pCover );
203 Mvc_CoverCommonCube( pCover, pCover->pMask );
204 // remove this cube from the cubes in the cover
205 Mvc_CoverForEachCube( pCover, pCube )
206 Mvc_CubeBitSharp( pCube, pCube, pCover->pMask );
207}
Here is the call graph for this function:

◆ Mvc_CoverMakeEmpty()

void Mvc_CoverMakeEmpty ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 160 of file mvcApi.c.

161{
162 Mvc_Cube_t * pCube, * pCube2;
163 Mvc_CoverForEachCubeSafe( pCover, pCube, pCube2 )
164 Mvc_CubeFree( pCover, pCube );
165 pCover->lCubes.nItems = 0;
166 pCover->lCubes.pHead = NULL;
167 pCover->lCubes.pTail = NULL;
168}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverMakeTautology()

void Mvc_CoverMakeTautology ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 181 of file mvcApi.c.

182{
183 Mvc_Cube_t * pCubeNew;
184 Mvc_CoverMakeEmpty( pCover );
185 pCubeNew = Mvc_CubeAlloc( pCover );
186 Mvc_CubeBitFill( pCubeNew );
187 Mvc_CoverAddCubeTail( pCover, pCubeNew );
188}
void Mvc_CoverMakeEmpty(Mvc_Cover_t *pCover)
Definition mvcApi.c:160
Here is the call graph for this function:

◆ Mvc_CoverMinimizeByReshape()

void Mvc_CoverMinimizeByReshape ( Mvc_Data_t * pData,
Mvc_Cover_t * pCover )
extern

◆ Mvc_CoverPrint()

void Mvc_CoverPrint ( Mvc_Cover_t * pCover)
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file mvcPrint.c.

48{
49 Mvc_Cube_t * pCube;
50 int i;
51 // print general statistics
52 printf( "The cover contains %d cubes (%d bits and %d words)\n",
53 pCover->lCubes.nItems, pCover->nBits, pCover->nWords );
54 // iterate through the cubes
55 Mvc_CoverForEachCube( pCover, pCube )
56 Mvc_CubePrint( pCover, pCube );
57
58 if ( pCover->pLits )
59 {
60 for ( i = 0; i < pCover->nBits; i++ )
61 printf( " %d", pCover->pLits[i] );
62 printf( "\n" );
63 }
64 printf( "End of cover printout\n" );
65}
void Mvc_CubePrint(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition mvcPrint.c:79
Here is the call graph for this function:

◆ Mvc_CoverPrintMv()

void Mvc_CoverPrintMv ( Mvc_Data_t * pData,
Mvc_Cover_t * pCover )
extern

◆ Mvc_CoverReadBitNum()

int Mvc_CoverReadBitNum ( Mvc_Cover_t * pCover)
extern

Definition at line 44 of file mvcApi.c.

44{ return pCover->nBits; }

◆ Mvc_CoverReadCubeHead()

Mvc_Cube_t * Mvc_CoverReadCubeHead ( Mvc_Cover_t * pCover)
extern

Definition at line 46 of file mvcApi.c.

46{ return pCover->lCubes.pHead; }
Here is the caller graph for this function:

◆ Mvc_CoverReadCubeList()

Mvc_List_t * Mvc_CoverReadCubeList ( Mvc_Cover_t * pCover)
extern

Definition at line 48 of file mvcApi.c.

48{ return &pCover->lCubes; }

◆ Mvc_CoverReadCubeNum()

int Mvc_CoverReadCubeNum ( Mvc_Cover_t * pCover)
extern

Definition at line 45 of file mvcApi.c.

45{ return pCover->lCubes.nItems; }
Here is the caller graph for this function:

◆ Mvc_CoverReadCubeTail()

Mvc_Cube_t * Mvc_CoverReadCubeTail ( Mvc_Cover_t * pCover)
extern

Definition at line 47 of file mvcApi.c.

47{ return pCover->lCubes.pTail; }
Here is the caller graph for this function:

◆ Mvc_CoverReadWordNum()

int Mvc_CoverReadWordNum ( Mvc_Cover_t * pCover)
extern

FUNCTION DEFINITIONS ///.

FUNCTION DEFINITIONS ///.

CFile****************************************************************

FileName [mvcApi.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis []

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcApi.c,v 1.4 2003/04/03 06:31:48 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcApi.c.

43{ return pCover->nWords; }

◆ Mvc_CoverRemap()

Mvc_Cover_t * Mvc_CoverRemap ( Mvc_Cover_t * p,
int * pVarsRem,
int nVarsRem )
extern

Function*************************************************************

Synopsis [Creates a new cover containing some literals of the old cover.]

Description [Creates the new cover containing the given number (nVarsRem) literals of the old cover. All the bits of the new cover are initialized to "1". The selected bits from the old cover are copied on top. The numbers of the selected bits to copy are given in the array pVarsRem. The i-set entry in this array is the index of the bit in the old cover which goes to the i-th place in the new cover. If the i-th entry in pVarsRem is -1, it means that the i-th bit does not change (remains composed of all 1's). This is a useful feature to speed up remapping covers, which are known to depend only on a subset of input variables.]

SideEffects []

SeeAlso []

Definition at line 404 of file mvcUtils.c.

405{
406 Mvc_Cover_t * pCover;
407 Mvc_Cube_t * pCube, * pCubeCopy;
408 int i;
409 // clone the cover
410 pCover = Mvc_CoverAlloc( p->pMem, nVarsRem );
411 // copy the cube list
412 Mvc_CoverForEachCube( p, pCube )
413 {
414 pCubeCopy = Mvc_CubeAlloc( pCover );
415 //Mvc_CubeBitClean( pCubeCopy ); //changed by wjiang
416 Mvc_CubeBitFill( pCubeCopy ); //changed by wjiang
417 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
418 }
419 // copy the corresponding columns
420 for ( i = 0; i < nVarsRem; i++ )
421 {
422 if (pVarsRem[i] < 0)
423 continue; //added by wjiang
424 assert( pVarsRem[i] >= 0 && pVarsRem[i] < p->nBits );
425 Mvc_CoverCopyColumn( p, pCover, pVarsRem[i], i );
426 }
427 return pCover;
428}
Here is the call graph for this function:

◆ Mvc_CoverRemoveCubes()

void Mvc_CoverRemoveCubes ( Mvc_Cover_t * pC)
extern

◆ Mvc_CoverRemoveDontCareLits()

Mvc_Cover_t * Mvc_CoverRemoveDontCareLits ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [This function dups the cover and removes DC literals from cubes.]

Description []

SideEffects []

SeeAlso []

Definition at line 500 of file mvcUtils.c.

501{
502 Mvc_Cover_t * pCoverNew;
503 Mvc_Cube_t * pCube;
504
505 pCoverNew = Mvc_CoverDup( pCover );
506 Mvc_CoverForEachCube( pCoverNew, pCube )
507 Mvc_CubeBitRemoveDcs( pCube );
508 return pCoverNew;
509}
void Mvc_CubeBitRemoveDcs(Mvc_Cube_t *pCube)
Definition mvcCube.c:159
Here is the call graph for this function:

◆ Mvc_CoverSetCubeHead()

void Mvc_CoverSetCubeHead ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Definition at line 78 of file mvcApi.c.

78{ pCover->lCubes.pHead = pCube; }
Here is the caller graph for this function:

◆ Mvc_CoverSetCubeList()

void Mvc_CoverSetCubeList ( Mvc_Cover_t * pCover,
Mvc_List_t * pList )
extern

Definition at line 80 of file mvcApi.c.

80{ pCover->lCubes = *pList; }

◆ Mvc_CoverSetCubeNum()

void Mvc_CoverSetCubeNum ( Mvc_Cover_t * pCover,
int nItems )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 77 of file mvcApi.c.

77{ pCover->lCubes.nItems = nItems; }

◆ Mvc_CoverSetCubeSizes()

int Mvc_CoverSetCubeSizes ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Counts the cube sizes.]

Description []

SideEffects []

SeeAlso []

Definition at line 272 of file mvcUtils.c.

273{
274 Mvc_Cube_t * pCube;
275 unsigned char * pByte, * pByteStart, * pByteStop;
276 int nBytes, nOnes;
277
278 // get the number of unsigned chars in the cube's bit strings
279// nBytes = pCover->nBits / (8 * sizeof(unsigned char)) + (int)(pCover->nBits % (8 * sizeof(unsigned char)) > 0);
280 nBytes = sizeof(Mvc_CubeWord_t) * pCover->nWords; // big-endian issue
281 // iterate through the cubes
282 Mvc_CoverForEachCube( pCover, pCube )
283 {
284 // clean the counter of ones
285 nOnes = 0;
286 // set the starting and stopping positions
287 pByteStart = (unsigned char *)pCube->pData;
288 pByteStop = pByteStart + nBytes;
289 // iterate through the positions
290 for ( pByte = pByteStart; pByte < pByteStop; pByte++ )
291 nOnes += bit_count[*pByte];
292 // set the nOnes
293 Mvc_CubeSetSize( pCube, nOnes );
294 }
295 return 1;
296}
Here is the caller graph for this function:

◆ Mvc_CoverSetCubeTail()

void Mvc_CoverSetCubeTail ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Definition at line 79 of file mvcApi.c.

79{ pCover->lCubes.pTail = pCube; }
Here is the caller graph for this function:

◆ Mvc_CoverSharp()

Mvc_Cover_t * Mvc_CoverSharp ( Mvc_Data_t * p,
Mvc_Cover_t * pA,
Mvc_Cover_t * pB )
extern

◆ Mvc_CoverSort()

void Mvc_CoverSort ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pMask,
int(* pCompareFunc )(Mvc_Cube_t *, Mvc_Cube_t *, Mvc_Cube_t *) )
extern

FuNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Sorts cubes using the given cost function.]

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file mvcSort.c.

48{
49 Mvc_Cube_t * pHead;
50 int nCubes;
51 // one cube does not need sorting
52 nCubes = Mvc_CoverReadCubeNum(pCover);
53 if ( nCubes <= 1 )
54 return;
55 // sort the cubes
56 pHead = Mvc_CoverSort_rec( Mvc_CoverReadCubeHead(pCover), nCubes, pMask, pCompareFunc );
57 // insert the sorted list into the cover
58 Mvc_CoverSetCubeHead( pCover, pHead );
60 // make sure that the list is sorted in the increasing order
61 assert( pCompareFunc( Mvc_CoverReadCubeHead(pCover), Mvc_CoverReadCubeTail(pCover), pMask ) <= 0 );
62}
ABC_NAMESPACE_IMPL_START Mvc_Cube_t * Mvc_CoverSort_rec(Mvc_Cube_t *pList, int nItems, Mvc_Cube_t *pMask, int(*pCompareFunc)(Mvc_Cube_t *, Mvc_Cube_t *, Mvc_Cube_t *))
DECLARATIONS ///.
Definition mvcSort.c:75
void Mvc_CoverSetCubeHead(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition mvcApi.c:78
Mvc_Cube_t * Mvc_ListGetTailFromHead(Mvc_Cube_t *pHead)
Definition mvcList.c:351
void Mvc_CoverSetCubeTail(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition mvcApi.c:79
Mvc_Cube_t * Mvc_CoverReadCubeTail(Mvc_Cover_t *pCover)
Definition mvcApi.c:47
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverSupport()

void Mvc_CoverSupport ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pSupp )
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 58 of file mvcUtils.c.

59{
60 Mvc_Cube_t * pCube;
61 // clean the support
62 Mvc_CubeBitClean( pSupp );
63 // collect the support
64 Mvc_CoverForEachCube( pCover, pCube )
65 Mvc_CubeBitOr( pSupp, pSupp, pCube );
66}
Here is the caller graph for this function:

◆ Mvc_CoverSupportSizeBinary()

int Mvc_CoverSupportSizeBinary ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 100 of file mvcUtils.c.

101{
102 Mvc_Cube_t * pSupp;
103 int Counter, i, v0, v1;
104 // compute the support
105 pSupp = Mvc_CubeAlloc( pCover );
106 Mvc_CoverSupportAnd( pCover, pSupp );
107 Counter = pCover->nBits/2;
108 for ( i = 0; i < pCover->nBits/2; i++ )
109 {
110 v0 = Mvc_CubeBitValue( pSupp, 2*i );
111 v1 = Mvc_CubeBitValue( pSupp, 2*i+1 );
112 if ( v0 && v1 )
113 Counter--;
114 }
115 Mvc_CubeFree( pCover, pSupp );
116 return Counter;
117}
void Mvc_CoverSupportAnd(Mvc_Cover_t *pCover, Mvc_Cube_t *pSupp)
Definition mvcUtils.c:79
Here is the call graph for this function:

◆ Mvc_CoverSupportVarBelongs()

int Mvc_CoverSupportVarBelongs ( Mvc_Cover_t * pCover,
int iVar )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 130 of file mvcUtils.c.

131{
132 Mvc_Cube_t * pSupp;
133 int RetValue, v0, v1;
134 // compute the support
135 pSupp = Mvc_CubeAlloc( pCover );
136 Mvc_CoverSupportAnd( pCover, pSupp );
137 v0 = Mvc_CubeBitValue( pSupp, 2*iVar );
138 v1 = Mvc_CubeBitValue( pSupp, 2*iVar+1 );
139 RetValue = (int)( !v0 || !v1 );
140 Mvc_CubeFree( pCover, pSupp );
141 return RetValue;
142}
Here is the call graph for this function:

◆ Mvc_CoverTautology()

int Mvc_CoverTautology ( Mvc_Data_t * p,
Mvc_Cover_t * pCover )
extern

◆ Mvc_CoverTranspose()

Mvc_Cover_t * Mvc_CoverTranspose ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Transposes the cube cover.]

Description [Returns the cube cover that looks like a transposed matrix, compared to the matrix derived from the original cover.]

SideEffects []

SeeAlso []

Definition at line 808 of file mvcUtils.c.

809{
810 Mvc_Cover_t * pRes;
811 Mvc_Cube_t * pCubeRes, * pCube;
812 int nWord, nBit, i, iCube;
813
814 pRes = Mvc_CoverAlloc( pCover->pMem, Mvc_CoverReadCubeNum(pCover) );
815 for ( i = 0; i < pCover->nBits; i++ )
816 {
817 // get the word and bit of this literal
818 nWord = Mvc_CubeWhichWord(i);
819 nBit = Mvc_CubeWhichBit(i);
820 // get the transposed cube
821 pCubeRes = Mvc_CubeAlloc( pRes );
822 Mvc_CubeBitClean( pCubeRes );
823 iCube = 0;
824 Mvc_CoverForEachCube( pCover, pCube )
825 {
826 if ( pCube->pData[nWord] & (1<<nBit) )
827 Mvc_CubeBitInsert( pCubeRes, iCube );
828 iCube++;
829 }
830 Mvc_CoverAddCubeTail( pRes, pCubeRes );
831 }
832 return pRes;
833}
Here is the call graph for this function:

◆ Mvc_CoverUnivQuantify()

Mvc_Cover_t * Mvc_CoverUnivQuantify ( Mvc_Cover_t * p,
int iValueA0,
int iValueA1,
int iValueB0,
int iValueB1 )
extern

Function*************************************************************

Synopsis [Returns the cover derived by universal quantification.]

Description [Returns the cover computed by universal quantification as follows: CoverNew = Univ(B) [Cover & (A==B)]. Removes the second binary var from the support (given by values iValueB0 and iValueB1). Leaves the first binary variable (given by values iValueA0 and iValueA1) in the support.]

SideEffects []

SeeAlso []

Definition at line 610 of file mvcUtils.c.

612{
613 Mvc_Cover_t * pCover;
614 Mvc_Cube_t * pCube, * pCubeCopy;
615 int ValueA0, ValueA1, ValueB0, ValueB1;
616
617 // clone the cover
618 pCover = Mvc_CoverClone( p );
619 // copy the cube list
620 Mvc_CoverForEachCube( p, pCube )
621 {
622 // get the bits
623 ValueA0 = Mvc_CubeBitValue( pCube, iValueA0 );
624 ValueA1 = Mvc_CubeBitValue( pCube, iValueA1 );
625 ValueB0 = Mvc_CubeBitValue( pCube, iValueB0 );
626 ValueB1 = Mvc_CubeBitValue( pCube, iValueB1 );
627
628 // cannot be both zero because they belong to the same var
629 assert( ValueA0 || ValueA1 );
630 assert( ValueB0 || ValueB1 );
631
632 // if the values of this var are different, do not add the cube
633 if ( ValueA0 != ValueB0 && ValueA1 != ValueB1 )
634 continue;
635
636 // create the cube
637 pCubeCopy = Mvc_CubeDup( pCover, pCube );
638 Mvc_CoverAddCubeTail( pCover, pCubeCopy );
639
640 // insert 1's into for the first var, if both have this value
641 if ( ValueA0 && ValueB0 )
642 Mvc_CubeBitInsert( pCubeCopy, iValueA0 );
643 else
644 Mvc_CubeBitRemove( pCubeCopy, iValueA0 );
645
646 if ( ValueA1 && ValueB1 )
647 Mvc_CubeBitInsert( pCubeCopy, iValueA1 );
648 else
649 Mvc_CubeBitRemove( pCubeCopy, iValueA1 );
650
651 // insert 1's into for the second var (the cover does not depend on it)
652 Mvc_CubeBitInsert( pCubeCopy, iValueB0 );
653 Mvc_CubeBitInsert( pCubeCopy, iValueB1 );
654 }
655 return pCover;
656}
Here is the call graph for this function:

◆ Mvc_CoverWorstLiteral()

int Mvc_CoverWorstLiteral ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pMask )
extern

Function*************************************************************

Synopsis [Find the most often occurring literal.]

Description [Find the most often occurring literal among those that occur more than once.]

SideEffects []

SeeAlso []

Definition at line 162 of file mvcLits.c.

163{
164 Mvc_Cube_t * pCube;
165 int nWord, nBit;
166 int i, iMin, nLitsMin, nLitsCur;
167 int fUseFirst = 1;
168
169 // go through each literal
170 iMin = -1;
171 nLitsMin = 1000000;
172 for ( i = 0; i < pCover->nBits; i++ )
173 if ( !pMask || Mvc_CubeBitValue(pMask,i) )
174 {
175 // get the word and bit of this literal
176 nWord = Mvc_CubeWhichWord(i);
177 nBit = Mvc_CubeWhichBit(i);
178 // go through all the cubes
179 nLitsCur = 0;
180 Mvc_CoverForEachCube( pCover, pCube )
181 if ( pCube->pData[nWord] & (1<<nBit) )
182 nLitsCur++;
183
184 // skip the literal that does not occur or occurs once
185 if ( nLitsCur < 2 )
186 continue;
187
188 // check if this is the best literal
189 if ( fUseFirst )
190 {
191 if ( nLitsMin > nLitsCur )
192 {
193 nLitsMin = nLitsCur;
194 iMin = i;
195 }
196 }
197 else
198 {
199 if ( nLitsMin >= nLitsCur )
200 {
201 nLitsMin = nLitsCur;
202 iMin = i;
203 }
204 }
205 }
206
207 if ( nLitsMin < 1000000 )
208 return iMin;
209 return -1;
210}

◆ Mvc_CubeAlloc()

Mvc_Cube_t * Mvc_CubeAlloc ( Mvc_Cover_t * pCover)
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcCube.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Manipulating unate cubes.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcCube.c,v 1.4 2003/04/03 06:31:49 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcCube.c.

44{
45 Mvc_Cube_t * pCube;
46
47 assert( pCover->nWords >= 0 );
48 // allocate the cube
49#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
50 if ( pCover->nWords == 0 )
51 pCube = (Mvc_Cube_t *)ABC_ALLOC( char, sizeof(Mvc_Cube_t) );
52 else
53 pCube = (Mvc_Cube_t *)ABC_ALLOC( char, sizeof(Mvc_Cube_t) + sizeof(Mvc_CubeWord_t) * (pCover->nWords - 1) );
54#else
55 switch( pCover->nWords )
56 {
57 case 0:
58 case 1:
59 pCube = (Mvc_Cube_t *)Extra_MmFixedEntryFetch( pCover->pMem->pMan1 );
60 break;
61 case 2:
62 pCube = (Mvc_Cube_t *)Extra_MmFixedEntryFetch( pCover->pMem->pMan2 );
63 break;
64 case 3:
65 case 4:
66 pCube = (Mvc_Cube_t *)Extra_MmFixedEntryFetch( pCover->pMem->pMan4 );
67 break;
68 default:
69 pCube = (Mvc_Cube_t *)ABC_ALLOC( char, sizeof(Mvc_Cube_t) + sizeof(Mvc_CubeWord_t) * (pCover->nWords - 1) );
70 break;
71 }
72#endif
73 // set the parameters charactering this cube
74 if ( pCover->nWords == 0 )
75 pCube->iLast = pCover->nWords;
76 else
77 pCube->iLast = pCover->nWords - 1;
78 pCube->nUnused = pCover->nUnused;
79 return pCube;
80}
unsigned iLast
Definition mvc.h:66
unsigned nUnused
Definition mvc.h:67
Extra_MmFixed_t * pMan1
Definition mvc.h:111
Extra_MmFixed_t * pMan4
Definition mvc.h:113
Extra_MmFixed_t * pMan2
Definition mvc.h:112
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CubeBitRemoveDcs()

void Mvc_CubeBitRemoveDcs ( Mvc_Cube_t * pCube)
extern

Function*************************************************************

Synopsis [Removes the don't-care variable from the cube.]

Description []

SideEffects []

SeeAlso []

Definition at line 159 of file mvcCube.c.

160{
161 unsigned Mask;
162 int i;
163 for ( i = Mvc_CubeReadLast(pCube); i >= 0; i-- )
164 {
165 // detect those variables that are different (not DCs)
166 Mask = (pCube->pData[i] ^ (pCube->pData[i] >> 1)) & BITS_DISJOINT;
167 // create the mask of all that are different
168 Mask |= (Mask << 1);
169 // remove other bits from the set
170 pCube->pData[i] &= Mask;
171 }
172}
#define Mvc_CubeReadLast(Cube)
Definition mvc.h:123
#define BITS_DISJOINT
Definition mvc.h:44
Here is the caller graph for this function:

◆ Mvc_CubeCompareInt()

int Mvc_CubeCompareInt ( Mvc_Cube_t * pC1,
Mvc_Cube_t * pC2,
Mvc_Cube_t * pMask )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcCompare.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Various cube comparison functions.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcCompare.c,v 1.5 2003/04/03 23:25:41 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Compares two cubes according to their integer value.]

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcCompare.c.

44{
45 if ( Mvc_Cube1Words(pC1) )
46 {
47 if ( pC1->pData[0] < pC2->pData[0] )
48 return -1;
49 if ( pC1->pData[0] > pC2->pData[0] )
50 return 1;
51 return 0;
52 }
53 else if ( Mvc_Cube2Words(pC1) )
54 {
55 if ( pC1->pData[1] < pC2->pData[1] )
56 return -1;
57 if ( pC1->pData[1] > pC2->pData[1] )
58 return 1;
59 if ( pC1->pData[0] < pC2->pData[0] )
60 return -1;
61 if ( pC1->pData[0] > pC2->pData[0] )
62 return 1;
63 return 0;
64 }
65 else
66 {
67 int i = Mvc_CubeReadLast(pC1);
68 for(; i >= 0; i--)
69 {
70 if ( pC1->pData[i] < pC2->pData[i] )
71 return -1;
72 if ( pC1->pData[i] > pC2->pData[i] )
73 return 1;
74 }
75 return 0;
76 }
77}
Here is the caller graph for this function:

◆ Mvc_CubeCompareIntOutsideAndUnderMask()

int Mvc_CubeCompareIntOutsideAndUnderMask ( Mvc_Cube_t * pC1,
Mvc_Cube_t * pC2,
Mvc_Cube_t * pMask )
extern

Function*************************************************************

Synopsis [Compares the cubes (1) outside the mask, (2) under the mask.]

Description []

SideEffects []

SeeAlso []

Definition at line 265 of file mvcCompare.c.

266{
267 unsigned uBits1, uBits2;
268
269 if ( Mvc_Cube1Words(pC1) )
270 {
271 // compare the cubes outside the mask
272 uBits1 = pC1->pData[0] & ~(pMask->pData[0]);
273 uBits2 = pC2->pData[0] & ~(pMask->pData[0]);
274 if ( uBits1 < uBits2 )
275 return -1;
276 if ( uBits1 > uBits2 )
277 return 1;
278
279 // compare the cubes under the mask
280 uBits1 = pC1->pData[0] & pMask->pData[0];
281 uBits2 = pC2->pData[0] & pMask->pData[0];
282 if ( uBits1 < uBits2 )
283 return -1;
284 if ( uBits1 > uBits2 )
285 return 1;
286 // cubes are equal
287 // should never happen
288 assert( 0 );
289 return 0;
290 }
291 else if ( Mvc_Cube2Words(pC1) )
292 {
293 // compare the cubes outside the mask
294 uBits1 = pC1->pData[1] & ~(pMask->pData[1]);
295 uBits2 = pC2->pData[1] & ~(pMask->pData[1]);
296 if ( uBits1 < uBits2 )
297 return -1;
298 if ( uBits1 > uBits2 )
299 return 1;
300
301 uBits1 = pC1->pData[0] & ~(pMask->pData[0]);
302 uBits2 = pC2->pData[0] & ~(pMask->pData[0]);
303 if ( uBits1 < uBits2 )
304 return -1;
305 if ( uBits1 > uBits2 )
306 return 1;
307
308 // compare the cubes under the mask
309 uBits1 = pC1->pData[1] & pMask->pData[1];
310 uBits2 = pC2->pData[1] & pMask->pData[1];
311 if ( uBits1 < uBits2 )
312 return -1;
313 if ( uBits1 > uBits2 )
314 return 1;
315
316 uBits1 = pC1->pData[0] & pMask->pData[0];
317 uBits2 = pC2->pData[0] & pMask->pData[0];
318 if ( uBits1 < uBits2 )
319 return -1;
320 if ( uBits1 > uBits2 )
321 return 1;
322
323 // cubes are equal
324 // should never happen
325 assert( 0 );
326 return 0;
327 }
328 else
329 {
330 int i;
331
332 // compare the cubes outside the mask
333 for( i = Mvc_CubeReadLast(pC1); i >= 0; i-- )
334 {
335 uBits1 = pC1->pData[i] & ~(pMask->pData[i]);
336 uBits2 = pC2->pData[i] & ~(pMask->pData[i]);
337 if ( uBits1 < uBits2 )
338 return -1;
339 if ( uBits1 > uBits2 )
340 return 1;
341 }
342 // compare the cubes under the mask
343 for( i = Mvc_CubeReadLast(pC1); i >= 0; i-- )
344 {
345 uBits1 = pC1->pData[i] & pMask->pData[i];
346 uBits2 = pC2->pData[i] & pMask->pData[i];
347 if ( uBits1 < uBits2 )
348 return -1;
349 if ( uBits1 > uBits2 )
350 return 1;
351 }
352/*
353 {
354 Mvc_Cover_t * pCover;
355 pCover = Mvc_CoverAlloc( NULL, 96 );
356 Mvc_CubePrint( pCover, pC1 );
357 Mvc_CubePrint( pCover, pC2 );
358 Mvc_CubePrint( pCover, pMask );
359 }
360*/
361 // cubes are equal
362 // should never happen
363 assert( 0 );
364 return 0;
365 }
366}
Here is the caller graph for this function:

◆ Mvc_CubeCompareIntOutsideMask()

int Mvc_CubeCompareIntOutsideMask ( Mvc_Cube_t * pC1,
Mvc_Cube_t * pC2,
Mvc_Cube_t * pMask )
extern

Function*************************************************************

Synopsis [Compares two cubes under the mask.]

Description []

SideEffects []

SeeAlso []

Definition at line 205 of file mvcCompare.c.

206{
207 unsigned uBits1, uBits2;
208
209 // compare the cubes under the mask
210 if ( Mvc_Cube1Words(pC1) )
211 {
212 uBits1 = pC1->pData[0] | pMask->pData[0];
213 uBits2 = pC2->pData[0] | pMask->pData[0];
214 if ( uBits1 < uBits2 )
215 return -1;
216 if ( uBits1 > uBits2 )
217 return 1;
218 // cubes are equal
219 return 0;
220 }
221 else if ( Mvc_Cube2Words(pC1) )
222 {
223 uBits1 = pC1->pData[1] | pMask->pData[1];
224 uBits2 = pC2->pData[1] | pMask->pData[1];
225 if ( uBits1 < uBits2 )
226 return -1;
227 if ( uBits1 > uBits2 )
228 return 1;
229 uBits1 = pC1->pData[0] | pMask->pData[0];
230 uBits2 = pC2->pData[0] | pMask->pData[0];
231 if ( uBits1 < uBits2 )
232 return -1;
233 if ( uBits1 > uBits2 )
234 return 1;
235 return 0;
236 }
237 else
238 {
239 int i = Mvc_CubeReadLast(pC1);
240 for(; i >= 0; i--)
241 {
242 uBits1 = pC1->pData[i] | pMask->pData[i];
243 uBits2 = pC2->pData[i] | pMask->pData[i];
244 if ( uBits1 < uBits2 )
245 return -1;
246 if ( uBits1 > uBits2 )
247 return 1;
248 }
249 return 0;
250 }
251}

◆ Mvc_CubeCompareIntUnderMask()

int Mvc_CubeCompareIntUnderMask ( Mvc_Cube_t * pC1,
Mvc_Cube_t * pC2,
Mvc_Cube_t * pMask )
extern

Function*************************************************************

Synopsis [Compares two cubes under the mask.]

Description []

SideEffects []

SeeAlso []

Definition at line 146 of file mvcCompare.c.

147{
148 unsigned uBits1, uBits2;
149
150 // compare the cubes under the mask
151 if ( Mvc_Cube1Words(pC1) )
152 {
153 uBits1 = pC1->pData[0] & pMask->pData[0];
154 uBits2 = pC2->pData[0] & pMask->pData[0];
155 if ( uBits1 < uBits2 )
156 return -1;
157 if ( uBits1 > uBits2 )
158 return 1;
159 // cubes are equal
160 return 0;
161 }
162 else if ( Mvc_Cube2Words(pC1) )
163 {
164 uBits1 = pC1->pData[1] & pMask->pData[1];
165 uBits2 = pC2->pData[1] & pMask->pData[1];
166 if ( uBits1 < uBits2 )
167 return -1;
168 if ( uBits1 > uBits2 )
169 return 1;
170 uBits1 = pC1->pData[0] & pMask->pData[0];
171 uBits2 = pC2->pData[0] & pMask->pData[0];
172 if ( uBits1 < uBits2 )
173 return -1;
174 if ( uBits1 > uBits2 )
175 return 1;
176 return 0;
177 }
178 else
179 {
180 int i = Mvc_CubeReadLast(pC1);
181 for(; i >= 0; i--)
182 {
183 uBits1 = pC1->pData[i] & pMask->pData[i];
184 uBits2 = pC2->pData[i] & pMask->pData[i];
185 if ( uBits1 < uBits2 )
186 return -1;
187 if ( uBits1 > uBits2 )
188 return 1;
189 }
190 return 0;
191 }
192}
Here is the caller graph for this function:

◆ Mvc_CubeCompareSizeAndInt()

int Mvc_CubeCompareSizeAndInt ( Mvc_Cube_t * pC1,
Mvc_Cube_t * pC2,
Mvc_Cube_t * pMask )
extern

Function*************************************************************

Synopsis [Compares the cubes (1) by size, (2) by integer value.]

Description []

SideEffects []

SeeAlso []

Definition at line 91 of file mvcCompare.c.

92{
93 // compare the cubes by size
94 if ( Mvc_CubeReadSize( pC1 ) < Mvc_CubeReadSize( pC2 ) )
95 return 1;
96 if ( Mvc_CubeReadSize( pC1 ) > Mvc_CubeReadSize( pC2 ) )
97 return -1;
98 // the cubes have the same size
99
100 // compare the cubes as integers
101 if ( Mvc_Cube1Words( pC1 ) )
102 {
103 if ( pC1->pData[0] < pC2->pData[0] )
104 return -1;
105 if ( pC1->pData[0] > pC2->pData[0] )
106 return 1;
107 return 0;
108 }
109 else if ( Mvc_Cube2Words( pC1 ) )
110 {
111 if ( pC1->pData[1] < pC2->pData[1] )
112 return -1;
113 if ( pC1->pData[1] > pC2->pData[1] )
114 return 1;
115 if ( pC1->pData[0] < pC2->pData[0] )
116 return -1;
117 if ( pC1->pData[0] > pC2->pData[0] )
118 return 1;
119 return 0;
120 }
121 else
122 {
123 int i = Mvc_CubeReadLast( pC1 );
124 for(; i >= 0; i--)
125 {
126 if ( pC1->pData[i] < pC2->pData[i] )
127 return -1;
128 if ( pC1->pData[i] > pC2->pData[i] )
129 return 1;
130 }
131 return 0;
132 }
133}
Here is the caller graph for this function:

◆ Mvc_CubeDup()

Mvc_Cube_t * Mvc_CubeDup ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 94 of file mvcCube.c.

95{
96 Mvc_Cube_t * pCubeCopy;
97 pCubeCopy = Mvc_CubeAlloc( pCover );
98 Mvc_CubeBitCopy( pCubeCopy, pCube );
99 return pCubeCopy;
100}
ABC_NAMESPACE_IMPL_START Mvc_Cube_t * Mvc_CubeAlloc(Mvc_Cover_t *pCover)
DECLARATIONS ///.
Definition mvcCube.c:43
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CubeFree()

void Mvc_CubeFree ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 114 of file mvcCube.c.

115{
116 if ( pCube == NULL )
117 return;
118
119 // verify the parameters charactering this cube
120 assert( pCube->iLast == 0 || ((int)pCube->iLast) == pCover->nWords - 1 );
121 assert( ((int)pCube->nUnused) == pCover->nUnused );
122
123 // deallocate the cube
124#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
125 ABC_FREE( pCube );
126#else
127 switch( pCover->nWords )
128 {
129 case 0:
130 case 1:
131 Extra_MmFixedEntryRecycle( pCover->pMem->pMan1, (char *)pCube );
132 break;
133 case 2:
134 Extra_MmFixedEntryRecycle( pCover->pMem->pMan2, (char *)pCube );
135 break;
136 case 3:
137 case 4:
138 Extra_MmFixedEntryRecycle( pCover->pMem->pMan4, (char *)pCube );
139 break;
140 default:
141 ABC_FREE( pCube );
142 break;
143 }
144#endif
145}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CubePrint()

void Mvc_CubePrint ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 79 of file mvcPrint.c.

80{
81 int iBit, Value;
82 // iterate through the literals
83// printf( "Size = %2d ", Mvc_CubeReadSize(pCube) );
84 Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
85 printf( "%c", '0' + Value );
86 printf( "\n" );
87}
Here is the caller graph for this function:

◆ Mvc_CubePrintMv()

void Mvc_CubePrintMv ( Mvc_Data_t * pData,
Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )
extern

◆ Mvc_ListAddCubeHead_()

void Mvc_ListAddCubeHead_ ( Mvc_List_t * pList,
Mvc_Cube_t * pCube )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcList.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Manipulating list of cubes in the cover.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcList.c,v 1.4 2003/04/03 06:31:50 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcList.c.

44{
45 if ( pList->pHead == NULL )
46 {
47 Mvc_CubeSetNext( pCube, NULL );
48 pList->pHead = pCube;
49 pList->pTail = pCube;
50 }
51 else
52 {
53 Mvc_CubeSetNext( pCube, pList->pHead );
54 pList->pHead = pCube;
55 }
56 pList->nItems++;
57}

◆ Mvc_ListAddCubeTail_()

void Mvc_ListAddCubeTail_ ( Mvc_List_t * pList,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 71 of file mvcList.c.

72{
73 if ( pList->pHead == NULL )
74 pList->pHead = pCube;
75 else
76 Mvc_CubeSetNext( pList->pTail, pCube );
77 pList->pTail = pCube;
78 Mvc_CubeSetNext( pCube, NULL );
79 pList->nItems++;
80}

◆ Mvc_ListDeleteCube_()

void Mvc_ListDeleteCube_ ( Mvc_List_t * pList,
Mvc_Cube_t * pPrev,
Mvc_Cube_t * pCube )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 94 of file mvcList.c.

95{
96 if ( pPrev == NULL ) // deleting the head cube
97 pList->pHead = Mvc_CubeReadNext(pCube);
98 else
99 pPrev->pNext = pCube->pNext;
100 if ( pList->pTail == pCube ) // deleting the tail cube
101 {
102 assert( Mvc_CubeReadNext(pCube) == NULL );
103 pList->pTail = pPrev;
104 }
105 pList->nItems--;
106}

◆ Mvc_ListGetTailFromHead()

Mvc_Cube_t * Mvc_ListGetTailFromHead ( Mvc_Cube_t * pHead)
extern

Function*************************************************************

Synopsis [Returns the tail of the linked list given by the head.]

Description []

SideEffects []

SeeAlso []

Definition at line 351 of file mvcList.c.

352{
353 Mvc_Cube_t * pCube, * pTail;
354 for ( pTail = pCube = pHead;
355 pCube;
356 pTail = pCube, pCube = Mvc_CubeReadNext(pCube) );
357 return pTail;
358}
Here is the caller graph for this function:

◆ Mvc_ListReadCubeHead()

Mvc_Cube_t * Mvc_ListReadCubeHead ( Mvc_List_t * pList)
extern

Definition at line 63 of file mvcApi.c.

63{ return pList->pHead; }

◆ Mvc_ListReadCubeNum()

int Mvc_ListReadCubeNum ( Mvc_List_t * pList)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 62 of file mvcApi.c.

62{ return pList->nItems; }

◆ Mvc_ListReadCubeTail()

Mvc_Cube_t * Mvc_ListReadCubeTail ( Mvc_List_t * pList)
extern

Definition at line 64 of file mvcApi.c.

64{ return pList->pTail; }

◆ Mvc_ManagerAllocCover()

Mvc_Manager_t * Mvc_ManagerAllocCover ( )
extern

◆ Mvc_ManagerAllocCube()

Mvc_Manager_t * Mvc_ManagerAllocCube ( int nWords)
extern

◆ Mvc_ManagerFree()

void Mvc_ManagerFree ( Mvc_Manager_t * p)
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 67 of file mvcMan.c.

68{
69 Extra_MmFixedStop( p->pMan1 );
70 Extra_MmFixedStop( p->pMan2 );
71 Extra_MmFixedStop( p->pMan4 );
72 Extra_MmFixedStop( p->pManC );
73 ABC_FREE( p );
74}
void Extra_MmFixedStop(Extra_MmFixed_t *p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_ManagerFreeCover()

Mvc_Manager_t * Mvc_ManagerFreeCover ( Mvc_Cover_t * pCover)
extern

◆ Mvc_ManagerFreeCube()

Mvc_Manager_t * Mvc_ManagerFreeCube ( Mvc_Cover_t * pCube,
int nWords )
extern

◆ Mvc_ManagerStart()

Mvc_Manager_t * Mvc_ManagerStart ( )
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [mvcMan.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Procedures working with the MVC memory manager.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcMan.c,v 1.3 2003/03/19 19:50:26 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 44 of file mvcMan.c.

45{
48 memset( p, 0, sizeof(Mvc_Manager_t) );
49 p->pMan1 = Extra_MmFixedStart( sizeof(Mvc_Cube_t) );
50 p->pMan2 = Extra_MmFixedStart( sizeof(Mvc_Cube_t) + sizeof(Mvc_CubeWord_t) );
51 p->pMan4 = Extra_MmFixedStart( sizeof(Mvc_Cube_t) + 3 * sizeof(Mvc_CubeWord_t) );
52 p->pManC = Extra_MmFixedStart( sizeof(Mvc_Cover_t) );
53 return p;
54}
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
struct MvcManagerStruct Mvc_Manager_t
Definition mvc.h:60
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_UtilsCheckUnusedZeros()

int Mvc_UtilsCheckUnusedZeros ( Mvc_Cover_t * pCover)
extern

Function*************************************************************

Synopsis [Checks that the cubes of the cover have 0's in unused bits.]

Description []

SideEffects []

SeeAlso []

Definition at line 846 of file mvcUtils.c.

847{
848 unsigned Unsigned;
849 Mvc_Cube_t * pCube;
850 int nCubes;
851
852 nCubes = 0;
853 Mvc_CoverForEachCube( pCover, pCube )
854 {
855 if ( pCube->nUnused == 0 )
856 continue;
857
858 Unsigned = ( pCube->pData[pCube->iLast] &
859 (BITS_FULL << (32-pCube->nUnused)) );
860 if( Unsigned )
861 {
862 printf( "Cube %2d out of %2d contains dirty bits.\n", nCubes,
863 Mvc_CoverReadCubeNum(pCover) );
864 }
865 nCubes++;
866 }
867 return 1;
868}
Here is the call graph for this function:

◆ Mvr_CoverCountLitsWithValue()

int Mvr_CoverCountLitsWithValue ( Mvc_Data_t * pData,
Mvc_Cover_t * pCover,
int iVar,
int iValue )
extern