1 /************************************************************************************************** 2 * * 3 * This file is part of BLASFEO. * 4 * * 5 * BLASFEO -- BLAS for embedded optimization. * 6 * Copyright (C) 2019 by Gianluca Frison. * 7 * Developed at IMTEK (University of Freiburg) under the supervision of Moritz Diehl. * 8 * All rights reserved. * 9 * * 10 * The 2-Clause BSD License * 11 * * 12 * Redistribution and use in source and binary forms, with or without * 13 * modification, are permitted provided that the following conditions are met: * 14 * * 15 * 1. Redistributions of source code must retain the above copyright notice, this * 16 * list of conditions and the following disclaimer. * 17 * 2. Redistributions in binary form must reproduce the above copyright notice, * 18 * this list of conditions and the following disclaimer in the documentation * 19 * and/or other materials provided with the distribution. * 20 * * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * 28 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 31 * * 32 * Author: Gianluca Frison, gianluca.frison (at) imtek.uni-freiburg.de * 33 * * 34 **************************************************************************************************/ 35 36 #include <stdlib.h> 37 #include <stdio.h> 38 39 #if defined(LA_EXTERNAL_BLAS_WRAPPER) 40 #if defined(EXTERNAL_BLAS_BLIS) 41 #include <blis.h> 42 #elif defined(EXTERNAL_BLAS_MKL) 43 #include <mkl.h> 44 #else 45 #include "../include/d_blas.h" 46 #endif 47 #endif 48 49 #include "../include/blasfeo_common.h" 50 #include "../include/blasfeo_d_aux.h" 51 52 53 54 #define REAL double 55 56 #define XMAT blasfeo_dmat 57 #define XVEC blasfeo_dvec 58 59 #define GEMM_NN blasfeo_dgemm_nn 60 #define GEMM_NT blasfeo_dgemm_nt 61 #define GEMM_TN blasfeo_dgemm_tn 62 #define GEMM_TT blasfeo_dgemm_tt 63 #define SYRK_LN blasfeo_dsyrk_ln 64 #define SYRK_LN_MN blasfeo_dsyrk_ln_mn 65 #define SYRK_LT blasfeo_dsyrk_lt 66 #define SYRK_UN blasfeo_dsyrk_un 67 #define SYRK_UT blasfeo_dsyrk_ut 68 #define TRMM_RLNN blasfeo_dtrmm_rlnn 69 #define TRMM_RUTN blasfeo_dtrmm_rutn 70 #define TRSM_LLNN blasfeo_dtrsm_llnn 71 #define TRSM_LLNU blasfeo_dtrsm_llnu 72 #define TRSM_LLTN blasfeo_dtrsm_lltn 73 #define TRSM_LLTU blasfeo_dtrsm_lltu 74 #define TRSM_LUNN blasfeo_dtrsm_lunn 75 #define TRSM_LUNU blasfeo_dtrsm_lunu 76 #define TRSM_LUTN blasfeo_dtrsm_lutn 77 #define TRSM_LUTU blasfeo_dtrsm_lutu 78 #define TRSM_RLNN blasfeo_dtrsm_rlnn 79 #define TRSM_RLNU blasfeo_dtrsm_rlnu 80 #define TRSM_RLTN blasfeo_dtrsm_rltn 81 #define TRSM_RLTU blasfeo_dtrsm_rltu 82 #define TRSM_RUNN blasfeo_dtrsm_runn 83 #define TRSM_RUNU blasfeo_dtrsm_runu 84 #define TRSM_RUTN blasfeo_dtrsm_rutn 85 #define TRSM_RUTU blasfeo_dtrsm_rutu 86 87 #define COPY dcopy_ 88 #define GEMM dgemm_ 89 #define SYRK dsyrk_ 90 #define TRMM dtrmm_ 91 #define TRSM dtrsm_ 92 93 94 95 #include "x_blas3_lib.c" 96