Skip to content

Commit

Permalink
galgas 3.3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbirccyn committed Dec 14, 2018
1 parent ee6aa17 commit 7aa3bbc
Show file tree
Hide file tree
Showing 312 changed files with 26,422 additions and 26,193 deletions.
42 changes: 21 additions & 21 deletions goil/build/libpm/bdd/C_BDD-and-operation.cpp
@@ -1,14 +1,14 @@
//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*
// *
// BDD package (implementation of ROBDD) *
// *
// This file is part of libpm library *
// *
// Copyright (C) 1999, ..., 2010 Pierre Molinaro. *
// *
// e-mail : pierre.molinaro@irccyn.ec-nantes.fr *
// e-mail : pierre.molinaro@ec-nantes.fr *
// *
// IRCCyN, Institut de Recherche en Communications et Cybernétique de Nantes, ECN, École Centrale de Nantes (France) *
// LS2N, Laboratoire des Sciences du Numérique de Nantes, ECN, École Centrale de Nantes (France) *
// *
// This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General *
// Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) *
Expand All @@ -18,35 +18,35 @@
// warranty of MERCHANDIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
// more details. *
// *
//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

#include "bdd/C_BDD.h"
#include "utilities/F_GetPrime.h"
#include "strings/C_String.h"
#include "bdd/C_BDD-node.h"

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

#ifdef PRAGMA_MARK_ALLOWED
#pragma mark Cache for AND Operation
#endif

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*
// *
// And computation cache *
// *
//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

typedef struct {
public : uint64_t mOperands ;
public : uint32_t mResult ;
} tStructANDOperationCacheEntry ;

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

static const int32_t kANDOperationCacheInitialSize = 262145 ;

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

static uint64_t * gANDOperationCacheOperandMap ;
static uint32_t * gANDOperationCacheResultMap ;
Expand All @@ -56,13 +56,13 @@ static uint64_t gANDOperationCacheTrivialOperationCount ;
static bool gANDOperationCacheExpandable = true ;
static uint32_t gANDOperationCacheMaxPowerOfTwoSize = 31 ;

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

uint32_t ANDCacheMemoryUsage (void) {
return (gANDOperationMapSize * (uint32_t) (sizeof (uint32_t) + sizeof (uint64_t))) / 1000000 ;
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

void releaseANDOperationCache (void) {
gANDOperationCacheMapUsedEntryCount = 0 ;
Expand All @@ -72,7 +72,7 @@ void releaseANDOperationCache (void) {
gANDOperationCacheExpandable = true ;
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

void clearANDOperationCache (void) {
gANDOperationCacheMapUsedEntryCount = 0 ;
Expand All @@ -81,7 +81,7 @@ void clearANDOperationCache (void) {
}
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

static inline uint64_t getOperands (const uint32_t inOperand1,
const uint32_t inOperand2) {
Expand All @@ -91,7 +91,7 @@ static inline uint64_t getOperands (const uint32_t inOperand1,
return operands ;
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

static bool searchInANDOperationCache (const uint32_t inOperand1,
const uint32_t inOperand2,
Expand Down Expand Up @@ -121,7 +121,7 @@ static bool searchInANDOperationCache (const uint32_t inOperand1,
return found ;
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

static void reallocANDOperationCache (const uint32_t inNewSize) {
if (0 < inNewSize) {
Expand Down Expand Up @@ -156,7 +156,7 @@ static void reallocANDOperationCache (const uint32_t inNewSize) {
}
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

static void enterInANDOperationCache (const uint32_t inOperand1,
const uint32_t inOperand2,
Expand Down Expand Up @@ -200,7 +200,7 @@ static void enterInANDOperationCache (const uint32_t inOperand1,
}
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

void C_BDD::setANDOperationCacheMaxSize (const uint32_t inPowerOfTwo) {
gANDOperationCacheMaxPowerOfTwoSize = inPowerOfTwo ;
Expand All @@ -209,17 +209,17 @@ void C_BDD::setANDOperationCacheMaxSize (const uint32_t inPowerOfTwo) {
}
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

#ifdef PRAGMA_MARK_ALLOWED
#pragma mark AND operation
#endif

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*
// *
// Operation AND *
// *
//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

uint32_t internalANDoperation (const uint32_t opf,
const uint32_t opg) {
Expand Down Expand Up @@ -278,4 +278,4 @@ uint32_t internalANDoperation (const uint32_t opf,
return result ;
}

//---------------------------------------------------------------------------------------------------------------------*
//—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*

0 comments on commit 7aa3bbc

Please sign in to comment.