| 1 | /* |
| 2 | |
| 3 | BLIS |
| 4 | An object-based framework for developing high-performance BLAS-like |
| 5 | libraries. |
| 6 | |
| 7 | Copyright (C) 2014, The University of Texas at Austin |
| 8 | |
| 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(s) of the copyright holder(s) nor the names of its |
| 18 | contributors may be used to endorse or promote products derived |
| 19 | from this software without specific prior written permission. |
| 20 | |
| 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. |
| 32 | |
| 33 | */ |
| 34 | |
| 35 | #include "blis.h" |
| 36 | |
| 37 | |
| 38 | #undef GENTFUNC |
| 39 | #define GENTFUNC( ctype, ch, varname, gemmkerid, trsmkerid ) \ |
| 40 | \ |
| 41 | void PASTEMAC(ch,varname) \ |
| 42 | ( \ |
| 43 | dim_t k, \ |
| 44 | ctype* restrict alpha, \ |
| 45 | ctype* restrict a10, \ |
| 46 | ctype* restrict a11, \ |
| 47 | ctype* restrict b01, \ |
| 48 | ctype* restrict b11, \ |
| 49 | ctype* restrict c11, inc_t rs_c, inc_t cs_c, \ |
| 50 | auxinfo_t* restrict data, \ |
| 51 | cntx_t* restrict cntx \ |
| 52 | ) \ |
| 53 | { \ |
| 54 | const num_t dt = PASTEMAC(ch,type); \ |
| 55 | const inc_t rs_b = 4; \ |
| 56 | const inc_t cs_b = 1; \ |
| 57 | \ |
| 58 | ctype* minus_one = PASTEMAC(ch,m1); \ |
| 59 | \ |
| 60 | PASTECH(ch,gemm_ukr_ft) \ |
| 61 | gemm_ukr = bli_cntx_get_l3_ukr_dt( dt, gemmkerid, cntx ); \ |
| 62 | PASTECH(ch,trsm_ukr_ft) \ |
| 63 | trsm_ukr = bli_cntx_get_l3_ukr_dt( dt, trsmkerid, cntx ); \ |
| 64 | \ |
| 65 | gemm_ukr \ |
| 66 | ( \ |
| 67 | k, \ |
| 68 | minus_one, \ |
| 69 | a10, \ |
| 70 | b01, \ |
| 71 | alpha, \ |
| 72 | b11, rs_b, cs_b, \ |
| 73 | data, \ |
| 74 | cntx \ |
| 75 | ); \ |
| 76 | \ |
| 77 | trsm_ukr \ |
| 78 | ( \ |
| 79 | a11, \ |
| 80 | b11, \ |
| 81 | c11, rs_c, cs_c, \ |
| 82 | data, \ |
| 83 | cntx \ |
| 84 | ); \ |
| 85 | } |
| 86 | |
| 87 | INSERT_GENTFUNC_BASIC2( gemmtrsm_l_c99_4x4, BLIS_GEMM_UKR, BLIS_TRSM_L_UKR ) |
| 88 |