]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - blis/config/armv7a/bli_config.h
TI Linear Algebra Library (LINALG) Rlease 1.0.0
[dense-linear-algebra-libraries/linalg.git] / blis / config / armv7a / 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 // -- OPERATING SYSTEM ---------------------------------------------------------
43 // -- INTEGER PROPERTIES -------------------------------------------------------
45 // The bit size of the integer type used to track values such as dimensions,
46 // strides, diagonal offsets. A value of 32 results in BLIS using 32-bit signed
47 // integers while 64 results in 64-bit integers. Any other value results in use
48 // of the C99 type "long int". Note that this ONLY affects integers used
49 // internally within BLIS as well as those exposed in the native BLAS-like BLIS
50 // interface.
51 #define BLIS_INT_TYPE_SIZE               32
55 // -- FLOATING-POINT PROPERTIES ------------------------------------------------
57 // Define the number of floating-point types supported, and the size of the
58 // largest type.
59 #define BLIS_NUM_FP_TYPES                4
60 #define BLIS_MAX_TYPE_SIZE               sizeof(dcomplex)
62 // Enable use of built-in C99 "float complex" and "double complex" types and
63 // associated overloaded operations and functions? Disabling results in
64 // scomplex and dcomplex being defined in terms of simple structs.
65 //#define BLIS_ENABLE_C99_COMPLEX
69 // -- MULTITHREADING -----------------------------------------------------------
71 // The maximum number of BLIS threads that will run concurrently.
72 #define BLIS_MAX_NUM_THREADS             1
76 // -- MEMORY ALLOCATION --------------------------------------------------------
78 // -- Contiguous (static) memory allocator --
80 // The number of MC x KC, KC x NC, and MC x NC blocks to reserve in the
81 // contiguous memory pools.
82 #define BLIS_NUM_MC_X_KC_BLOCKS          BLIS_MAX_NUM_THREADS
83 #define BLIS_NUM_KC_X_NC_BLOCKS          BLIS_MAX_NUM_THREADS
84 #define BLIS_NUM_MC_X_NC_BLOCKS          0
86 // The maximum preload byte offset is used to pad the end of the contiguous
87 // memory pools so that the micro-kernel, when computing with the end of the
88 // last block, can exceed the bounds of the usable portion of the memory
89 // region without causing a segmentation fault.
90 #define BLIS_MAX_PRELOAD_BYTE_OFFSET     128
92 // -- Memory alignment --
94 // It is sometimes useful to define the various memory alignments in terms
95 // of some other characteristics of the system, such as the cache line size
96 // and the page size.
97 #define BLIS_CACHE_LINE_SIZE             32
98 #define BLIS_PAGE_SIZE                   4096
100 // Alignment size needed by the instruction set for aligned SIMD/vector
101 // instructions.
102 #define BLIS_SIMD_ALIGN_SIZE             32
104 // Alignment size used to align local stack buffers within macro-kernel
105 // functions.
106 #define BLIS_STACK_BUF_ALIGN_SIZE        BLIS_SIMD_ALIGN_SIZE
108 // Alignment size used when allocating memory dynamically from the operating
109 // system (eg: posix_memalign()). To disable heap alignment and just use
110 // malloc() instead, set this to 1.
111 #define BLIS_HEAP_ADDR_ALIGN_SIZE        BLIS_SIMD_ALIGN_SIZE
113 // Alignment size used when sizing leading dimensions of dynamically
114 // allocated memory.
115 #define BLIS_HEAP_STRIDE_ALIGN_SIZE      BLIS_CACHE_LINE_SIZE
117 // Alignment size used when allocating entire blocks of contiguous memory
118 // from the contiguous memory allocator.
119 #define BLIS_CONTIG_ADDR_ALIGN_SIZE      BLIS_PAGE_SIZE
123 // -- MIXED DATATYPE SUPPORT ---------------------------------------------------
125 // Basic (homogeneous) datatype support always enabled.
127 // Enable mixed domain operations?
128 //#define BLIS_ENABLE_MIXED_DOMAIN_SUPPORT
130 // Enable extra mixed precision operations?
131 //#define BLIS_ENABLE_MIXED_PRECISION_SUPPORT
135 // -- MISCELLANEOUS OPTIONS ----------------------------------------------------
137 // Stay initialized after auto-initialization, unless and until the user
138 // explicitly calls bli_finalize().
139 #define BLIS_ENABLE_STAY_AUTO_INITIALIZED
143 // -- BLAS COMPATIBILITY LAYER -------------------------------------------------
145 // Enable the BLAS compatibility layer?
146 #define BLIS_ENABLE_BLAS2BLIS
148 // The bit size of the integer type used to track values such as dimensions and
149 // leading dimensions (ie: column strides) within the BLAS compatibility layer.
150 // A value of 32 results in the compatibility layer using 32-bit signed integers
151 // while 64 results in 64-bit integers. Any other value results in use of the
152 // C99 type "long int". Note that this ONLY affects integers used within the
153 // BLAS compatibility layer.
154 #define BLIS_BLAS2BLIS_INT_TYPE_SIZE     32
156 // Fortran-77 name-mangling macros.
157 #define PASTEF770(name)                        name ## _
158 #define PASTEF77(ch1,name)       ch1        ## name ## _
159 #define PASTEF772(ch1,ch2,name)  ch1 ## ch2 ## name ## _
163 // -- CBLAS COMPATIBILITY LAYER ------------------------------------------------
165 // Enable the CBLAS compatibility layer?
166 // NOTE: Enabling CBLAS will automatically enable the BLAS compatibility layer
167 // regardless of whether or not it was explicitly enabled above. Furthermore,
168 // the CBLAS compatibility layer will use the integer type size definition
169 // specified above when defining the size of its own integers (regardless of
170 // whether the BLAS layer was enabled directly or indirectly).
171 //#define BLIS_ENABLE_CBLAS
176 #endif