summaryrefslogtreecommitdiff
path: root/lib/make/cctk_Config.h.in
blob: 9805c839c16333ba7781a50ff8b674a59467a89f (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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
#ifndef _CCTK_CONFIG_H_
#define _CCTK_CONFIG_H_

/* Define if your processor stores words with the most significant
   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
#undef WORDS_BIGENDIAN

/* Define if standard C headers are available. */
#undef STDC_HEADERS

/* Modifier for Fortran function definitions. */
#undef CCTK_FCALL

/* What debugging options to use */
#undef CCTK_DEBUG
#undef CCTK_TRACEMEMORY

/* Various library functions */
#undef HAVE_GETHOSTBYNAME
#undef HAVE_GETOPT_LONG_ONLY
#undef HAVE___CXA_DEMANGLE
#undef HAVE_DLADDR
#undef HAVE_BACKTRACE
#undef HAVE_BACKTRACE_SYMBOLS
#undef HAVE_CRYPT
#undef HAVE_FINITE
#undef HAVE_COPYSIGN
#undef HAVE_FPCLASSIFY
#undef HAVE_ISFINITE
#undef HAVE_ISINF
#undef HAVE_ISNAN
#undef HAVE_ISNORMAL
#undef HAVE_SIGNBIT
#undef HAVE_MKSTEMP
#undef HAVE_VA_COPY

/* Do we have mode_t ? */
#undef HAVE_MODE_T

/* Do we have SOCKET ? */
#undef HAVE_SOCKET_TYPE

/* Do we have socklen_t ? Default to 'int' if not. */
#undef HAVE_SOCKLEN_T
#ifdef HAVE_SOCKLEN_T
#  define CCTK_SOCKLEN_T socklen_t
#else
#  define CCTK_SOCKLEN_T int
#endif

/* Do we have hrtime_t ? */
#undef HAVE_HRTIME_T

/* Some timing functions */
#undef HAVE_GETHRTIME
#undef HAVE_READ_REAL_TIME
#undef HAVE_TIME_BASE_TO_TIME
#undef HAVE_CLOCK_GETTIME
#undef HAVE_MACH_ABSOLUTE_TIME

/* Cray UNICOS _rtc() (real-time clock) intrinsic */
#undef HAVE__RTC

/* Some include things */
#undef HAVE_TIME_H
#undef HAVE_SYS_FILIO_H
#undef HAVE_SYS_IOCTL_H
#undef HAVE_SYS_SOCKET_H
#undef HAVE_SYS_TIME_H
#undef HAVE_SYS_TYPES_H
#undef HAVE_UNISTD_H
#undef HAVE_STRING_H
#undef HAVE_ASSERT_H
#undef HAVE_TGMATH_H
#undef HAVE_SYS_STAT_H
#undef HAVE_GETOPT_H
#undef HAVE_REGEX_H
#undef HAVE_NETINET_IN_H
#undef HAVE_NETDB_H
#undef HAVE_ARPA_INET_H
#undef HAVE_WINSOCK2_H
#undef HAVE_CRYPT_H
#undef HAVE_DIRENT_H
#undef HAVE_C_ASM_H
#undef HAVE_INTRINSICS_H
#undef HAVE_MACH_MACH_TIME_H
#undef HAVE_SIGNAL_H
#undef HAVE_MALLOC_H
#undef HAVE_MALLINFO
#undef HAVE_MALLOPT
#undef HAVE_M_MMAP_THRESHOLD_VALUE
#undef HAVE_SCHED_H
#undef HAVE_EXECINFO_H
#undef HAVE_SCHED_GETAFFINITY
#undef HAVE_GETPID

#undef TIME_WITH_SYS_TIME

/* Which format does the C++ STL on this machine provide. */
#undef HAVE_VECTOR
#undef HAVE_VECTOR_H

/* Timing stuff */
#undef HAVE_TIME_GETTIMEOFDAY
#undef GETTIMEOFDAY_NEEDS_TIMEZONE
#undef HAVE_TIME_GETRUSAGE
#undef HAVE_TIME__FTIME

/* Cache stuff */
#undef CCTK_CACHELINE_BYTES
#undef CCTK_CACHE_SIZE

/* The name of the NULL device for redirecting things to */
#undef NULL_DEVICE

/* Define the machine architecture for the build */
#undef CCTK_BUILD_OS
#undef CCTK_BUILD_CPU
#undef CCTK_BUILD_VENDOR

/******************************************************************************/

/* Size info for various datatypes */
#undef SIZEOF_SHORT_INT
#undef SIZEOF_INT
#undef SIZEOF_LONG_INT
#undef SIZEOF_LONG_LONG
#undef SIZEOF_LONG_DOUBLE
#undef SIZEOF_DOUBLE
#undef SIZEOF_FLOAT
#undef SIZEOF_CHAR_P

/* The chosen CCTK precision */

/* Floating point precision */
#undef CCTK_REAL_PRECISION_16
#undef CCTK_REAL_PRECISION_8
#undef CCTK_REAL_PRECISION_4

/* Integer precision */
#undef CCTK_INTEGER_PRECISION_8
#undef CCTK_INTEGER_PRECISION_4
#undef CCTK_INTEGER_PRECISION_2
#undef CCTK_INTEGER_PRECISION_1

/* Integer sizes */
#undef HAVE_CCTK_INT8
#undef HAVE_CCTK_INT4
#undef HAVE_CCTK_INT2
#undef HAVE_CCTK_INT1

/* Float sizes */
#undef HAVE_CCTK_REAL16
#undef HAVE_CCTK_REAL8
#undef HAVE_CCTK_REAL4

/******************************************************************************/

#ifdef CCODE

/* CCTK C/C++ Integer datatypes */
#undef CCTK_INT8
#undef CCTK_INT4
#undef CCTK_INT2
#undef CCTK_INT1

/* CCTK C/C++ Float datatypes */
#undef CCTK_REAL16
#undef CCTK_REAL8
#undef CCTK_REAL4

/* Disable 'restrict' for compiler versions known to be buggy */
# if (defined __INTEL_COMPILER                && \
      __INTEL_COMPILER_BUILD_DATE >= 20121010 && \
      __INTEL_COMPILER_BUILD_DATE <= 20130313 && \
      !defined CCTK_INTEL_COMPILER_DONT_DISABLE_RESTRICT )
  #define CCTK_DISABLE_RESTRICT 1
