blob: 27d54b48fdec3f50d26f852c48d325e8a61cacac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
#ifdef DEBUG
#include <stdio.h>
#define _static
#define _static_inline
#define DBG_LOG(...) fprintf(stderr, __VA_ARGS__)
#define DBG_WARN(condition, ...) if (!(condition)) DBG_LOG(__VA_ARGS__);
#define DBG_ASSERT(condition, retval, ...) \
if (!(condition)) { \
DBG_LOG(__VA_ARGS__); \
return retval; \
}
#else
#define _static static
#define _static_inline static inline
#define DBG_LOG(...)
#define DBG_WARN(condition, ...)
#define DBG_ASSERT(condition, retval, ...)
#endif
#include "cube.h"
#include "constants.h"
#if defined(CUBE_AVX2)
#include <immintrin.h>
#include "cube_avx2.h"
#elif defined(CUBE_NEON)
#include "cube_neon.h"
#else
#include "cube_portable.h"
#endif
#include "cube_routines.h"
#include "moves.h"
#include "solve_h48.h"
#include "solve_generic.h"
|