]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - blis/config/mic/bli_config.h
TI Linear Algebra Library (LINALG) Rlease 1.0.0
[dense-linear-algebra-libraries/linalg.git] / blis / config / mic / bli_config.h
1 /*
3    BLIS    
4    An object-based framework for developing high-performance BLAS-like
5    libraries.
7    Copyright (C) 2014, The University of Texas at Austin
9    Redistribution and use in source and binary forms, with or without
10    modification, are permitted provided that the following conditions are
11    met:
12     - Redistributions of source code must retain the above copyright
13       notice, this list of conditions and the following disclaimer.
14     - Redistributions in binary form must reproduce the above copyright
15       notice, this list of conditions and the following disclaimer in the
16       documentation and/or other materials provided with the distribution.
17     - Neither the name of The University of Texas at Austin nor the names
18       of its contributors may be used to endorse or promote products
19       derived from this software without specific prior written permission.
21    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
35 #ifndef BLIS_CONFIG_H
36 #define BLIS_CONFIG_H
39 #define BLIS_TREE_BARRIER
40 #define BLIS_TREE_BARRIER_ARITY 4
42 #define BLIS_DGEMM_UKERNEL_PREFERS_CONTIG_ROWS
43 #define BLIS_ENABLE_MULTITHREADING
44 #define BLIS_ENABLE_OPENMP
46 // -- OPERATING SYSTEM ---------------------------------------------------------
50 // -- INTEGER PROPERTIES -------------------------------------------------------
52 // The bit size of the integer type used to track values such as dimensions,
53 // strides, diagonal offsets. A value of 32 results in BLIS using 32-bit signed
54 // integers while 64 results in 64-bit integers. Any other value results in use
55 // of the C99 type "long int". Note that this ONLY affects integers used
56 // internally within BLIS as well as those exposed in the native BLAS-like BLIS
57 // interface.
58 #define BLIS_INT_TYPE_SIZE               64
62 // -- FLOATING-POINT PROPERTIES ------------------------------------------------
64 // Define the number of floating-point types supported, and the size of the
65 // largest type.
66 #define BLIS_NUM_FP_TYPES                4
67 #define BLIS_MAX_TYPE_SIZE               sizeof(dcomplex)
69 // Enable use of built-in C99 "float complex" and "double complex" types and
70 // associated overloaded operations and functions? Disabling results in
71 // scomplex and dcomplex being defined in terms of simple structs.
72 //#define BLIS_ENABLE_C99_COMPLEX
76 // -- MULTITHREADING -----------------------------------------------------------
78 // The maximum number of BLIS threads that will run concurrently.
79 #define BLIS_MAX_NUM_THREADS             60
83 // -- MEMORY ALLOCATION --------------------------------------------------------
85 // -- Contiguous (static) memory allocator --
87 // The number of MC x KC, KC x NC, and MC x NC blocks to reserve in the
88 // contiguous memory pools.
89 #define BLIS_NUM_MC_X_KC_BLOCKS          BLIS_MAX_NUM_THREADS
90 #define BLIS_NUM_KC_X_NC_BLOCKS          1
91 #define BLIS_NUM_MC_X_NC_BLOCKS          0
93 // The maximum preload byte offset is used to pad the end of the contiguous
94 // memory pools so that the micro-kernel, when computing with the end of the
95 // last block, can exceed the bounds of the usable portion of the memory
96 // region without causing a segmentation fault.
97 #define BLIS_MAX_PRELOAD_BYTE_OFFSET     128
99 // -- Memory alignment --
101 // It is sometimes useful to define the various memory alignments in terms
102 // of some other characteristics of the system, such as the cache line size
103 // and the page size.
104 #define BLIS_CACHE_LINE_SIZE             256
105 #define BLIS_PAGE_SIZE                   4096
107 // Alignment size needed by the instruction set for aligned SIMD/vector
108 // instructions.
109 #define BLIS_SIMD_ALIGN_SIZE             32
111 // Alignment size used to align local stack buffers within macro-kernel
112 // functions.
113 #define BLIS_STACK_BUF_ALIGN_SIZE        BLIS_CACHE_LINE_SIZE
115 // Alignment size used when allocating memory dynamically from the operating
116 // system (eg: posix_memalign()). To disable heap alignment and just use
117 // malloc() instead, set this to 1.
118 #define BLIS_HEAP_ADDR_ALIGN_SIZE        BLIS_CACHE_LINE_SIZE
120 // Alignment size used when sizing leading dimensions of dynamically
121 // allocated memory.
122 #define BLIS_HEAP_STRIDE_ALIGN_SIZE      BLIS_CACHE_LINE_SIZE
124 // Alignment size used when allocating entire blocks of contiguous memory
125 // from the contiguous memory allocator.
126 #define BLIS_CONTIG_ADDR_ALIGN_SIZE      BLIS_PAGE_SIZE
130 // -- MIXED DATATYPE SUPPORT ---------------------------------------------------
132 // Basic (homogeneous) datatype support always enabled.
134 // Enable mixed domain operations?
135 //#define BLIS_ENABLE_MIXED_DOMAIN_SUPPORT
137 // Enable extra mixed precision operations?
138 //#define BLIS_ENABLE_MIXED_PRECISION_SUPPORT
142 // -- MISCELLANEOUS OPTIONS ----------------------------------------------------
144 // Stay initialized after auto-initialization, unless and until the user
145 // explicitly calls bli_finalize().
146 #define BLIS_ENABLE_STAY_AUTO_INITIALIZED
150 // -- BLAS COMPATIBILITY LAYER -------------------------------------------------
152 // Enable the BLAS compatibility layer?
153 #define BLIS_ENABLE_BLAS2BLIS
155 // The bit size of the integer type used to track values such as dimensions and
156 // leading dimensions (ie: column strides) within the BLAS compatibility layer.
157 // A value of 32 results in the compatibility layer using 32-bit signed integers
158 // while 64 results in 64-bit integers. Any other value results in use of the
159 // C99 type "long int". Note that this ONLY affects integers used within the
160 // BLAS compatibility layer.
161 #define BLIS_BLAS2BLIS_INT_TYPE_SIZE     64
163 // Fortran-77 name-mangling macros.
164 #define PASTEF770(name)                        name ## _
165 #define PASTEF77(ch1,name)       ch1        ## name ## _
166 #define PASTEF772(ch1,ch2,name)  ch1 ## ch2 ## name ## _
170 // -- CBLAS COMPATIBILITY LAYER ------------------------------------------------
172 // Enable the CBLAS compatibility layer?
173 // NOTE: Enabling CBLAS will automatically enable the BLAS compatibility layer
174 // regardless of whether or not it was explicitly enabled above. Furthermore,
175 // the CBLAS compatibility layer will use the integer type size definition
176 // specified above when defining the size of its own integers (regardless of
177 // whether the BLAS layer was enabled directly or indirectly).
178 //#define BLIS_ENABLE_CBLAS
183 #endif