Files
psat/ncnf.h
gothictomato 53a580d0ec CSFLOC rewrite
Signed-off-by: gothictomato <gothictomato@pm.me>
2022-09-04 10:52:28 -04:00

30 lines
610 B
C

#pragma once
#include "types.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#define CHECK(X, Y) if (X == NULL) { \
printf(Y); \
return NULL; \
}
typedef struct {
u32 cnts[3]; // { varcnt, clausecnt }
u32* clausedat; // { ind, len, jval }
u32* index;
u32* variables;
u8* parities;
} cnf;
cnf* readDIMACS(char* path);
void printcnf(cnf* c);
void sortlastnum(cnf* c);
void freecnf(cnf* c);
/* -mavx2 -O3 -ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts -ftree-vectorize -ftracer -funroll-all-loops
*
*/