Chombo + EB  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_SYSTEM_X86VECEXT_CPU_BITS 0
58 #define CHDEF_SYSTEM_X86VECEXT_COMPILER_BITS 0
59 
60 // For each extension that works with the compiler, these are the header files
61 // to use.
62 #undef CHDEF_SYSTEM_X86VECEXT_SSE_H
63 #undef CHDEF_SYSTEM_X86VECEXT_SSE2_H
64 #undef CHDEF_SYSTEM_X86VECEXT_SSE3_H
65 #undef CHDEF_SYSTEM_X86VECEXT_SSSE3_H
66 #undef CHDEF_SYSTEM_X86VECEXT_SSE4D1_H
67 #undef CHDEF_SYSTEM_X86VECEXT_SSE4D2_H
68 #undef CHDEF_SYSTEM_X86VECEXT_SSE4A_H
69 #undef CHDEF_SYSTEM_X86VECEXT_AVX_H
70 #undef CHDEF_SYSTEM_X86VECEXT_FMA_H
71 #undef CHDEF_SYSTEM_X86VECEXT_AVX2_H
72 // This header, if defined, can be used generally for all extensions supported
73 // by Intel (basically everything except sse4a). It's usually <immintrin.h>.
74 #undef CHDEF_SYSTEM_X86VECEXT_INTEL_H
75 
76 // Defined if operators were found to work ('+' is tested for all of sse, sse2,
77 // avx, and avx2 that are available as indicated by the compiler bits)
78 #undef CHDEF_SYSTEM_X86VECEXT_HAVE_OPERATOR
79 
80 //--How to do a popcnt
81 
82 // Warning: Your program possibly won't compile unless the right instruction
83 // sets are enabled for the compiler (for GNU and Intel, this is -mpopcnt)
84 // We plan to make this automatic later.
85 
86 // Type of method 0 = software, 1 = GNU x86 assembly
87 #define CHDEF_SYSTEM_POPCNT_METHOD 0
88 
89 //--CUDA capable GPU
90 
91 // Information about CUDA and GPU installation
92 // The driver version is parsed as DV/1000 << '.' << (DV%100)/10
93 #undef CHDEF_SYSTEM_CUDA_DRIVER_VERSION
94 #undef CHDEF_SYSTEM_CUDA_DEVICE_NAME
95 #undef CHDEF_SYSTEM_CUDA_COMPUTE_CAPABILITY
96 // GPU CUDA attributes (all memory is in bytes)
97 #undef CHDEF_SYSTEM_CUDAATTR_TOTAL_GLOBAL_MEMORY
98 #undef CHDEF_SYSTEM_CUDAATTR_MULTIPROCESSOR_COUNT
99 #undef CHDEF_SYSTEM_CUDAATTR_TOTAL_CONSTANT_MEMORY
100 #undef CHDEF_SYSTEM_CUDAATTR_MAX_SHARED_MEMORY_PER_BLOCK
101 #undef CHDEF_SYSTEM_CUDAATTR_MAX_REGISTERS_PER_BLOCK
102 #undef CHDEF_SYSTEM_CUDAATTR_WARP_SIZE
103 #undef CHDEF_SYSTEM_CUDAATTR_MAX_THREADS_PER_MULTIPROCESSOR
104 #undef CHDEF_SYSTEM_CUDAATTR_MAX_THREADS_PER_BLOCK
105 #undef CHDEF_SYSTEM_CUDAATTR_MAX_BLOCK_DIM_X
106 #undef CHDEF_SYSTEM_CUDAATTR_MAX_BLOCK_DIM_Y
107 #undef CHDEF_SYSTEM_CUDAATTR_MAX_BLOCK_DIM_Z
108 #undef CHDEF_SYSTEM_CUDAATTR_MAX_GRID_DIM_X
109 #undef CHDEF_SYSTEM_CUDAATTR_MAX_GRID_DIM_Y
110 #undef CHDEF_SYSTEM_CUDAATTR_MAX_GRID_DIM_Z
111 
112 #endif