-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.hpp
56 lines (47 loc) · 1.39 KB
/
main.hpp
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
54
55
56
#ifndef MAIN_HPP
#define MAIN_HPP
#define AUTHOR "William Thenaers"
#define VERSION "0.0.1.5"
#if 0 // Disable for proper building with makefile
/*
* Targets will be set through makefile,
* or enforced here.
*/
// Create target code for encoding
#ifndef ENCODER
#define ENCODER
#endif
// Create target code for decoding
#ifndef DECODER
#define DECODER
#endif
/**
* Compress the encoded image further with Huffman encoding.
* Decoding will always check for Huffman and deco;press if needed.
*/
#ifndef ENABLE_HUFFMAN
#define ENABLE_HUFFMAN
#endif
/**
* Enable OpenMP.
*/
#ifndef ENABLE_OPENMP
#define ENABLE_OPENMP
#endif
#endif // Makefile disable
/**
* Enable OpenMP to parallelise Block operations.
* Only available if linked with -fopenmp.
* Use `-DENABLE_OPENMP` in the makefile to force using it.
* (I cannot seem to get it to work with the Qt .qbs file,
* but the makefile will set it.)
* Check version: If lower than 4.0 (201511), don't attempt to use it (looking at you MSVC).
*/
#if defined(ENABLE_OPENMP) && defined(_OPENMP) && _OPENMP >= 201511u
#include "omp.h"
#else
#undef ENABLE_OPENMP
#endif
//#define LOG_OFF ///< Force logging off
//#define LOG_LOCAL ///< Enable Block-level logging (a lot of overhead, use sparingly)
#endif // MAIN_HPP