ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
utilities.h File Reference
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "global.h"
Include dependency graph for utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WORD_ALIGNMENT_MASK   (sizeof (word) - 1)
 
#define W2RD_ALIGNMENT_MASK   (sizeof (w2rd) - 1)
 
#define WORD_FORMAT   PRIuPTR
 
#define MAX_SIZE_T   (~(size_t) 0)
 
#define ASSUMED_LD_CACHE_LINE_BYTES   7u
 
#define SWAP(TYPE, A, B)
 
#define MIN(A, B)
 
#define MAX(A, B)
 
#define ABS(A)
 

Functions

bool kissat_has_suffix (const char *str, const char *suffix)
 

Variables

ABC_NAMESPACE_HEADER_START typedef uintptr_t w2rd [2]
 

Macro Definition Documentation

◆ ABS

#define ABS ( A)
Value:
(KISSAT_assert ((int) (A) != INT_MIN), (A) < 0 ? -(A) : (A))
#define KISSAT_assert(ignore)
Definition global.h:13

Definition at line 162 of file utilities.h.

◆ ASSUMED_LD_CACHE_LINE_BYTES

#define ASSUMED_LD_CACHE_LINE_BYTES   7u

Definition at line 47 of file utilities.h.

◆ MAX

#define MAX ( A,
B )
Value:
((A) < (B) ? (B) : (A))

Definition at line 160 of file utilities.h.

◆ MAX_SIZE_T

#define MAX_SIZE_T   (~(size_t) 0)

Definition at line 45 of file utilities.h.

◆ MIN

#define MIN ( A,
B )
Value:
((A) > (B) ? (B) : (A))

Definition at line 158 of file utilities.h.

◆ SWAP

#define SWAP ( TYPE,
A,
B )
Value:
do { \
TYPE TMP_SWAP = (A); \
(A) = (B); \
(B) = (TMP_SWAP); \
} while (0)
@ TYPE
Definition inflate.h:34

Definition at line 151 of file utilities.h.

151#define SWAP(TYPE, A, B) \
152 do { \
153 TYPE TMP_SWAP = (A); \
154 (A) = (B); \
155 (B) = (TMP_SWAP); \
156 } while (0)

◆ W2RD_ALIGNMENT_MASK

#define W2RD_ALIGNMENT_MASK   (sizeof (w2rd) - 1)

Definition at line 41 of file utilities.h.

◆ WORD_ALIGNMENT_MASK

#define WORD_ALIGNMENT_MASK   (sizeof (word) - 1)

Definition at line 40 of file utilities.h.

◆ WORD_FORMAT

#define WORD_FORMAT   PRIuPTR

Definition at line 43 of file utilities.h.

Function Documentation

◆ kissat_has_suffix()

bool kissat_has_suffix ( const char * str,
const char * suffix )

Definition at line 7 of file utilities.c.

7 {
8 const char *p = str;
9 while (*p)
10 p++;
11 const char *q = suffix;
12 while (*q)
13 q++;
14 while (p > str && q > suffix)
15 if (*--p != *--q)
16 return false;
17 return q == suffix;
18}
Cube * p
Definition exorList.c:222

Variable Documentation

◆ w2rd

ABC_NAMESPACE_HEADER_START typedef uintptr_t w2rd[2]

Definition at line 38 of file utilities.h.