]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - blis/config/cortex-a15/bli_kernel.h
Consolidate all git repos of linalg into one.
[dense-linear-algebra-libraries/linalg.git] / blis / config / cortex-a15 / bli_kernel.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_KERNEL_H
36 #define BLIS_KERNEL_H
39 // -- LEVEL-3 MICRO-KERNEL CONSTANTS -------------------------------------------
41 // -- Cache blocksizes --
43 //
44 // Constraints:
45 //
46 // (1) MC must be a multiple of:
47 //     (a) MR (for zero-padding purposes)
48 //     (b) NR (for zero-padding purposes when MR and NR are "swapped")
49 // (2) NC must be a multiple of
50 //     (a) NR (for zero-padding purposes)
51 //     (b) MR (for zero-padding purposes when MR and NR are "swapped")
52 // (3) KC must be a multiple of
53 //     (a) MR and
54 //     (b) NR (for triangular operations such as trmm and trsm).
55 //
57 #define BLIS_DEFAULT_MC_S              336 
58 #define BLIS_DEFAULT_KC_S              528 
59 #define BLIS_DEFAULT_NC_S              4096
61 #define BLIS_DEFAULT_MC_D              176 
62 #define BLIS_DEFAULT_KC_D              368 
63 #define BLIS_DEFAULT_NC_D              4096
65 #define BLIS_DEFAULT_MC_C              64
66 #define BLIS_DEFAULT_KC_C              128
67 #define BLIS_DEFAULT_NC_C              4096
69 #define BLIS_DEFAULT_MC_Z              64
70 #define BLIS_DEFAULT_KC_Z              128
71 #define BLIS_DEFAULT_NC_Z              4096
73 // -- Register blocksizes --
75 #define BLIS_DEFAULT_MR_S              4
76 #define BLIS_DEFAULT_NR_S              4
78 #define BLIS_DEFAULT_MR_D              4
79 #define BLIS_DEFAULT_NR_D              4
81 #define BLIS_DEFAULT_MR_C              8
82 #define BLIS_DEFAULT_NR_C              4
84 #define BLIS_DEFAULT_MR_Z              8
85 #define BLIS_DEFAULT_NR_Z              4
87 // NOTE: If the micro-kernel, which is typically unrolled to a factor
88 // of f, handles leftover edge cases (ie: when k % f > 0) then these
89 // register blocksizes in the k dimension can be defined to 1.
91 //#define BLIS_DEFAULT_KR_S              1
92 //#define BLIS_DEFAULT_KR_D              1
93 //#define BLIS_DEFAULT_KR_C              1
94 //#define BLIS_DEFAULT_KR_Z              1
96 // -- Maximum cache blocksizes (for optimizing edge cases) --
98 // NOTE: These cache blocksize "extensions" have the same constraints as
99 // the corresponding default blocksizes above. When these values are
100 // larger than the default blocksizes, blocksizes used at edge cases are
101 // enlarged if such an extension would encompass the remaining portion of
102 // the matrix dimension.
104 //#define BLIS_MAXIMUM_MC_S              (BLIS_DEFAULT_MC_S + BLIS_DEFAULT_MC_S/4)
105 //#define BLIS_MAXIMUM_KC_S              (BLIS_DEFAULT_KC_S + BLIS_DEFAULT_KC_S/4)
106 //#define BLIS_MAXIMUM_NC_S              (BLIS_DEFAULT_NC_S + BLIS_DEFAULT_NC_S/4)
108 //#define BLIS_MAXIMUM_MC_D              (BLIS_DEFAULT_MC_D + BLIS_DEFAULT_MC_D/4)
109 //#define BLIS_MAXIMUM_KC_D              (BLIS_DEFAULT_KC_D + BLIS_DEFAULT_KC_D/4)
110 //#define BLIS_MAXIMUM_NC_D              (BLIS_DEFAULT_NC_D + BLIS_DEFAULT_NC_D/4)
112 //#define BLIS_MAXIMUM_MC_C              (BLIS_DEFAULT_MC_C + BLIS_DEFAULT_MC_C/4)
113 //#define BLIS_MAXIMUM_KC_C              (BLIS_DEFAULT_KC_C + BLIS_DEFAULT_KC_C/4)
114 //#define BLIS_MAXIMUM_NC_C              (BLIS_DEFAULT_NC_C + BLIS_DEFAULT_NC_C/4)
116 //#define BLIS_MAXIMUM_MC_Z              (BLIS_DEFAULT_MC_Z + BLIS_DEFAULT_MC_Z/4)
117 //#define BLIS_MAXIMUM_KC_Z              (BLIS_DEFAULT_KC_Z + BLIS_DEFAULT_KC_Z/4)
118 //#define BLIS_MAXIMUM_NC_Z              (BLIS_DEFAULT_NC_Z + BLIS_DEFAULT_NC_Z/4)
120 // -- Packing register blocksize (for packed micro-panels) --
122 // NOTE: These register blocksize "extensions" determine whether the
123 // leading dimensions used within the packed micro-panels are equal to
124 // or greater than their corresponding register blocksizes above.
126 //#define BLIS_PACKDIM_MR_S              (BLIS_DEFAULT_MR_S + ...)
127 //#define BLIS_PACKDIM_NR_S              (BLIS_DEFAULT_NR_S + ...)
129 //#define BLIS_PACKDIM_MR_D              (BLIS_DEFAULT_MR_D + ...)
130 //#define BLIS_PACKDIM_NR_D              (BLIS_DEFAULT_NR_D + ...)
132 //#define BLIS_PACKDIM_MR_C              (BLIS_DEFAULT_MR_C + ...)
133 //#define BLIS_PACKDIM_NR_C              (BLIS_DEFAULT_NR_C + ...)
135 //#define BLIS_PACKDIM_MR_Z              (BLIS_DEFAULT_MR_Z + ...)
136 //#define BLIS_PACKDIM_NR_Z              (BLIS_DEFAULT_NR_Z + ...)
140 // -- LEVEL-2 KERNEL CONSTANTS -------------------------------------------------
145 // -- LEVEL-1F KERNEL CONSTANTS ------------------------------------------------
150 // -- LEVEL-3 KERNEL DEFINITIONS -----------------------------------------------
152 // -- gemm --
154 #define BLIS_SGEMM_UKERNEL         bli_sgemm_opt_4x4
155 #define BLIS_DGEMM_UKERNEL         bli_dgemm_opt_4x4
156 //#define BLIS_CGEMM_UKERNEL         bli_cgemm_opt_4x4
157 //#define BLIS_ZGEMM_UKERNEL         bli_zgemm_opt_4x4
159 // -- trsm-related --
164 // -- LEVEL-1M KERNEL DEFINITIONS ----------------------------------------------
166 // -- packm --
168 // -- unpackm --
173 // -- LEVEL-1F KERNEL DEFINITIONS ----------------------------------------------
175 // -- axpy2v --
177 // -- dotaxpyv --
179 // -- axpyf --
181 // -- dotxf --
183 // -- dotxaxpyf --
188 // -- LEVEL-1V KERNEL DEFINITIONS ----------------------------------------------
190 // -- addv --
192 // -- axpyv --
194 // -- copyv --
196 // -- dotv --
198 // -- dotxv --
200 // -- invertv --
202 // -- scal2v --
204 // -- scalv --
206 // -- setv --
208 // -- subv --
210 // -- swapv --
214 #endif