Compare commits

..

No commits in common. "1202ae89a5e4edd3a26d94aaf99387a664dabdc6" and "fc9fc1a04858998d3c6e96cbe473f2dbd62b6eb3" have entirely different histories.

3 changed files with 5 additions and 3 deletions

2
.cargo/config.toml Normal file
View File

@ -0,0 +1,2 @@
[build]
rustflags = ["-C", "target-cpu=native", "-C", "target-feature=+crt-static"]

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -e
clang -Weverything -Wno-unsafe-buffer-usage -Werror -O3 -march=native -flto -std=c17 -fstack-protector-all -s -o sudk_c "$1" clang -Wall -Wextra -Weverything -Werror -O3 -march=native -flto -std=c17 -fstack-protector-all -s -o sudk_c "$1"
time ./sudk_c time ./sudk_c

View File

@ -5,7 +5,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
static inline void Print_Clear(void) { printf("\x1b\x5b\x48\x1b\x5b\x32\x4a"); } static inline void Print_Clear() { printf("\x1b\x5b\x48\x1b\x5b\x32\x4a"); }
typedef struct Sudoku { typedef struct Sudoku {
uint8_t *field; uint8_t *field;
@ -258,7 +258,7 @@ static void Sudoku_Free(Sudoku *s) {
s = NULL; s = NULL;
} }
int main(void) { int main() {
Sudoku *s = Sudoku_New(3); Sudoku *s = Sudoku_New(3);
Sudoku_Print(s); Sudoku_Print(s);
Sudoku_SolveBacktracking(s); Sudoku_SolveBacktracking(s);