#endif

/****************************************************************************/
/* C specific stuff */
/****************************************************************************/
#ifndef __cplusplus

/* Define to empty if the 'inline' keyword does not work. */
#undef HAVE_CCTK_C_INLINE
#undef inline

/* Define to 'static' if the 'static inline' keyword combination does
   not work. */
#undef CCTK_C_STATIC_INLINE
#define CCTK_STATIC_INLINE CCTK_C_STATIC_INLINE

/* Define to empty if the 'const' keyword does not work. */
#undef const

/* Define to empty if the 'restrict' keyword does not work. */
#ifdef CCTK_DISABLE_RESTRICT
#  define CCTK_C_RESTRICT
#else
#  undef HAVE_CCTK_C_RESTRICT
#  undef CCTK_C_RESTRICT
#endif

#ifdef CCTK_C_RESTRICT
#  define restrict CCTK_C_RESTRICT
#endif

/* Allow the use of CCTK_RESTRICT as a qualifier always. */
#ifdef CCTK_C_RESTRICT
#  define CCTK_RESTRICT CCTK_C_RESTRICT
#else
#  define CCTK_RESTRICT restrict
#endif

/* Disable _Pragma if unsupported */
#undef HAVE_CCTK_C__PRAGMA
#ifndef HAVE_CCTK_C__PRAGMA
#  define _Pragma(x)
#endif

/* Some C compilers (e.g. C99 ones) define bool */
#undef HAVE_CCTK_C_BOOL

/* deprecated in beta15 */
#ifdef HAVE_CCTK_C_BOOL
#  define CCTK_HAVE_C_BOOL
#endif

/* Since this is non-standard leave commented out for the moment */
#if 0
#ifndef HAVE_CCTK_C_BOOL
typedef enum {false, true} bool;
#endif /* HAVE_CCTK_C_BOOL */
#endif

/* Whether copysign exists, and how it should be called */
#ifdef HAVE_COPYSIGN
#  define HAVE_CCTK_C_COPYSIGN HAVE_COPYSIGN
#  define CCTK_C_COPYSIGN copysign
#  define HAVE_CCTK_COPYSIGN HAVE_CCTK_C_COPYSIGN
#  define CCTK_COPYSIGN CCTK_C_COPYSIGN
#endif

