This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathwb.h
166 lines (138 loc) · 4.81 KB
/
wb.h
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#ifndef __WB_H__
#define __WB_H__
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef _MSC_VER
// set minimal warning level
#pragma warning(push, 0)
// some warnings still occur at this level
// if necessary, disable specific warnings not covered by previous pragma
#pragma warning( \
disable : 4244 4056 4305 4800 4267 4996 4756 4661 4385 4101 4800)
#define NOMINMAX // do not define min/max in the standard headers
#define __func__ __FUNCTION__
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS 1
#endif /* _CRT_SECURE_NO_WARNINGS */
#define _CRT_SECURE_NO_DEPRECATE 1
#define _CRT_NONSTDC_NO_DEPRECATE 1
#include <direct.h>
#include <io.h>
#include <windows.h>
#define WB_USE_WINDOWS
#else /* _MSC_VER */
#include <stdint.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#define WB_USE_UNIX
#ifdef __APPLE__
#include <mach/mach_time.h>
#define WB_USE_DARWIN
#else /* __APPLE__ */
#define WB_USE_LINUX
#endif /* __APPLE__ */
#endif /* _MSC_VER */
#define wbStmt(stmt) stmt
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
#define wbLine __LINE__
#define wbFile __FILE__
#define wbFunction __func__
#define wbExit() \
wbAssert(0); \
exit(1)
#ifdef JSON_OUTPUT
#ifdef WB_USE_COURSERA
#define wbLogger_printOnExit 1
#else /* WB_USE_COURSERA */
#define wbLogger_printOnLog 1
#endif /* WB_USE_COURSERA */
#endif /* JSON_OUTPUT */
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
#ifdef __cplusplus
#define EXTERN_C extern "C"
#define START_EXTERN_C EXTERN_C {
#define END_EXTERN_C }
#else
#define EXTERN_C
#define START_EXTERN_C
#define END_EXTERN_C
#endif /* __cplusplus */
/***********************************************************/
/***********************************************************/
/***********************************************************/
#ifndef WB_USE_JSON11
#define WB_USE_JSON11 1
#endif /* WB_USE_JSON11 */
#if 1 || WB_USE_JSON11
#include "vendor/json11.hpp"
#endif /* WB_USE_JSON11 */
/***********************************************************/
/***********************************************************/
/***********************************************************/
#define LAZY_FILE_LOAD
extern char *solutionJSON;
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
#ifdef WB_USE_OPENCL
#ifdef WB_USE_DARWIN
#include <OpenCL/opencl.h>
#else /* WB_USE_DARWIN */
#include <CL/cl.h>
#endif /* WB_USE_DARWIN */
#endif /* WB_USE_OPENCL */
#include "wbTypes.h"
#include "wbAssert.h"
#include "wbMalloc.h"
#include "wbString.h"
#include "wbUtils.h"
#include "wbArg.h"
#include "wbCUDA.h"
#include "wbCast.h"
#include "wbComparator.h"
#include "wbDirectory.h"
#include "wbExit.h"
#include "wbExport.h"
#include "wbFile.h"
#include "wbImage.h"
#include "wbImport.h"
#include "wbInit.h"
#include "wbLogger.h"
#include "wbMD5.h"
#include "wbMPI.h"
#include "wbSolution.h"
#include "wbSort.h"
#include "wbSparse.h"
#include "wbThrust.h"
#include "wbTimer.h"
#include "wbPath.h"
#include "wbDataset.h"
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/
#endif /* __WB_H__ */