Chombo + EB + MF  3.2
CH_config.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _CH_CONFIG_H_
12 #define _CH_CONFIG_H_
13 
14 /*--------------------------------------------------------------------*
15  * System characteristics
16  *--------------------------------------------------------------------*/
17 
18 //--Methods for allocating aligned memory
19 
20 // Defined if memory allocation can be aligned
21 #undef CHDEF_SYSTEM_HAVE_ALIGNEDALLOC
22 // Defined if posix_memalign is used to allocate aligned memory
23 #undef CHDEF_SYSTEM_HAVE_POSIXMEMALIGN
24 
25 //--Cache line size
26 
27 // Line size reported in bytes (the default guess is 64 and we only know it for
28 // sure if a method is also defined)
29 #define CHDEF_SYSTEM_CACHELINESIZE 64
30 // Defined if cache information determined through a system file
31 #undef CHDEF_SYSTEM_HAVE_CACHEINFOFILE
32 // Defined if cache information determined through a call to sysconf
33 #undef CHDEF_SYSTEM_HAVE_CACHESYSCONF
34 
35 //--X86 vector extensions
36 
37 // Warning: Your program possibly won't compile unless the right instruction
38 // sets are enabled for the compiler (for GNU and Intel, these usually look
39 // like -msse, -msse2, -msse3 -mssse3, -msse4.1, -msse4.2, -msse4a, and -mavx)
40 // We plan to make this automatic later. Default settings for most compilers
41 // on modern (i.e., 64 bit) machines are usually around sse3 (as of 2011).
42 
43 // Available vector extensions are indicated by the bits set in
44 // 'CHDEF_SYSTEM_X86VECEXT_CPU_BITS' and 'CHDEF_SYSTEM_X86VECEXT_COMPILER_BITS'.
45 // The former indicates what the CPU supports and the latter which extensions
46 // have intrinsics defined that work with the compiler/system
47 #define CHDEF_BIT_SSE (1 << 0)
48 #define CHDEF_BIT_SSE2 (1 << 1)
49 #define CHDEF_BIT_SSE3 (1 << 2)
50 #define CHDEF_BIT_SSSE3 (1 << 3)
51 #define CHDEF_BIT_SSE4D1 (1 << 4)
52 #define CHDEF_BIT_SSE4D2 (1 << 5)
53 #define CHDEF_BIT_SSE4A (1 << 6)
54 #define CHDEF_BIT_AVX (1 << 7)
55 #define CHDEF_BIT_FMA (1 << 8)
56 #define CHDEF_BIT_AVX2 (1 << 9)
57 #define CHDEF_BIT_TSXHLE (1 << 10) /* Unsupported */
58 #define CHDEF_BIT_TSXRTM (1 << 11) /* Unsupported */
59 #define CHDEF_BIT_AVX512F (1 << 12) /* AVX512 foundation */
60 #define CHDEF_BIT_AVX512CD (1 << 13) /* Unsupported */
61 #define CHDEF_BIT_AVX512CD (1 << 13) /* Unsupported */
62 #define CHDEF_BIT_AVX512DQ (1 << 14) /* Unsupported */
63 #define CHDEF_BIT_AVX512BW (1 << 15) /* Unsupported */
64 #define CHDEF_BIT_AVX512FMA (1 << 16) /* Unsupported */
65 #define CHDEF_BIT_AVX512VBMI (1 << 17) /* Unsupported */
66 #define CHDEF_SYSTEM_X86VECEXT_CPU_BITS 0
67 #define CHDEF_SYSTEM_X86VECEXT_COMPILER_BITS 0
68 
69 // For each extension that works with the compiler, these are the header files
70 // to use.
71 #undef CHDEF_SYSTEM_X86VECEXT_SSE_H
72 #undef CHDEF_SYSTEM_X86VECEXT_SSE2_H
73 #undef CHDEF_SYSTEM_X86VECEXT_SSE3_H
74 #undef CHDEF_SYSTEM_X86VECEXT_SSSE3_H
75 #undef CHDEF_SYSTEM_X86VECEXT_SSE4D1_H
76 #undef CHDEF_SYSTEM_X86VECEXT_SSE4D2_H
77 #undef CHDEF_SYSTEM_X86VECEXT_SSE4A_H
78 #undef CHDEF_SYSTEM_X86VECEXT_AVX_H
79 #undef CHDEF_SYSTEM_X86VECEXT_FMA_H
80 #undef CHDEF_SYSTEM_X86VECEXT_AVX2_H
81 #undef CHDEF_SYSTEM_X86VECEXT_AVX512F_H
82 // This header, if defined, can be used generally for all extensions supported
83 // by Intel (basically everything except sse4a). It's usually <immintrin.h>.
84 #undef CHDEF_SYSTEM_X86VECEXT_INTEL_H
85 
86 // Defined if operators were found to work ('+' is tested for all of sse, sse2,
87 // avx, and avx2 that are available as indicated by the compiler bits)
88 #undef CHDEF_SYSTEM_X86VECEXT_HAVE_OPERATOR
89 
90 //--How to do a popcnt
91 
92 // Warning: Your program possibly won't compile unless the right instruction
93 // sets are enabled for the compiler (for GNU and Intel, this is -mpopcnt)
94 // We plan to make this automatic later.
95 
96 // Type of method 0 = software, 1 = GNU x86 assembly
97 #define CHDEF_SYSTEM_POPCNT_METHOD 0
98 
99 //--CUDA capable GPU
100 
101 // Information about CUDA and GPU installation
102 // The driver version is parsed as DV/1000 << '.' << (DV%100)/10
103 #undef CHDEF_SYSTEM_CUDA_DRIVER_VERSION
104 #undef CHDEF_SYSTEM_CUDA_DEVICE_NAME
105 #undef CHDEF_SYSTEM_CUDA_COMPUTE_CAPABILITY
106 // GPU CUDA attributes (all memory is in bytes)
107 #undef CHDEF_SYSTEM_CUDAATTR_TOTAL_GLOBAL_MEMORY
108 #undef CHDEF_SYSTEM_CUDAATTR_MULTIPROCESSOR_COUNT
109 #undef CHDEF_SYSTEM_CUDAATTR_TOTAL_CONSTANT_MEMORY
110 #undef CHDEF_SYSTEM_CUDAATTR_MAX_SHARED_MEMORY_PER_BLOCK
111 #undef CHDEF_SYSTEM_CUDAATTR_MAX_REGISTERS_PER_BLOCK
112 #undef CHDEF_SYSTEM_CUDAATTR_WARP_SIZE
113 #undef CHDEF_SYSTEM_CUDAATTR_MAX_THREADS_PER_MULTIPROCESSOR
114 #undef CHDEF_SYSTEM_CUDAATTR_MAX_THREADS_PER_BLOCK
115 #undef CHDEF_SYSTEM_CUDAATTR_MAX_BLOCK_DIM_X
116 #undef CHDEF_SYSTEM_CUDAATTR_MAX_BLOCK_DIM_Y
117 #undef CHDEF_SYSTEM_CUDAATTR_MAX_BLOCK_DIM_Z
118 #undef CHDEF_SYSTEM_CUDAATTR_MAX_GRID_DIM_X
119 #undef CHDEF_SYSTEM_CUDAATTR_MAX_GRID_DIM_Y
120 #undef CHDEF_SYSTEM_CUDAATTR_MAX_GRID_DIM_Z
121 
122 #endif