/* Whether fpclassify exists, and how it should be called */
#ifdef HAVE_FPCLASSIFY
#  define HAVE_CCTK_C_FPCLASSIFY HAVE_FPCLASSIFY
#  define CCTK_C_FPCLASSIFY fpclassify
#  define HAVE_CCTK_FPCLASSIFY HAVE_CCTK_C_FPCLASSIFY
#  define CCTK_FPCLASSIFY CCTK_C_FPCLASSIFY
#endif

/* Whether isfinite exists, and how it should be called */
#ifdef HAVE_ISFINITE
#  define HAVE_CCTK_C_ISFINITE HAVE_ISFINITE
#  define CCTK_C_ISFINITE isfinite
#  define HAVE_CCTK_ISFINITE HAVE_CCTK_C_ISFINITE
#  define CCTK_ISFINITE CCTK_C_ISFINITE
#endif

/* Whether isinf exists, and how it should be called */
#ifdef HAVE_ISINF
#  define HAVE_CCTK_C_ISINF HAVE_ISINF
#  define CCTK_C_ISINF isinf
#  define HAVE_CCTK_ISINF HAVE_CCTK_C_ISINF
#  define CCTK_ISINF CCTK_C_ISINF
#endif

/* Whether isnan exists, and how it should be called */
#ifdef HAVE_ISNAN
#  define HAVE_CCTK_C_ISNAN HAVE_ISNAN
#  define CCTK_C_ISNAN isnan
#  define HAVE_CCTK_ISNAN HAVE_CCTK_C_ISNAN
#  define CCTK_ISNAN CCTK_C_ISNAN
#endif

/* Whether isnormal exists, and how it should be called */
#ifdef HAVE_ISNORMAL
#  define HAVE_CCTK_C_ISNORMAL HAVE_ISNORMAL
#  define CCTK_C_ISNORMAL isnormal
#  define HAVE_CCTK_ISNORMAL HAVE_CCTK_C_ISNORMAL
#  define CCTK_ISNORMAL CCTK_C_ISNORMAL
#endif

/* Whether signbit exists, and how it should be called */
#ifdef HAVE_SIGNBIT
#  define HAVE_CCTK_C_SIGNBIT HAVE_SIGNBIT
#  define CCTK_C_SIGNBIT signbit
#  define HAVE_CCTK_SIGNBIT HAVE_CCTK_C_SIGNBIT
#  define CCTK_SIGNBIT CCTK_C_SIGNBIT
#endif

/* Whether __attribute__((const)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_CONST
#ifdef HAVE_CCTK_C_ATTRIBUTE_CONST
#  define CCTK_ATTRIBUTE_CONST __attribute__((__const__))
#else
#  define CCTK_ATTRIBUTE_CONST
#endif

/* Whether __attribute__((pure)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_PURE
#ifdef HAVE_CCTK_C_ATTRIBUTE_PURE
#  define CCTK_ATTRIBUTE_PURE __attribute__((__pure__))
#else
#  define CCTK_ATTRIBUTE_PURE
#endif

/* Whether __attribute__((noinline)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_NOINLINE
#ifdef HAVE_CCTK_C_ATTRIBUTE_NOINLINE
#  define CCTK_ATTRIBUTE_NOINLINE __attribute__((__noinline__))
#else
#  define CCTK_ATTRIBUTE_NOINLINE
#endif

/* Whether __attribute__((always_inline)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_ALWAYS_INLINE
#ifdef HAVE_CCTK_C_ATTRIBUTE_ALWAYS_INLINE
#  define CCTK_ATTRIBUTE_ALWAYS_INLINE __attribute__((__always_inline__))
#else
#  define CCTK_ATTRIBUTE_ALWAYS_INLINE
#endif

/* Whether __attribute__((unused)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_UNUSED
#ifdef HAVE_CCTK_C_ATTRIBUTE_UNUSED
#  define CCTK_ATTRIBUTE_UNUSED __attribute__((__unused__))
#else
#  define CCTK_ATTRIBUTE_UNUSED
#endif

/* Whether __attribute__((aligned(...))) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_ALIGNED
#ifdef HAVE_CCTK_C_ATTRIBUTE_ALIGNED
#  define CCTK_ATTRIBUTE_ALIGNED(x) __attribute__((__aligned__(x)))
#else
#  define CCTK_ATTRIBUTE_ALIGNED(x)
#endif

/* Whether __attribute__((cold)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_COLD
#ifdef HAVE_CCTK_C_ATTRIBUTE_COLD
#  define CCTK_ATTRIBUTE_COLD __attribute__((__cold__))
#else
#  define CCTK_ATTRIBUTE_COLD
#endif

/* Whether __attribute__((hot)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_HOT
#ifdef HAVE_CCTK_C_ATTRIBUTE_HOT
#  define CCTK_ATTRIBUTE_HOT __attribute__((__hot__))
#else
#  define CCTK_ATTRIBUTE_HOT
#endif

/* Whether __attribute__((format(...))) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_FORMAT
#ifdef HAVE_CCTK_C_ATTRIBUTE_FORMAT
#  define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg) __attribute__((__format__(archetype, format, firstarg)))
#else
#  define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg)
#endif

/* Whether __attribute__((noreturn)) exists. */
#undef HAVE_CCTK_C_ATTRIBUTE_NORETURN
#ifdef HAVE_CCTK_C_ATTRIBUTE_NORETURN
#  define CCTK_ATTRIBUTE_NORETURN __attribute__((__noreturn__))
#else
#  define CCTK_ATTRIBUTE_NORETURN
#endif

