From 07bf95f48019dd5472ffffbd32587879e1bcbb9f Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 13 Sep 2020 19:17:16 -0700 Subject: Experiments with iterative synthesis. --- src/misc/vec/vecInt.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/misc') diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 01fb3175..5e545698 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -1277,6 +1277,26 @@ static inline int Vec_IntCountZero( Vec_Int_t * p ) return Counter; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Vec_IntAddPositive( Vec_Int_t * p ) +{ + int i, Counter = 0; + for ( i = 0; i < p->nSize; i++ ) + if ( p->pArray[i] > 0 ) + Counter += p->pArray[i]; + return Counter; +} + /**Function************************************************************* Synopsis [Checks if two vectors are equal.] -- cgit v1.2.3