blob: 1f8711c2a783ccebcdee973b3a3b4ce673454b50 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#include <inttypes.h>
#include <stdarg.h>
#include <stdbool.h>
#include <string.h>
void (*nissy_log)(const char *, ...);
#define LOG(...) if (nissy_log != NULL) nissy_log(__VA_ARGS__);
#ifdef DEBUG
#define _static
#define _static_inline
#define DBG_WARN(condition, ...) if (!(condition)) LOG(__VA_ARGS__);
#define DBG_ASSERT(condition, retval, ...) \
if (!(condition)) { LOG(__VA_ARGS__); return retval; }
#else
#define _static static
#define _static_inline static inline
#define DBG_WARN(condition, ...)
#define DBG_ASSERT(condition, retval, ...)
#endif
#include "constants.h"
#include "utils.h"
#if defined(CUBE_AVX2)
#include <immintrin.h>
#include "cube_avx2.h"
#elif defined(CUBE_NEON)
#include "cube_neon.h"
#else
#include <stdlib.h> /* TODO: check if can be removed */
#include "cube_portable.h"
#endif
#include "io_move_trans.h"
#include "constant_cubes.h"
#include "cube_generic.h"
#include "io_cube.h"
/* TODO: work in progress */
#if 0
#include "constant_cubes_transform.h"
#include "cube_transform.h"
#else
#include "cube_transform_with_switch.h"
#endif
#include "moves.h"
#include "solve_h48.h"
#include "solve_generic.h"
#include "cube_public.h"
|