/* Whether __builtin_expect exists. */
#undef HAVE_CCTK_C_BUILTIN_EXPECT
#ifdef HAVE_CCTK_C_BUILTIN_EXPECT
#  define CCTK_BUILTIN_EXPECT(x,y) __builtin_expect(x,y)
#else
#  define CCTK_BUILTIN_EXPECT(x,y) (x)
#endif

/* Whether __builtin_unreachable exists. */
#undef HAVE_CCTK_C_BUILTIN_UNREACHABLE
#ifdef HAVE_CCTK_C_BUILTIN_UNREACHABLE
#  define CCTK_BUILTIN_UNREACHABLE() __builtin_unreachable()
#else
#  define CCTK_BUILTIN_UNREACHABLE() CCTK_Abort(0, 1)
#endif

/* OpenMP collapse clause */
#if (defined CCTK_DISABLE_OMP_COLLAPSE ||                               \
     (defined __IBMC__ && defined _ARCH_450D) ||                        \
     (defined __INTEL_COMPILER && __INTEL_COMPILER_BUILD_DATE < 20100801))
/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */
#  define collapse(N)
#  ifndef CCTK_DISABLE_OMP_COLLAPSE
#    error "OpenMP collapse directive disabled for C, but enabled for Fortran -- likely an error in the option list"
#  endif
#else
#  undef collapse
#endif

#endif /* ! defined __cplusplus */
/****************************************************************************/

/****************************************************************************/
/* C++ specific stuff */
/****************************************************************************/
#ifdef __cplusplus

#define CCTK_STATIC_INLINE static inline

/* Some C++ compilers don't have bool */
#undef HAVE_CCTK_CXX_BOOL

#ifndef HAVE_CCTK_CXX_BOOL
typedef enum {false, true} bool;
#else
  /* deprecated in beta15 */
#  define CCTK_HAVE_CXX_BOOL
#endif

/* Whether copysign exists, and how it should be called */
#undef HAVE_CCTK_CXX_COPYSIGN
#undef CCTK_CXX_COPYSIGN
#ifdef HAVE_CCTK_CXX_COPYSIGN
#  define HAVE_CCTK_COPYSIGN HAVE_CCTK_CXX_COPYSIGN
#  define CCTK_COPYSIGN CCTK_CXX_COPYSIGN
#endif

/* Whether fpclassify exists, and how it should be called */
#undef HAVE_CCTK_CXX_FPCLASSIFY
#undef CCTK_CXX_FPCLASSIFY
#ifdef HAVE_CCTK_CXX_FPCLASSIFY
#  define HAVE_CCTK_FPCLASSIFY HAVE_CCTK_CXX_FPCLASSIFY
#  define CCTK_FPCLASSIFY CCTK_CXX_FPCLASSIFY
#endif

/* Whether isinf exists, and how it should be called */
#undef HAVE_CCTK_CXX_ISINF
#undef CCTK_CXX_ISINF
#ifdef HAVE_CCTK_CXX_ISINF
#  define HAVE_CCTK_ISINF HAVE_CCTK_CXX_ISINF
#  define CCTK_ISINF CCTK_CXX_ISINF
#endif

/* Whether isinf exists, and how it should be called */
#undef HAVE_CCTK_CXX_ISINF
#undef CCTK_CXX_ISINF
#ifdef HAVE_CCTK_CXX_ISINF
#  define HAVE_CCTK_ISINF HAVE_CCTK_CXX_ISINF
#  define CCTK_ISINF CCTK_CXX_ISINF
#endif

/* Whether isnan exists, and how it should be called */
#undef HAVE_CCTK_CXX_ISNAN
#undef CCTK_CXX_ISNAN
#ifdef HAVE_CCTK_CXX_ISNAN
#  define HAVE_CCTK_ISNAN HAVE_CCTK_CXX_ISNAN
#  define CCTK_ISNAN CCTK_CXX_ISNAN
#endif

/* Whether isnormal exists, and how it should be called */
#undef HAVE_CCTK_CXX_ISNORMAL
#undef CCTK_CXX_ISNORMAL
#ifdef HAVE_CCTK_CXX_ISNORMAL
#  define HAVE_CCTK_ISNORMAL HAVE_CCTK_CXX_ISNORMAL
#  define CCTK_ISNORMAL CCTK_CXX_ISNORMAL
#endif

/* Whether signbit exists, and how it should be called */
#undef HAVE_CCTK_CXX_SIGNBIT
#undef CCTK_CXX_SIGNBIT
#ifdef HAVE_CCTK_CXX_SIGNBIT
#  define HAVE_CCTK_SIGNBIT HAVE_CCTK_CXX_SIGNBIT
#  define CCTK_SIGNBIT CCTK_CXX_SIGNBIT
#endif

/* Whether __attribute__((const)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_CONST
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_CONST
#  define CCTK_ATTRIBUTE_CONST __attribute__((__const__))
#else
#  define CCTK_ATTRIBUTE_CONST
#endif
#undef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_CONST
#ifdef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_CONST
#  define CCTK_MEMBER_ATTRIBUTE_CONST __attribute__((__const__))
#else
#  define CCTK_MEMBER_ATTRIBUTE_CONST
#endif

/* Whether __attribute__((pure)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_PURE
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_PURE
#  define CCTK_ATTRIBUTE_PURE __attribute__((__pure__))
#else
#  define CCTK_ATTRIBUTE_PURE
#endif
#undef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_PURE
#ifdef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_PURE
#  define CCTK_MEMBER_ATTRIBUTE_PURE __attribute__((__pure__))
#else
#  define CCTK_MEMBER_ATTRIBUTE_PURE
#endif

/* Whether __attribute__((noinline)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_NOINLINE
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_NOINLINE
#  define CCTK_ATTRIBUTE_NOINLINE __attribute__((__noinline__))
#else
#  define CCTK_ATTRIBUTE_NOINLINE
#endif
#undef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_NOINLINE
#ifdef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_NOINLINE
#  define CCTK_MEMBER_ATTRIBUTE_NOINLINE __attribute__((__noinline__))
#else
#  define CCTK_MEMBER_ATTRIBUTE_NOINLINE
#endif

/* Whether __attribute__((always_inline)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_ALWAYS_INLINE
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_ALWAYS_INLINE
#  define CCTK_ATTRIBUTE_ALWAYS_INLINE __attribute__((__always_inline__))
#else
#  define CCTK_ATTRIBUTE_ALWAYS_INLINE
#endif
#undef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_ALWAYS_INLINE
#ifdef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_ALWAYS_INLINE
#  define CCTK_MEMBER_ATTRIBUTE_ALWAYS_INLINE __attribute__((__always_inline__))
#else
#  define CCTK_MEMBER_ATTRIBUTE_ALWAYS_INLINE
#endif

/* Whether __attribute__((unused)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_UNUSED
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_UNUSED
#  define CCTK_ATTRIBUTE_UNUSED __attribute__((__unused__))
#else
#  define CCTK_ATTRIBUTE_UNUSED
#endif

/* Whether __attribute__((aligned(...))) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_ALIGNED
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_ALIGNED
#  define CCTK_ATTRIBUTE_ALIGNED(x) __attribute__((__aligned__(x)))
#else
#  define CCTK_ATTRIBUTE_ALIGNED(x)
#endif

/* Whether __attribute__((cold)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_COLD
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_COLD
#  define CCTK_ATTRIBUTE_COLD __attribute__((__cold__))
#else
#  define CCTK_ATTRIBUTE_COLD
#endif

/* Whether __attribute__((hot)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_HOT
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_HOT
#  define CCTK_ATTRIBUTE_HOT __attribute__((__hot__))
#else
#  define CCTK_ATTRIBUTE_HOT
#endif

/* Whether __attribute__((format(...))) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_FORMAT
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_FORMAT
#  define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg) __attribute__((__format__(archetype, format, firstarg)))
#else
#  define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg)
#endif

/* Whether __attribute__((noreturn)) exists. */
#undef HAVE_CCTK_CXX_ATTRIBUTE_NORETURN
#ifdef HAVE_CCTK_CXX_ATTRIBUTE_NORETURN
#  define CCTK_ATTRIBUTE_NORETURN __attribute__((__noreturn__))
#else
#  define CCTK_ATTRIBUTE_NORETURN
#endif

/* Whether __builtin_expect exists. */
#undef HAVE_CCTK_CXX_BUILTIN_EXPECT
#ifdef HAVE_CCTK_CXX_BUILTIN_EXPECT
#  define CCTK_BUILTIN_EXPECT(x,y) __builtin_expect(x,y)
#else
#  define CCTK_BUILTIN_EXPECT(x,y) (x)
#endif

/* Whether __builtin_unreachable exists. */
#undef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE
#ifdef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE
#  define CCTK_BUILTIN_UNREACHABLE() __builtin_unreachable()
#else
#  define CCTK_BUILTIN_UNREACHABLE() CCTK_Abort(0, 1)
#endif

/* Some C++ compilers recognise the restrict keyword */
/* Define to empty if the keyword does not work. */
#ifdef CCTK_DISABLE_RESTRICT
#  define CCTK_CXX_RESTRICT
#else
#  undef HAVE_CCTK_CXX_RESTRICT
#  undef CCTK_CXX_RESTRICT
#endif

#ifdef CCTK_CXX_RESTRICT
#  define restrict CCTK_CXX_RESTRICT
#endif

/* Allow the use of CCTK_RESTRICT as a qualifier always. */
#ifdef CCTK_CXX_RESTRICT
#  define CCTK_RESTRICT CCTK_CXX_RESTRICT
#else
#  define CCTK_RESTRICT restrict
#endif

/* OpenMP collapse clause */
#if (defined CCTK_DISABLE_OMP_COLLAPSE ||                               \
     (defined __IBMCPP__ && defined _ARCH_450D) ||                      \
     ( defined __INTEL_COMPILER && __INTEL_COMPILER_BUILD_DATE < 20100801))
/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */
#  define collapse(N)
#else
#  undef collapse
#endif

#endif /* __cplusplus */

/****************************************************************************/

#endif /* CCODE */

#ifdef FCODE

#undef HAVE_CCTK_FORTRAN_REAL4
#undef HAVE_CCTK_FORTRAN_REAL8
#undef HAVE_CCTK_FORTRAN_REAL16

#undef HAVE_CCTK_FORTRAN_COMPLEX8
#undef HAVE_CCTK_FORTRAN_COMPLEX16
#undef HAVE_CCTK_FORTRAN_COMPLEX32

#undef CCTK_REAL16_KIND
#undef CCTK_COMPLEX32_KIND

/* OpenMP collapse clause */
#ifdef CCTK_DISABLE_OMP_COLLAPSE
/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */
#  define collapse(N)
#  define COLLAPSE(N)
#else
#  undef collapse
#  undef COLLAPSE
#endif

#endif /* FCODE */

/* Now include the code to pick an appropriate precison for reals and ints */
#include "cctk_Types.h"

/* Include any other stuff which is specific to this architecture */
#include "cctk_Archdefs.h"

/* Include any extra stuff from optional extra packages. */
#include "cctk_Extradefs.h"

#endif /* _CCTK_CONFIG_H_ */