From b0ccac116158b5ed3316d34798748ba0c6d78672 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Thu, 21 Aug 2014 19:21:52 -0500 Subject: [PATCH] Cleaned up front-end layering for 4m/3m. Details: - Added an extra layer to level-3 front-ends (examples: bli_gemm_entry() and bli_gemm4m_entry()) to hide the control trees from the code that decides whether to execute native or 4m-based implementations. The layering was also applied to 3m. - Branch to 4m code based on the return value of bli_4m_is_enabled(), rather than the cpp macros BLIS_ENABLE_?COMPLEX_VIA_4M. This lays the groundwork for users to be able to change at runtime which implementation is called by the main front-ends (e.g. bli_gemm()). - Retired some experimental gemm code that hadn't been touched in months. --- frame/3/gemm/3m/bli_gemm3m.c | 16 ++---- frame/3/gemm/3m/bli_gemm3m.h | 1 + frame/3/gemm/3m/bli_gemm3m_entry.c | 48 ++++++++++++++++++ frame/3/gemm/3m/bli_gemm3m_entry.h | 40 +++++++++++++++ frame/3/gemm/4m/bli_gemm4m.c | 16 ++---- frame/3/gemm/4m/bli_gemm4m.h | 1 + frame/3/gemm/4m/bli_gemm4m_entry.c | 48 ++++++++++++++++++ frame/3/gemm/4m/bli_gemm4m_entry.h | 40 +++++++++++++++ frame/3/gemm/bli_gemm.c | 19 ++------ frame/3/gemm/bli_gemm.h | 2 +- frame/3/gemm/bli_gemm_cntl.h | 2 - frame/3/gemm/bli_gemm_entry.c | 48 ++++++++++++++++++ frame/3/gemm/bli_gemm_entry.h | 40 +++++++++++++++ frame/3/gemm/bli_gemm_int.c | 2 +- frame/3/gemm/{ => other}/bli_gemm_cntl_exp.c | 0 frame/3/gemm/{ => other}/bli_gemm_cntl_exp.h | 0 frame/3/gemm/{ => other}/bli_gemm_ker_var5.c | 0 frame/3/gemm/{ => other}/bli_gemm_ker_var5.h | 0 frame/3/hemm/3m/bli_hemm3m.c | 10 ++-- frame/3/hemm/3m/bli_hemm3m.h | 2 + frame/3/hemm/3m/bli_hemm3m_entry.c | 49 +++++++++++++++++++ frame/3/hemm/3m/bli_hemm3m_entry.h | 41 ++++++++++++++++ frame/3/hemm/4m/bli_hemm4m.c | 10 ++-- frame/3/hemm/4m/bli_hemm4m.h | 2 + frame/3/hemm/4m/bli_hemm4m_entry.c | 49 +++++++++++++++++++ frame/3/hemm/4m/bli_hemm4m_entry.h | 41 ++++++++++++++++ frame/3/hemm/bli_hemm.c | 19 ++------ frame/3/hemm/bli_hemm.h | 1 + frame/3/hemm/bli_hemm_entry.c | 49 +++++++++++++++++++ frame/3/hemm/bli_hemm_entry.h | 41 ++++++++++++++++ frame/3/her2k/3m/bli_her2k3m.c | 16 ++---- frame/3/her2k/3m/bli_her2k3m.h | 2 + frame/3/her2k/3m/bli_her2k3m_entry.c | 48 ++++++++++++++++++ frame/3/her2k/3m/bli_her2k3m_entry.h | 40 +++++++++++++++ frame/3/her2k/4m/bli_her2k4m.c | 16 ++---- frame/3/her2k/4m/bli_her2k4m.h | 2 + frame/3/her2k/4m/bli_her2k4m_entry.c | 48 ++++++++++++++++++ frame/3/her2k/4m/bli_her2k4m_entry.h | 40 +++++++++++++++ frame/3/her2k/bli_her2k.c | 20 ++------ frame/3/her2k/bli_her2k.h | 1 + frame/3/her2k/bli_her2k_entry.c | 48 ++++++++++++++++++ frame/3/her2k/bli_her2k_entry.h | 40 +++++++++++++++ frame/3/herk/3m/bli_herk3m.c | 16 ++---- frame/3/herk/3m/bli_herk3m.h | 1 + frame/3/herk/3m/bli_herk3m_entry.c | 47 ++++++++++++++++++ frame/3/herk/3m/bli_herk3m_entry.h | 39 +++++++++++++++ frame/3/herk/4m/bli_herk4m.c | 16 ++---- frame/3/herk/4m/bli_herk4m.h | 1 + frame/3/herk/4m/bli_herk4m_entry.c | 47 ++++++++++++++++++ frame/3/herk/4m/bli_herk4m_entry.h | 39 +++++++++++++++ frame/3/herk/bli_herk.c | 19 ++------ frame/3/herk/bli_herk.h | 1 + frame/3/herk/bli_herk_entry.c | 47 ++++++++++++++++++ frame/3/herk/bli_herk_entry.h | 39 +++++++++++++++ frame/3/symm/3m/bli_symm3m.c | 10 ++-- frame/3/symm/3m/bli_symm3m.h | 2 + frame/3/symm/3m/bli_symm3m_entry.c | 49 +++++++++++++++++++ frame/3/symm/3m/bli_symm3m_entry.h | 41 ++++++++++++++++ frame/3/symm/4m/bli_symm4m.c | 10 ++-- frame/3/symm/4m/bli_symm4m.h | 2 + frame/3/symm/4m/bli_symm4m_entry.c | 49 +++++++++++++++++++ frame/3/symm/4m/bli_symm4m_entry.h | 41 ++++++++++++++++ frame/3/symm/bli_symm.c | 19 ++------ frame/3/symm/bli_symm.h | 1 + frame/3/symm/bli_symm_entry.c | 49 +++++++++++++++++++ frame/3/symm/bli_symm_entry.h | 41 ++++++++++++++++ frame/3/syr2k/3m/bli_syr2k3m.c | 16 ++---- frame/3/syr2k/3m/bli_syr2k3m.h | 2 + frame/3/syr2k/3m/bli_syr2k3m_entry.c | 48 ++++++++++++++++++ frame/3/syr2k/3m/bli_syr2k3m_entry.h | 40 +++++++++++++++ frame/3/syr2k/4m/bli_syr2k4m.c | 16 ++---- frame/3/syr2k/4m/bli_syr2k4m.h | 2 + frame/3/syr2k/4m/bli_syr2k4m_entry.c | 48 ++++++++++++++++++ frame/3/syr2k/4m/bli_syr2k4m_entry.h | 40 +++++++++++++++ frame/3/syr2k/bli_syr2k.c | 20 ++------ frame/3/syr2k/bli_syr2k.h | 1 + frame/3/syr2k/bli_syr2k_entry.c | 48 ++++++++++++++++++ frame/3/syr2k/bli_syr2k_entry.h | 40 +++++++++++++++ frame/3/syrk/3m/bli_syrk3m.c | 16 ++---- frame/3/syrk/3m/bli_syrk3m.h | 2 + frame/3/syrk/3m/bli_syrk3m_entry.c | 47 ++++++++++++++++++ frame/3/syrk/3m/bli_syrk3m_entry.h | 39 +++++++++++++++ frame/3/syrk/4m/bli_syrk4m.c | 16 ++---- frame/3/syrk/4m/bli_syrk4m.h | 2 + frame/3/syrk/4m/bli_syrk4m_entry.c | 47 ++++++++++++++++++ frame/3/syrk/4m/bli_syrk4m_entry.h | 39 +++++++++++++++ frame/3/syrk/bli_syrk.c | 19 ++------ frame/3/syrk/bli_syrk.h | 1 + frame/3/syrk/bli_syrk_entry.c | 47 ++++++++++++++++++ frame/3/syrk/bli_syrk_entry.h | 39 +++++++++++++++ frame/3/trmm/3m/bli_trmm3m.c | 18 ++----- frame/3/trmm/3m/bli_trmm3m.h | 1 + frame/3/trmm/3m/bli_trmm3m_entry.c | 49 +++++++++++++++++++ frame/3/trmm/3m/bli_trmm3m_entry.h | 39 +++++++++++++++ frame/3/trmm/4m/bli_trmm4m.c | 18 ++----- frame/3/trmm/4m/bli_trmm4m.h | 1 + frame/3/trmm/4m/bli_trmm4m_entry.c | 49 +++++++++++++++++++ frame/3/trmm/4m/bli_trmm4m_entry.h | 39 +++++++++++++++ frame/3/trmm/bli_trmm.c | 21 ++------ frame/3/trmm/bli_trmm.h | 1 + frame/3/trmm/bli_trmm_entry.c | 49 +++++++++++++++++++ frame/3/trmm/bli_trmm_entry.h | 39 +++++++++++++++ frame/3/trmm3/3m/bli_trmm33m.c | 18 ++----- frame/3/trmm3/3m/bli_trmm33m.h | 2 + frame/3/trmm3/3m/bli_trmm33m_entry.c | 51 ++++++++++++++++++++ frame/3/trmm3/3m/bli_trmm33m_entry.h | 41 ++++++++++++++++ frame/3/trmm3/4m/bli_trmm34m.c | 18 ++----- frame/3/trmm3/4m/bli_trmm34m.h | 2 + frame/3/trmm3/4m/bli_trmm34m_entry.c | 51 ++++++++++++++++++++ frame/3/trmm3/4m/bli_trmm34m_entry.h | 41 ++++++++++++++++ frame/3/trmm3/bli_trmm3.c | 21 ++------ frame/3/trmm3/bli_trmm3.h | 1 + frame/3/trmm3/bli_trmm3_entry.c | 51 ++++++++++++++++++++ frame/3/trmm3/bli_trmm3_entry.h | 41 ++++++++++++++++ frame/3/trsm/3m/bli_trsm3m.c | 18 ++----- frame/3/trsm/3m/bli_trsm3m.h | 1 + frame/3/trsm/3m/bli_trsm3m_entry.c | 49 +++++++++++++++++++ frame/3/trsm/3m/bli_trsm3m_entry.h | 39 +++++++++++++++ frame/3/trsm/4m/bli_trsm4m.c | 18 ++----- frame/3/trsm/4m/bli_trsm4m.h | 1 + frame/3/trsm/4m/bli_trsm4m_entry.c | 49 +++++++++++++++++++ frame/3/trsm/4m/bli_trsm4m_entry.h | 39 +++++++++++++++ frame/3/trsm/bli_trsm.c | 21 ++------ frame/3/trsm/bli_trsm.h | 1 + frame/3/trsm/bli_trsm_entry.c | 49 +++++++++++++++++++ frame/3/trsm/bli_trsm_entry.h | 39 +++++++++++++++ 126 files changed, 2833 insertions(+), 372 deletions(-) create mode 100644 frame/3/gemm/3m/bli_gemm3m_entry.c create mode 100644 frame/3/gemm/3m/bli_gemm3m_entry.h create mode 100644 frame/3/gemm/4m/bli_gemm4m_entry.c create mode 100644 frame/3/gemm/4m/bli_gemm4m_entry.h create mode 100644 frame/3/gemm/bli_gemm_entry.c create mode 100644 frame/3/gemm/bli_gemm_entry.h rename frame/3/gemm/{ => other}/bli_gemm_cntl_exp.c (100%) rename frame/3/gemm/{ => other}/bli_gemm_cntl_exp.h (100%) rename frame/3/gemm/{ => other}/bli_gemm_ker_var5.c (100%) rename frame/3/gemm/{ => other}/bli_gemm_ker_var5.h (100%) create mode 100644 frame/3/hemm/3m/bli_hemm3m_entry.c create mode 100644 frame/3/hemm/3m/bli_hemm3m_entry.h create mode 100644 frame/3/hemm/4m/bli_hemm4m_entry.c create mode 100644 frame/3/hemm/4m/bli_hemm4m_entry.h create mode 100644 frame/3/hemm/bli_hemm_entry.c create mode 100644 frame/3/hemm/bli_hemm_entry.h create mode 100644 frame/3/her2k/3m/bli_her2k3m_entry.c create mode 100644 frame/3/her2k/3m/bli_her2k3m_entry.h create mode 100644 frame/3/her2k/4m/bli_her2k4m_entry.c create mode 100644 frame/3/her2k/4m/bli_her2k4m_entry.h create mode 100644 frame/3/her2k/bli_her2k_entry.c create mode 100644 frame/3/her2k/bli_her2k_entry.h create mode 100644 frame/3/herk/3m/bli_herk3m_entry.c create mode 100644 frame/3/herk/3m/bli_herk3m_entry.h create mode 100644 frame/3/herk/4m/bli_herk4m_entry.c create mode 100644 frame/3/herk/4m/bli_herk4m_entry.h create mode 100644 frame/3/herk/bli_herk_entry.c create mode 100644 frame/3/herk/bli_herk_entry.h create mode 100644 frame/3/symm/3m/bli_symm3m_entry.c create mode 100644 frame/3/symm/3m/bli_symm3m_entry.h create mode 100644 frame/3/symm/4m/bli_symm4m_entry.c create mode 100644 frame/3/symm/4m/bli_symm4m_entry.h create mode 100644 frame/3/symm/bli_symm_entry.c create mode 100644 frame/3/symm/bli_symm_entry.h create mode 100644 frame/3/syr2k/3m/bli_syr2k3m_entry.c create mode 100644 frame/3/syr2k/3m/bli_syr2k3m_entry.h create mode 100644 frame/3/syr2k/4m/bli_syr2k4m_entry.c create mode 100644 frame/3/syr2k/4m/bli_syr2k4m_entry.h create mode 100644 frame/3/syr2k/bli_syr2k_entry.c create mode 100644 frame/3/syr2k/bli_syr2k_entry.h create mode 100644 frame/3/syrk/3m/bli_syrk3m_entry.c create mode 100644 frame/3/syrk/3m/bli_syrk3m_entry.h create mode 100644 frame/3/syrk/4m/bli_syrk4m_entry.c create mode 100644 frame/3/syrk/4m/bli_syrk4m_entry.h create mode 100644 frame/3/syrk/bli_syrk_entry.c create mode 100644 frame/3/syrk/bli_syrk_entry.h create mode 100644 frame/3/trmm/3m/bli_trmm3m_entry.c create mode 100644 frame/3/trmm/3m/bli_trmm3m_entry.h create mode 100644 frame/3/trmm/4m/bli_trmm4m_entry.c create mode 100644 frame/3/trmm/4m/bli_trmm4m_entry.h create mode 100644 frame/3/trmm/bli_trmm_entry.c create mode 100644 frame/3/trmm/bli_trmm_entry.h create mode 100644 frame/3/trmm3/3m/bli_trmm33m_entry.c create mode 100644 frame/3/trmm3/3m/bli_trmm33m_entry.h create mode 100644 frame/3/trmm3/4m/bli_trmm34m_entry.c create mode 100644 frame/3/trmm3/4m/bli_trmm34m_entry.h create mode 100644 frame/3/trmm3/bli_trmm3_entry.c create mode 100644 frame/3/trmm3/bli_trmm3_entry.h create mode 100644 frame/3/trsm/3m/bli_trsm3m_entry.c create mode 100644 frame/3/trsm/3m/bli_trsm3m_entry.h create mode 100644 frame/3/trsm/4m/bli_trsm4m_entry.c create mode 100644 frame/3/trsm/4m/bli_trsm4m_entry.h create mode 100644 frame/3/trsm/bli_trsm_entry.c create mode 100644 frame/3/trsm/bli_trsm_entry.h diff --git a/frame/3/gemm/3m/bli_gemm3m.c b/frame/3/gemm/3m/bli_gemm3m.c index 0f4aa9823..b8806305a 100644 --- a/frame/3/gemm/3m/bli_gemm3m.c +++ b/frame/3/gemm/3m/bli_gemm3m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern gemm_t* gemm3m_cntl; -extern gemm_t* gemm_cntl; - // // Define object-based interface. // @@ -46,15 +43,12 @@ void bli_gemm3m( obj_t* alpha, obj_t* beta, obj_t* c ) { - gemm_t* cntl; - // Since 3m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = gemm3m_cntl; - else cntl = gemm_cntl; - - bli_gemm_front( alpha, a, b, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_gemm3m_entry( alpha, a, b, beta, c ); + else + bli_gemm_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/gemm/3m/bli_gemm3m.h b/frame/3/gemm/3m/bli_gemm3m.h index 1149e6c89..85032afce 100644 --- a/frame/3/gemm/3m/bli_gemm3m.h +++ b/frame/3/gemm/3m/bli_gemm3m.h @@ -33,6 +33,7 @@ */ #include "bli_gemm3m_cntl.h" +#include "bli_gemm3m_entry.h" #include "bli_gemm3m_ukr_ref.h" diff --git a/frame/3/gemm/3m/bli_gemm3m_entry.c b/frame/3/gemm/3m/bli_gemm3m_entry.c new file mode 100644 index 000000000..ef32125f4 --- /dev/null +++ b/frame/3/gemm/3m/bli_gemm3m_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm3m_cntl; + +void bli_gemm3m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_gemm_front( alpha, a, b, beta, c, + gemm3m_cntl ); +} + diff --git a/frame/3/gemm/3m/bli_gemm3m_entry.h b/frame/3/gemm/3m/bli_gemm3m_entry.h new file mode 100644 index 000000000..0af6a73cb --- /dev/null +++ b/frame/3/gemm/3m/bli_gemm3m_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_gemm3m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/gemm/4m/bli_gemm4m.c b/frame/3/gemm/4m/bli_gemm4m.c index 73826ee84..ff10d44da 100644 --- a/frame/3/gemm/4m/bli_gemm4m.c +++ b/frame/3/gemm/4m/bli_gemm4m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern gemm_t* gemm4m_cntl; -extern gemm_t* gemm_cntl; - // // Define object-based interface. // @@ -46,15 +43,12 @@ void bli_gemm4m( obj_t* alpha, obj_t* beta, obj_t* c ) { - gemm_t* cntl; - // Since 4m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = gemm4m_cntl; - else cntl = gemm_cntl; - - bli_gemm_front( alpha, a, b, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_gemm4m_entry( alpha, a, b, beta, c ); + else + bli_gemm_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/gemm/4m/bli_gemm4m.h b/frame/3/gemm/4m/bli_gemm4m.h index 704646882..42f83ef88 100644 --- a/frame/3/gemm/4m/bli_gemm4m.h +++ b/frame/3/gemm/4m/bli_gemm4m.h @@ -33,6 +33,7 @@ */ #include "bli_gemm4m_cntl.h" +#include "bli_gemm4m_entry.h" #include "bli_gemm4m_ukr_ref.h" diff --git a/frame/3/gemm/4m/bli_gemm4m_entry.c b/frame/3/gemm/4m/bli_gemm4m_entry.c new file mode 100644 index 000000000..cfc430c4e --- /dev/null +++ b/frame/3/gemm/4m/bli_gemm4m_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm4m_cntl; + +void bli_gemm4m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_gemm_front( alpha, a, b, beta, c, + gemm4m_cntl ); +} + diff --git a/frame/3/gemm/4m/bli_gemm4m_entry.h b/frame/3/gemm/4m/bli_gemm4m_entry.h new file mode 100644 index 000000000..9ce5c4a4c --- /dev/null +++ b/frame/3/gemm/4m/bli_gemm4m_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_gemm4m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/gemm/bli_gemm.c b/frame/3/gemm/bli_gemm.c index 98c135eee..6f6c8f7d1 100644 --- a/frame/3/gemm/bli_gemm.c +++ b/frame/3/gemm/bli_gemm.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm_cntl; - // // Define object-based interface. // @@ -45,19 +43,10 @@ void bli_gemm( obj_t* alpha, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_gemm4m( alpha, a, b, beta, c ); - - bli_gemm_front( alpha, a, b, beta, c, - gemm_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_gemm4m_entry( alpha, a, b, beta, c ); + else + bli_gemm_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/gemm/bli_gemm.h b/frame/3/gemm/bli_gemm.h index 8ec618c7a..ed803d0ff 100644 --- a/frame/3/gemm/bli_gemm.h +++ b/frame/3/gemm/bli_gemm.h @@ -34,6 +34,7 @@ #include "bli_gemm_cntl.h" #include "bli_gemm_check.h" +#include "bli_gemm_entry.h" #include "bli_gemm_front.h" #include "bli_gemm_int.h" #include "bli_gemm_target.h" @@ -45,7 +46,6 @@ #include "bli_gemm_blk_var3f.h" #include "bli_gemm_ker_var2.h" -#include "bli_gemm_ker_var5.h" #include "bli_gemm_ukr_ref.h" diff --git a/frame/3/gemm/bli_gemm_cntl.h b/frame/3/gemm/bli_gemm_cntl.h index 6bd8ce13f..be32d89fd 100644 --- a/frame/3/gemm/bli_gemm_cntl.h +++ b/frame/3/gemm/bli_gemm_cntl.h @@ -32,8 +32,6 @@ */ -#include "bli_gemm_cntl_exp.h" - struct gemm_s { impl_t impl_type; diff --git a/frame/3/gemm/bli_gemm_entry.c b/frame/3/gemm/bli_gemm_entry.c new file mode 100644 index 000000000..a2b0e8d38 --- /dev/null +++ b/frame/3/gemm/bli_gemm_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm_cntl; + +void bli_gemm_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_gemm_front( alpha, a, b, beta, c, + gemm_cntl ); +} + diff --git a/frame/3/gemm/bli_gemm_entry.h b/frame/3/gemm/bli_gemm_entry.h new file mode 100644 index 000000000..bf23e4e0e --- /dev/null +++ b/frame/3/gemm/bli_gemm_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_gemm_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/gemm/bli_gemm_int.c b/frame/3/gemm/bli_gemm_int.c index 85a0f3c03..a2ec7b029 100644 --- a/frame/3/gemm/bli_gemm_int.c +++ b/frame/3/gemm/bli_gemm_int.c @@ -49,7 +49,7 @@ static FUNCPTR_T vars[6][3] = { NULL, bli_gemm_ker_var2, bli_gemm_blk_var2f }, { NULL, NULL, bli_gemm_blk_var3f }, { NULL, NULL, NULL }, - { NULL, bli_gemm_ker_var5, NULL }, + { NULL, NULL, NULL }, { NULL, NULL, NULL } }; diff --git a/frame/3/gemm/bli_gemm_cntl_exp.c b/frame/3/gemm/other/bli_gemm_cntl_exp.c similarity index 100% rename from frame/3/gemm/bli_gemm_cntl_exp.c rename to frame/3/gemm/other/bli_gemm_cntl_exp.c diff --git a/frame/3/gemm/bli_gemm_cntl_exp.h b/frame/3/gemm/other/bli_gemm_cntl_exp.h similarity index 100% rename from frame/3/gemm/bli_gemm_cntl_exp.h rename to frame/3/gemm/other/bli_gemm_cntl_exp.h diff --git a/frame/3/gemm/bli_gemm_ker_var5.c b/frame/3/gemm/other/bli_gemm_ker_var5.c similarity index 100% rename from frame/3/gemm/bli_gemm_ker_var5.c rename to frame/3/gemm/other/bli_gemm_ker_var5.c diff --git a/frame/3/gemm/bli_gemm_ker_var5.h b/frame/3/gemm/other/bli_gemm_ker_var5.h similarity index 100% rename from frame/3/gemm/bli_gemm_ker_var5.h rename to frame/3/gemm/other/bli_gemm_ker_var5.h diff --git a/frame/3/hemm/3m/bli_hemm3m.c b/frame/3/hemm/3m/bli_hemm3m.c index 75476dd17..7572799e0 100644 --- a/frame/3/hemm/3m/bli_hemm3m.c +++ b/frame/3/hemm/3m/bli_hemm3m.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm3m_cntl; - // // Define object-based interface. // @@ -46,8 +44,12 @@ void bli_hemm3m( side_t side, obj_t* beta, obj_t* c ) { - bli_hemm_front( side, alpha, a, b, beta, c, - gemm3m_cntl ); + // Since 3m only applies to the complex domain, we use the regular + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_hemm3m_entry( side, alpha, a, b, beta, c ); + else + bli_hemm_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/hemm/3m/bli_hemm3m.h b/frame/3/hemm/3m/bli_hemm3m.h index cb0fab85c..c9e08cb26 100644 --- a/frame/3/hemm/3m/bli_hemm3m.h +++ b/frame/3/hemm/3m/bli_hemm3m.h @@ -32,6 +32,8 @@ */ +#include "bli_hemm3m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/hemm/3m/bli_hemm3m_entry.c b/frame/3/hemm/3m/bli_hemm3m_entry.c new file mode 100644 index 000000000..9364f2be4 --- /dev/null +++ b/frame/3/hemm/3m/bli_hemm3m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm3m_cntl; + +void bli_hemm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_hemm_front( side, alpha, a, b, beta, c, + gemm3m_cntl ); +} + diff --git a/frame/3/hemm/3m/bli_hemm3m_entry.h b/frame/3/hemm/3m/bli_hemm3m_entry.h new file mode 100644 index 000000000..e00b84d29 --- /dev/null +++ b/frame/3/hemm/3m/bli_hemm3m_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_hemm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/hemm/4m/bli_hemm4m.c b/frame/3/hemm/4m/bli_hemm4m.c index 7472ce429..f2aea859e 100644 --- a/frame/3/hemm/4m/bli_hemm4m.c +++ b/frame/3/hemm/4m/bli_hemm4m.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm4m_cntl; - // // Define object-based interface. // @@ -46,8 +44,12 @@ void bli_hemm4m( side_t side, obj_t* beta, obj_t* c ) { - bli_hemm_front( side, alpha, a, b, beta, c, - gemm4m_cntl ); + // Since 4m only applies to the complex domain, we use the regular + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_hemm4m_entry( side, alpha, a, b, beta, c ); + else + bli_hemm_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/hemm/4m/bli_hemm4m.h b/frame/3/hemm/4m/bli_hemm4m.h index db5adaf87..66d8ddf10 100644 --- a/frame/3/hemm/4m/bli_hemm4m.h +++ b/frame/3/hemm/4m/bli_hemm4m.h @@ -32,6 +32,8 @@ */ +#include "bli_hemm4m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/hemm/4m/bli_hemm4m_entry.c b/frame/3/hemm/4m/bli_hemm4m_entry.c new file mode 100644 index 000000000..40d9230b5 --- /dev/null +++ b/frame/3/hemm/4m/bli_hemm4m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm4m_cntl; + +void bli_hemm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_hemm_front( side, alpha, a, b, beta, c, + gemm4m_cntl ); +} + diff --git a/frame/3/hemm/4m/bli_hemm4m_entry.h b/frame/3/hemm/4m/bli_hemm4m_entry.h new file mode 100644 index 000000000..0aa26c96c --- /dev/null +++ b/frame/3/hemm/4m/bli_hemm4m_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_hemm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/hemm/bli_hemm.c b/frame/3/hemm/bli_hemm.c index 15cc90018..212912fad 100644 --- a/frame/3/hemm/bli_hemm.c +++ b/frame/3/hemm/bli_hemm.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm_cntl; - // // Define object-based interface. // @@ -46,19 +44,10 @@ void bli_hemm( side_t side, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_hemm4m( side, alpha, a, b, beta, c ); - - bli_hemm_front( side, alpha, a, b, beta, c, - gemm_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_hemm4m_entry( side, alpha, a, b, beta, c ); + else + bli_hemm_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/hemm/bli_hemm.h b/frame/3/hemm/bli_hemm.h index 16e2a84c2..59f655684 100644 --- a/frame/3/hemm/bli_hemm.h +++ b/frame/3/hemm/bli_hemm.h @@ -33,6 +33,7 @@ */ #include "bli_hemm_check.h" +#include "bli_hemm_entry.h" #include "bli_hemm_front.h" #include "bli_hemm4m.h" diff --git a/frame/3/hemm/bli_hemm_entry.c b/frame/3/hemm/bli_hemm_entry.c new file mode 100644 index 000000000..3003af76c --- /dev/null +++ b/frame/3/hemm/bli_hemm_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm_cntl; + +void bli_hemm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_hemm_front( side, alpha, a, b, beta, c, + gemm_cntl ); +} + diff --git a/frame/3/hemm/bli_hemm_entry.h b/frame/3/hemm/bli_hemm_entry.h new file mode 100644 index 000000000..c05034f0e --- /dev/null +++ b/frame/3/hemm/bli_hemm_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_hemm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/her2k/3m/bli_her2k3m.c b/frame/3/her2k/3m/bli_her2k3m.c index 9a5558130..75d8167b9 100644 --- a/frame/3/her2k/3m/bli_her2k3m.c +++ b/frame/3/her2k/3m/bli_her2k3m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk3m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -46,15 +43,12 @@ void bli_her2k3m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 3m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk3m_cntl; - else cntl = herk_cntl; - - bli_her2k_front( alpha, a, b, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_her2k3m_entry( alpha, a, b, beta, c ); + else + bli_her2k_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/her2k/3m/bli_her2k3m.h b/frame/3/her2k/3m/bli_her2k3m.h index b83703567..8cb4696db 100644 --- a/frame/3/her2k/3m/bli_her2k3m.h +++ b/frame/3/her2k/3m/bli_her2k3m.h @@ -32,6 +32,8 @@ */ +#include "bli_her2k3m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/her2k/3m/bli_her2k3m_entry.c b/frame/3/her2k/3m/bli_her2k3m_entry.c new file mode 100644 index 000000000..c6c67d26c --- /dev/null +++ b/frame/3/her2k/3m/bli_her2k3m_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk3m_cntl; + +void bli_her2k3m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_her2k_front( alpha, a, b, beta, c, + herk3m_cntl ); +} + diff --git a/frame/3/her2k/3m/bli_her2k3m_entry.h b/frame/3/her2k/3m/bli_her2k3m_entry.h new file mode 100644 index 000000000..c27e274da --- /dev/null +++ b/frame/3/her2k/3m/bli_her2k3m_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_her2k3m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/her2k/4m/bli_her2k4m.c b/frame/3/her2k/4m/bli_her2k4m.c index 8f93abbc5..25eb2ee2d 100644 --- a/frame/3/her2k/4m/bli_her2k4m.c +++ b/frame/3/her2k/4m/bli_her2k4m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk4m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -46,15 +43,12 @@ void bli_her2k4m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 4m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk4m_cntl; - else cntl = herk_cntl; - - bli_her2k_front( alpha, a, b, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_her2k4m_entry( alpha, a, b, beta, c ); + else + bli_her2k_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/her2k/4m/bli_her2k4m.h b/frame/3/her2k/4m/bli_her2k4m.h index c562bfc39..424743126 100644 --- a/frame/3/her2k/4m/bli_her2k4m.h +++ b/frame/3/her2k/4m/bli_her2k4m.h @@ -32,6 +32,8 @@ */ +#include "bli_her2k4m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/her2k/4m/bli_her2k4m_entry.c b/frame/3/her2k/4m/bli_her2k4m_entry.c new file mode 100644 index 000000000..618a952b6 --- /dev/null +++ b/frame/3/her2k/4m/bli_her2k4m_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk4m_cntl; + +void bli_her2k4m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_her2k_front( alpha, a, b, beta, c, + herk4m_cntl ); +} + diff --git a/frame/3/her2k/4m/bli_her2k4m_entry.h b/frame/3/her2k/4m/bli_her2k4m_entry.h new file mode 100644 index 000000000..0c711e4f9 --- /dev/null +++ b/frame/3/her2k/4m/bli_her2k4m_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_her2k4m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/her2k/bli_her2k.c b/frame/3/her2k/bli_her2k.c index d1368accb..33f685495 100644 --- a/frame/3/her2k/bli_her2k.c +++ b/frame/3/her2k/bli_her2k.c @@ -34,9 +34,6 @@ #include "blis.h" -//extern her2k_t* her2k_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -46,19 +43,10 @@ void bli_her2k( obj_t* alpha, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_her2k4m( alpha, a, b, beta, c ); - - bli_her2k_front( alpha, a, b, beta, c, - herk_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_her2k4m_entry( alpha, a, b, beta, c ); + else + bli_her2k_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/her2k/bli_her2k.h b/frame/3/her2k/bli_her2k.h index 821c1866b..2f41d7e48 100644 --- a/frame/3/her2k/bli_her2k.h +++ b/frame/3/her2k/bli_her2k.h @@ -34,6 +34,7 @@ //#include "bli_her2k_cntl.h" #include "bli_her2k_check.h" +#include "bli_her2k_entry.h" #include "bli_her2k_front.h" /* #include "bli_her2k_int.h" diff --git a/frame/3/her2k/bli_her2k_entry.c b/frame/3/her2k/bli_her2k_entry.c new file mode 100644 index 000000000..884d901e3 --- /dev/null +++ b/frame/3/her2k/bli_her2k_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk_cntl; + +void bli_her2k_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_her2k_front( alpha, a, b, beta, c, + herk_cntl ); +} + diff --git a/frame/3/her2k/bli_her2k_entry.h b/frame/3/her2k/bli_her2k_entry.h new file mode 100644 index 000000000..ee0f86231 --- /dev/null +++ b/frame/3/her2k/bli_her2k_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_her2k_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/herk/3m/bli_herk3m.c b/frame/3/herk/3m/bli_herk3m.c index 9f2bb2242..32b699539 100644 --- a/frame/3/herk/3m/bli_herk3m.c +++ b/frame/3/herk/3m/bli_herk3m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk3m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -45,15 +42,12 @@ void bli_herk3m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 3m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk3m_cntl; - else cntl = herk_cntl; - - bli_herk_front( alpha, a, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_herk3m_entry( alpha, a, beta, c ); + else + bli_herk_entry( alpha, a, beta, c ); } // diff --git a/frame/3/herk/3m/bli_herk3m.h b/frame/3/herk/3m/bli_herk3m.h index e1d3ee812..4abec2818 100644 --- a/frame/3/herk/3m/bli_herk3m.h +++ b/frame/3/herk/3m/bli_herk3m.h @@ -33,6 +33,7 @@ */ #include "bli_herk3m_cntl.h" +#include "bli_herk3m_entry.h" // diff --git a/frame/3/herk/3m/bli_herk3m_entry.c b/frame/3/herk/3m/bli_herk3m_entry.c new file mode 100644 index 000000000..d0dad105b --- /dev/null +++ b/frame/3/herk/3m/bli_herk3m_entry.c @@ -0,0 +1,47 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk3m_cntl; + +void bli_herk3m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ) +{ + bli_herk_front( alpha, a, beta, c, + herk3m_cntl ); +} + diff --git a/frame/3/herk/3m/bli_herk3m_entry.h b/frame/3/herk/3m/bli_herk3m_entry.h new file mode 100644 index 000000000..29bc193e9 --- /dev/null +++ b/frame/3/herk/3m/bli_herk3m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_herk3m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/herk/4m/bli_herk4m.c b/frame/3/herk/4m/bli_herk4m.c index 53cffbaec..3baaba4ff 100644 --- a/frame/3/herk/4m/bli_herk4m.c +++ b/frame/3/herk/4m/bli_herk4m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk4m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -45,15 +42,12 @@ void bli_herk4m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 4m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk4m_cntl; - else cntl = herk_cntl; - - bli_herk_front( alpha, a, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_herk4m_entry( alpha, a, beta, c ); + else + bli_herk_entry( alpha, a, beta, c ); } // diff --git a/frame/3/herk/4m/bli_herk4m.h b/frame/3/herk/4m/bli_herk4m.h index eddc9e78a..3527bd6f6 100644 --- a/frame/3/herk/4m/bli_herk4m.h +++ b/frame/3/herk/4m/bli_herk4m.h @@ -33,6 +33,7 @@ */ #include "bli_herk4m_cntl.h" +#include "bli_herk4m_entry.h" // diff --git a/frame/3/herk/4m/bli_herk4m_entry.c b/frame/3/herk/4m/bli_herk4m_entry.c new file mode 100644 index 000000000..59cfa14bd --- /dev/null +++ b/frame/3/herk/4m/bli_herk4m_entry.c @@ -0,0 +1,47 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk4m_cntl; + +void bli_herk4m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ) +{ + bli_herk_front( alpha, a, beta, c, + herk4m_cntl ); +} + diff --git a/frame/3/herk/4m/bli_herk4m_entry.h b/frame/3/herk/4m/bli_herk4m_entry.h new file mode 100644 index 000000000..e67df69d9 --- /dev/null +++ b/frame/3/herk/4m/bli_herk4m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_herk4m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/herk/bli_herk.c b/frame/3/herk/bli_herk.c index e32de09e0..9cd5c93cb 100644 --- a/frame/3/herk/bli_herk.c +++ b/frame/3/herk/bli_herk.c @@ -34,8 +34,6 @@ #include "blis.h" -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -44,19 +42,10 @@ void bli_herk( obj_t* alpha, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_herk4m( alpha, a, beta, c ); - - bli_herk_front( alpha, a, beta, c, - herk_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_herk4m_entry( alpha, a, beta, c ); + else + bli_herk_entry( alpha, a, beta, c ); } // diff --git a/frame/3/herk/bli_herk.h b/frame/3/herk/bli_herk.h index 9c70b4dde..a488ccf08 100644 --- a/frame/3/herk/bli_herk.h +++ b/frame/3/herk/bli_herk.h @@ -34,6 +34,7 @@ #include "bli_herk_cntl.h" #include "bli_herk_check.h" +#include "bli_herk_entry.h" #include "bli_herk_front.h" #include "bli_herk_int.h" #include "bli_herk_target.h" diff --git a/frame/3/herk/bli_herk_entry.c b/frame/3/herk/bli_herk_entry.c new file mode 100644 index 000000000..484e3264e --- /dev/null +++ b/frame/3/herk/bli_herk_entry.c @@ -0,0 +1,47 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk_cntl; + +void bli_herk_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ) +{ + bli_herk_front( alpha, a, beta, c, + herk_cntl ); +} + diff --git a/frame/3/herk/bli_herk_entry.h b/frame/3/herk/bli_herk_entry.h new file mode 100644 index 000000000..6b3599ae1 --- /dev/null +++ b/frame/3/herk/bli_herk_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_herk_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/symm/3m/bli_symm3m.c b/frame/3/symm/3m/bli_symm3m.c index 09699d212..5fe67dc29 100644 --- a/frame/3/symm/3m/bli_symm3m.c +++ b/frame/3/symm/3m/bli_symm3m.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm3m_cntl; - // // Define object-based interface. // @@ -46,8 +44,12 @@ void bli_symm3m( side_t side, obj_t* beta, obj_t* c ) { - bli_symm_front( side, alpha, a, b, beta, c, - gemm3m_cntl ); + // Since 3m only applies to the complex domain, we use the regular + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_symm3m_entry( side, alpha, a, b, beta, c ); + else + bli_symm_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/symm/3m/bli_symm3m.h b/frame/3/symm/3m/bli_symm3m.h index 4576d200b..d823de20b 100644 --- a/frame/3/symm/3m/bli_symm3m.h +++ b/frame/3/symm/3m/bli_symm3m.h @@ -32,6 +32,8 @@ */ +#include "bli_symm3m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/symm/3m/bli_symm3m_entry.c b/frame/3/symm/3m/bli_symm3m_entry.c new file mode 100644 index 000000000..f19b35638 --- /dev/null +++ b/frame/3/symm/3m/bli_symm3m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm3m_cntl; + +void bli_symm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_symm_front( side, alpha, a, b, beta, c, + gemm3m_cntl ); +} + diff --git a/frame/3/symm/3m/bli_symm3m_entry.h b/frame/3/symm/3m/bli_symm3m_entry.h new file mode 100644 index 000000000..dbd63df34 --- /dev/null +++ b/frame/3/symm/3m/bli_symm3m_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_symm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/symm/4m/bli_symm4m.c b/frame/3/symm/4m/bli_symm4m.c index 8c997efd0..5e0df03ef 100644 --- a/frame/3/symm/4m/bli_symm4m.c +++ b/frame/3/symm/4m/bli_symm4m.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm4m_cntl; - // // Define object-based interface. // @@ -46,8 +44,12 @@ void bli_symm4m( side_t side, obj_t* beta, obj_t* c ) { - bli_symm_front( side, alpha, a, b, beta, c, - gemm4m_cntl ); + // Since 4m only applies to the complex domain, we use the regular + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_symm4m_entry( side, alpha, a, b, beta, c ); + else + bli_symm_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/symm/4m/bli_symm4m.h b/frame/3/symm/4m/bli_symm4m.h index 875581ecb..14f554631 100644 --- a/frame/3/symm/4m/bli_symm4m.h +++ b/frame/3/symm/4m/bli_symm4m.h @@ -32,6 +32,8 @@ */ +#include "bli_symm4m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/symm/4m/bli_symm4m_entry.c b/frame/3/symm/4m/bli_symm4m_entry.c new file mode 100644 index 000000000..bee823e70 --- /dev/null +++ b/frame/3/symm/4m/bli_symm4m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm4m_cntl; + +void bli_symm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_symm_front( side, alpha, a, b, beta, c, + gemm4m_cntl ); +} + diff --git a/frame/3/symm/4m/bli_symm4m_entry.h b/frame/3/symm/4m/bli_symm4m_entry.h new file mode 100644 index 000000000..38ea4c8da --- /dev/null +++ b/frame/3/symm/4m/bli_symm4m_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_symm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/symm/bli_symm.c b/frame/3/symm/bli_symm.c index 19c8fa609..459b69cc3 100644 --- a/frame/3/symm/bli_symm.c +++ b/frame/3/symm/bli_symm.c @@ -34,8 +34,6 @@ #include "blis.h" -extern gemm_t* gemm_cntl; - // // Define object-based interface. // @@ -46,19 +44,10 @@ void bli_symm( side_t side, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_symm4m( side, alpha, a, b, beta, c ); - - bli_symm_front( side, alpha, a, b, beta, c, - gemm_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_symm4m_entry( side, alpha, a, b, beta, c ); + else + bli_symm_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/symm/bli_symm.h b/frame/3/symm/bli_symm.h index a920d372e..85b87b0b0 100644 --- a/frame/3/symm/bli_symm.h +++ b/frame/3/symm/bli_symm.h @@ -33,6 +33,7 @@ */ #include "bli_symm_check.h" +#include "bli_symm_entry.h" #include "bli_symm_front.h" #include "bli_symm4m.h" diff --git a/frame/3/symm/bli_symm_entry.c b/frame/3/symm/bli_symm_entry.c new file mode 100644 index 000000000..d128f8297 --- /dev/null +++ b/frame/3/symm/bli_symm_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern gemm_t* gemm_cntl; + +void bli_symm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_symm_front( side, alpha, a, b, beta, c, + gemm_cntl ); +} + diff --git a/frame/3/symm/bli_symm_entry.h b/frame/3/symm/bli_symm_entry.h new file mode 100644 index 000000000..96b82dde3 --- /dev/null +++ b/frame/3/symm/bli_symm_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_symm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/syr2k/3m/bli_syr2k3m.c b/frame/3/syr2k/3m/bli_syr2k3m.c index 161239374..40db98ad0 100644 --- a/frame/3/syr2k/3m/bli_syr2k3m.c +++ b/frame/3/syr2k/3m/bli_syr2k3m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk3m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -46,15 +43,12 @@ void bli_syr2k3m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 3m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk3m_cntl; - else cntl = herk_cntl; - - bli_syr2k_front( alpha, a, b, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_syr2k3m_entry( alpha, a, b, beta, c ); + else + bli_syr2k_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/syr2k/3m/bli_syr2k3m.h b/frame/3/syr2k/3m/bli_syr2k3m.h index b1334d553..1d50c32e5 100644 --- a/frame/3/syr2k/3m/bli_syr2k3m.h +++ b/frame/3/syr2k/3m/bli_syr2k3m.h @@ -32,6 +32,8 @@ */ +#include "bli_syr2k3m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/syr2k/3m/bli_syr2k3m_entry.c b/frame/3/syr2k/3m/bli_syr2k3m_entry.c new file mode 100644 index 000000000..50c3de641 --- /dev/null +++ b/frame/3/syr2k/3m/bli_syr2k3m_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk3m_cntl; + +void bli_syr2k3m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_syr2k_front( alpha, a, b, beta, c, + herk3m_cntl ); +} + diff --git a/frame/3/syr2k/3m/bli_syr2k3m_entry.h b/frame/3/syr2k/3m/bli_syr2k3m_entry.h new file mode 100644 index 000000000..1d6bb0298 --- /dev/null +++ b/frame/3/syr2k/3m/bli_syr2k3m_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_syr2k3m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/syr2k/4m/bli_syr2k4m.c b/frame/3/syr2k/4m/bli_syr2k4m.c index 557cb79a5..520d4a78f 100644 --- a/frame/3/syr2k/4m/bli_syr2k4m.c +++ b/frame/3/syr2k/4m/bli_syr2k4m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk4m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -46,15 +43,12 @@ void bli_syr2k4m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 4m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk4m_cntl; - else cntl = herk_cntl; - - bli_syr2k_front( alpha, a, b, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_syr2k4m_entry( alpha, a, b, beta, c ); + else + bli_syr2k_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/syr2k/4m/bli_syr2k4m.h b/frame/3/syr2k/4m/bli_syr2k4m.h index 31d92457f..66a6319d1 100644 --- a/frame/3/syr2k/4m/bli_syr2k4m.h +++ b/frame/3/syr2k/4m/bli_syr2k4m.h @@ -32,6 +32,8 @@ */ +#include "bli_syr2k4m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/syr2k/4m/bli_syr2k4m_entry.c b/frame/3/syr2k/4m/bli_syr2k4m_entry.c new file mode 100644 index 000000000..ede9c5daf --- /dev/null +++ b/frame/3/syr2k/4m/bli_syr2k4m_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk4m_cntl; + +void bli_syr2k4m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_syr2k_front( alpha, a, b, beta, c, + herk4m_cntl ); +} + diff --git a/frame/3/syr2k/4m/bli_syr2k4m_entry.h b/frame/3/syr2k/4m/bli_syr2k4m_entry.h new file mode 100644 index 000000000..df7f124ee --- /dev/null +++ b/frame/3/syr2k/4m/bli_syr2k4m_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_syr2k4m_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/syr2k/bli_syr2k.c b/frame/3/syr2k/bli_syr2k.c index da99e1f56..d56a98a5c 100644 --- a/frame/3/syr2k/bli_syr2k.c +++ b/frame/3/syr2k/bli_syr2k.c @@ -34,9 +34,6 @@ #include "blis.h" -//extern her2k_t* her2k_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -46,19 +43,10 @@ void bli_syr2k( obj_t* alpha, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_syr2k4m( alpha, a, b, beta, c ); - - bli_syr2k_front( alpha, a, b, beta, c, - herk_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_syr2k4m_entry( alpha, a, b, beta, c ); + else + bli_syr2k_entry( alpha, a, b, beta, c ); } // diff --git a/frame/3/syr2k/bli_syr2k.h b/frame/3/syr2k/bli_syr2k.h index 272bb2cfd..313164041 100644 --- a/frame/3/syr2k/bli_syr2k.h +++ b/frame/3/syr2k/bli_syr2k.h @@ -33,6 +33,7 @@ */ #include "bli_syr2k_check.h" +#include "bli_syr2k_entry.h" #include "bli_syr2k_front.h" #include "bli_syr2k4m.h" diff --git a/frame/3/syr2k/bli_syr2k_entry.c b/frame/3/syr2k/bli_syr2k_entry.c new file mode 100644 index 000000000..55f3a6867 --- /dev/null +++ b/frame/3/syr2k/bli_syr2k_entry.c @@ -0,0 +1,48 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk_cntl; + +void bli_syr2k_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_syr2k_front( alpha, a, b, beta, c, + herk_cntl ); +} + diff --git a/frame/3/syr2k/bli_syr2k_entry.h b/frame/3/syr2k/bli_syr2k_entry.h new file mode 100644 index 000000000..164b977b7 --- /dev/null +++ b/frame/3/syr2k/bli_syr2k_entry.h @@ -0,0 +1,40 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_syr2k_entry( obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/syrk/3m/bli_syrk3m.c b/frame/3/syrk/3m/bli_syrk3m.c index 05d776864..8e639ec17 100644 --- a/frame/3/syrk/3m/bli_syrk3m.c +++ b/frame/3/syrk/3m/bli_syrk3m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk3m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -45,15 +42,12 @@ void bli_syrk3m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 3m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk3m_cntl; - else cntl = herk_cntl; - - bli_syrk_front( alpha, a, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_syrk3m_entry( alpha, a, beta, c ); + else + bli_syrk_entry( alpha, a, beta, c ); } // diff --git a/frame/3/syrk/3m/bli_syrk3m.h b/frame/3/syrk/3m/bli_syrk3m.h index 094b7802f..ecabd0020 100644 --- a/frame/3/syrk/3m/bli_syrk3m.h +++ b/frame/3/syrk/3m/bli_syrk3m.h @@ -32,6 +32,8 @@ */ +#include "bli_syrk3m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/syrk/3m/bli_syrk3m_entry.c b/frame/3/syrk/3m/bli_syrk3m_entry.c new file mode 100644 index 000000000..2e2528c1d --- /dev/null +++ b/frame/3/syrk/3m/bli_syrk3m_entry.c @@ -0,0 +1,47 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk3m_cntl; + +void bli_syrk3m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ) +{ + bli_syrk_front( alpha, a, beta, c, + herk3m_cntl ); +} + diff --git a/frame/3/syrk/3m/bli_syrk3m_entry.h b/frame/3/syrk/3m/bli_syrk3m_entry.h new file mode 100644 index 000000000..ed0646332 --- /dev/null +++ b/frame/3/syrk/3m/bli_syrk3m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_syrk3m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/syrk/4m/bli_syrk4m.c b/frame/3/syrk/4m/bli_syrk4m.c index ea747f82b..5f190cb29 100644 --- a/frame/3/syrk/4m/bli_syrk4m.c +++ b/frame/3/syrk/4m/bli_syrk4m.c @@ -34,9 +34,6 @@ #include "blis.h" -extern herk_t* herk4m_cntl; -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -45,15 +42,12 @@ void bli_syrk4m( obj_t* alpha, obj_t* beta, obj_t* c ) { - herk_t* cntl; - // Since 4m only applies to the complex domain, we use the regular - // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) cntl = herk4m_cntl; - else cntl = herk_cntl; - - bli_syrk_front( alpha, a, beta, c, - cntl ); + // implementation for real domain cases. + if ( bli_obj_is_complex( *c ) ) + bli_syrk4m_entry( alpha, a, beta, c ); + else + bli_syrk_entry( alpha, a, beta, c ); } // diff --git a/frame/3/syrk/4m/bli_syrk4m.h b/frame/3/syrk/4m/bli_syrk4m.h index 62e168a1e..f8554ecfa 100644 --- a/frame/3/syrk/4m/bli_syrk4m.h +++ b/frame/3/syrk/4m/bli_syrk4m.h @@ -32,6 +32,8 @@ */ +#include "bli_syrk4m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/syrk/4m/bli_syrk4m_entry.c b/frame/3/syrk/4m/bli_syrk4m_entry.c new file mode 100644 index 000000000..5f5034567 --- /dev/null +++ b/frame/3/syrk/4m/bli_syrk4m_entry.c @@ -0,0 +1,47 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk4m_cntl; + +void bli_syrk4m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ) +{ + bli_syrk_front( alpha, a, beta, c, + herk4m_cntl ); +} + diff --git a/frame/3/syrk/4m/bli_syrk4m_entry.h b/frame/3/syrk/4m/bli_syrk4m_entry.h new file mode 100644 index 000000000..0434fb2a3 --- /dev/null +++ b/frame/3/syrk/4m/bli_syrk4m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_syrk4m_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/syrk/bli_syrk.c b/frame/3/syrk/bli_syrk.c index 9c7a00787..2a09b430f 100644 --- a/frame/3/syrk/bli_syrk.c +++ b/frame/3/syrk/bli_syrk.c @@ -34,8 +34,6 @@ #include "blis.h" -extern herk_t* herk_cntl; - // // Define object-based interface. // @@ -44,19 +42,10 @@ void bli_syrk( obj_t* alpha, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_syrk4m( alpha, a, beta, c ); - - bli_syrk_front( alpha, a, beta, c, - herk_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_syrk4m_entry( alpha, a, beta, c ); + else + bli_syrk_entry( alpha, a, beta, c ); } // diff --git a/frame/3/syrk/bli_syrk.h b/frame/3/syrk/bli_syrk.h index fbdf2d50a..cba072d98 100644 --- a/frame/3/syrk/bli_syrk.h +++ b/frame/3/syrk/bli_syrk.h @@ -33,6 +33,7 @@ */ #include "bli_syrk_check.h" +#include "bli_syrk_entry.h" #include "bli_syrk_front.h" #include "bli_syrk4m.h" diff --git a/frame/3/syrk/bli_syrk_entry.c b/frame/3/syrk/bli_syrk_entry.c new file mode 100644 index 000000000..3cc6ad892 --- /dev/null +++ b/frame/3/syrk/bli_syrk_entry.c @@ -0,0 +1,47 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern herk_t* herk_cntl; + +void bli_syrk_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ) +{ + bli_syrk_front( alpha, a, beta, c, + herk_cntl ); +} + diff --git a/frame/3/syrk/bli_syrk_entry.h b/frame/3/syrk/bli_syrk_entry.h new file mode 100644 index 000000000..794beea05 --- /dev/null +++ b/frame/3/syrk/bli_syrk_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_syrk_entry( obj_t* alpha, + obj_t* a, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/trmm/3m/bli_trmm3m.c b/frame/3/trmm/3m/bli_trmm3m.c index c5de7f1b7..4bee7e39e 100644 --- a/frame/3/trmm/3m/bli_trmm3m.c +++ b/frame/3/trmm/3m/bli_trmm3m.c @@ -34,11 +34,6 @@ #include "blis.h" -extern trmm_t* trmm3m_l_cntl; -extern trmm_t* trmm3m_r_cntl; -extern trmm_t* trmm_l_cntl; -extern trmm_t* trmm_r_cntl; - // // Define object-based interface. // @@ -47,17 +42,12 @@ void bli_trmm3m( side_t side, obj_t* a, obj_t* b ) { - trmm_t* l_cntl; - trmm_t* r_cntl; - // Since 3m only applies to the complex domain, we use the regular // control tree for real domain cases. - if ( bli_obj_is_complex( *b ) ) { l_cntl = trmm3m_l_cntl; r_cntl = trmm3m_r_cntl; } - else { l_cntl = trmm_l_cntl; r_cntl = trmm_r_cntl; } - - bli_trmm_front( side, alpha, a, b, - l_cntl, - r_cntl ); + if ( bli_obj_is_complex( *b ) ) + bli_trmm3m_entry( side, alpha, a, b ); + else + bli_trmm_entry( side, alpha, a, b ); } // diff --git a/frame/3/trmm/3m/bli_trmm3m.h b/frame/3/trmm/3m/bli_trmm3m.h index 48f892ede..197b5320d 100644 --- a/frame/3/trmm/3m/bli_trmm3m.h +++ b/frame/3/trmm/3m/bli_trmm3m.h @@ -33,6 +33,7 @@ */ #include "bli_trmm3m_cntl.h" +#include "bli_trmm3m_entry.h" // diff --git a/frame/3/trmm/3m/bli_trmm3m_entry.c b/frame/3/trmm/3m/bli_trmm3m_entry.c new file mode 100644 index 000000000..acb8ec4b9 --- /dev/null +++ b/frame/3/trmm/3m/bli_trmm3m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trmm_t* trmm3m_l_cntl; +extern trmm_t* trmm3m_r_cntl; + +void bli_trmm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ) +{ + bli_trmm_front( side, alpha, a, b, + trmm3m_l_cntl, + trmm3m_r_cntl ); +} + diff --git a/frame/3/trmm/3m/bli_trmm3m_entry.h b/frame/3/trmm/3m/bli_trmm3m_entry.h new file mode 100644 index 000000000..9ffc0689f --- /dev/null +++ b/frame/3/trmm/3m/bli_trmm3m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trmm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ); + diff --git a/frame/3/trmm/4m/bli_trmm4m.c b/frame/3/trmm/4m/bli_trmm4m.c index 30a966179..66982a8aa 100644 --- a/frame/3/trmm/4m/bli_trmm4m.c +++ b/frame/3/trmm/4m/bli_trmm4m.c @@ -34,11 +34,6 @@ #include "blis.h" -extern trmm_t* trmm4m_l_cntl; -extern trmm_t* trmm4m_r_cntl; -extern trmm_t* trmm_l_cntl; -extern trmm_t* trmm_r_cntl; - // // Define object-based interface. // @@ -47,17 +42,12 @@ void bli_trmm4m( side_t side, obj_t* a, obj_t* b ) { - trmm_t* l_cntl; - trmm_t* r_cntl; - // Since 4m only applies to the complex domain, we use the regular // control tree for real domain cases. - if ( bli_obj_is_complex( *b ) ) { l_cntl = trmm4m_l_cntl; r_cntl = trmm4m_r_cntl; } - else { l_cntl = trmm_l_cntl; r_cntl = trmm_r_cntl; } - - bli_trmm_front( side, alpha, a, b, - l_cntl, - r_cntl ); + if ( bli_obj_is_complex( *b ) ) + bli_trmm4m_entry( side, alpha, a, b ); + else + bli_trmm_entry( side, alpha, a, b ); } // diff --git a/frame/3/trmm/4m/bli_trmm4m.h b/frame/3/trmm/4m/bli_trmm4m.h index c37825224..7af55fca4 100644 --- a/frame/3/trmm/4m/bli_trmm4m.h +++ b/frame/3/trmm/4m/bli_trmm4m.h @@ -33,6 +33,7 @@ */ #include "bli_trmm4m_cntl.h" +#include "bli_trmm4m_entry.h" // diff --git a/frame/3/trmm/4m/bli_trmm4m_entry.c b/frame/3/trmm/4m/bli_trmm4m_entry.c new file mode 100644 index 000000000..be9794c37 --- /dev/null +++ b/frame/3/trmm/4m/bli_trmm4m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trmm_t* trmm4m_l_cntl; +extern trmm_t* trmm4m_r_cntl; + +void bli_trmm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ) +{ + bli_trmm_front( side, alpha, a, b, + trmm4m_l_cntl, + trmm4m_r_cntl ); +} + diff --git a/frame/3/trmm/4m/bli_trmm4m_entry.h b/frame/3/trmm/4m/bli_trmm4m_entry.h new file mode 100644 index 000000000..2b411056b --- /dev/null +++ b/frame/3/trmm/4m/bli_trmm4m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trmm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ); + diff --git a/frame/3/trmm/bli_trmm.c b/frame/3/trmm/bli_trmm.c index a1546cb70..e178de8e6 100644 --- a/frame/3/trmm/bli_trmm.c +++ b/frame/3/trmm/bli_trmm.c @@ -34,9 +34,6 @@ #include "blis.h" -extern trmm_t* trmm_l_cntl; -extern trmm_t* trmm_r_cntl; - // // Define object-based interface. // @@ -45,20 +42,10 @@ void bli_trmm( side_t side, obj_t* a, obj_t* b ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *b ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *b ) || -#endif - FALSE - ) - return bli_trmm4m( side, alpha, a, b ); - - bli_trmm_front( side, alpha, a, b, - trmm_l_cntl, - trmm_r_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *b ) ) ) + bli_trmm4m_entry( side, alpha, a, b ); + else + bli_trmm_entry( side, alpha, a, b ); } // diff --git a/frame/3/trmm/bli_trmm.h b/frame/3/trmm/bli_trmm.h index 9c06d805f..9e2f7c110 100644 --- a/frame/3/trmm/bli_trmm.h +++ b/frame/3/trmm/bli_trmm.h @@ -34,6 +34,7 @@ #include "bli_trmm_cntl.h" #include "bli_trmm_check.h" +#include "bli_trmm_entry.h" #include "bli_trmm_front.h" #include "bli_trmm_int.h" #include "bli_trmm_target.h" diff --git a/frame/3/trmm/bli_trmm_entry.c b/frame/3/trmm/bli_trmm_entry.c new file mode 100644 index 000000000..5b76725b3 --- /dev/null +++ b/frame/3/trmm/bli_trmm_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trmm_t* trmm_l_cntl; +extern trmm_t* trmm_r_cntl; + +void bli_trmm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ) +{ + bli_trmm_front( side, alpha, a, b, + trmm_l_cntl, + trmm_r_cntl ); +} + diff --git a/frame/3/trmm/bli_trmm_entry.h b/frame/3/trmm/bli_trmm_entry.h new file mode 100644 index 000000000..a2da5b45c --- /dev/null +++ b/frame/3/trmm/bli_trmm_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trmm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ); + diff --git a/frame/3/trmm3/3m/bli_trmm33m.c b/frame/3/trmm3/3m/bli_trmm33m.c index e47bff085..a345624c0 100644 --- a/frame/3/trmm3/3m/bli_trmm33m.c +++ b/frame/3/trmm3/3m/bli_trmm33m.c @@ -34,11 +34,6 @@ #include "blis.h" -extern trmm_t* trmm3m_l_cntl; -extern trmm_t* trmm3m_r_cntl; -extern trmm_t* trmm_l_cntl; -extern trmm_t* trmm_r_cntl; - // // Define object-based interface. // @@ -49,17 +44,12 @@ void bli_trmm33m( side_t side, obj_t* beta, obj_t* c ) { - trmm_t* l_cntl; - trmm_t* r_cntl; - // Since 3m only applies to the complex domain, we use the regular // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) { l_cntl = trmm3m_l_cntl; r_cntl = trmm3m_r_cntl; } - else { l_cntl = trmm_l_cntl; r_cntl = trmm_r_cntl; } - - bli_trmm3_front( side, alpha, a, b, beta, c, - l_cntl, - r_cntl ); + if ( bli_obj_is_complex( *c ) ) + bli_trmm33m_entry( side, alpha, a, b, beta, c ); + else + bli_trmm3_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/trmm3/3m/bli_trmm33m.h b/frame/3/trmm3/3m/bli_trmm33m.h index e8b32a166..1d88e4d72 100644 --- a/frame/3/trmm3/3m/bli_trmm33m.h +++ b/frame/3/trmm3/3m/bli_trmm33m.h @@ -32,6 +32,8 @@ */ +#include "bli_trmm33m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/trmm3/3m/bli_trmm33m_entry.c b/frame/3/trmm3/3m/bli_trmm33m_entry.c new file mode 100644 index 000000000..dd5196b2c --- /dev/null +++ b/frame/3/trmm3/3m/bli_trmm33m_entry.c @@ -0,0 +1,51 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trmm_t* trmm3m_l_cntl; +extern trmm_t* trmm3m_r_cntl; + +void bli_trmm33m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_trmm3_front( side, alpha, a, b, beta, c, + trmm3m_l_cntl, + trmm3m_r_cntl ); +} + diff --git a/frame/3/trmm3/3m/bli_trmm33m_entry.h b/frame/3/trmm3/3m/bli_trmm33m_entry.h new file mode 100644 index 000000000..72224d521 --- /dev/null +++ b/frame/3/trmm3/3m/bli_trmm33m_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trmm33m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/trmm3/4m/bli_trmm34m.c b/frame/3/trmm3/4m/bli_trmm34m.c index 07235dc82..092ea51b9 100644 --- a/frame/3/trmm3/4m/bli_trmm34m.c +++ b/frame/3/trmm3/4m/bli_trmm34m.c @@ -34,11 +34,6 @@ #include "blis.h" -extern trmm_t* trmm4m_l_cntl; -extern trmm_t* trmm4m_r_cntl; -extern trmm_t* trmm_l_cntl; -extern trmm_t* trmm_r_cntl; - // // Define object-based interface. // @@ -49,17 +44,12 @@ void bli_trmm34m( side_t side, obj_t* beta, obj_t* c ) { - trmm_t* l_cntl; - trmm_t* r_cntl; - // Since 4m only applies to the complex domain, we use the regular // control tree for real domain cases. - if ( bli_obj_is_complex( *c ) ) { l_cntl = trmm4m_l_cntl; r_cntl = trmm4m_r_cntl; } - else { l_cntl = trmm_l_cntl; r_cntl = trmm_r_cntl; } - - bli_trmm3_front( side, alpha, a, b, beta, c, - l_cntl, - r_cntl ); + if ( bli_obj_is_complex( *c ) ) + bli_trmm34m_entry( side, alpha, a, b, beta, c ); + else + bli_trmm3_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/trmm3/4m/bli_trmm34m.h b/frame/3/trmm3/4m/bli_trmm34m.h index 451982201..71c0e099b 100644 --- a/frame/3/trmm3/4m/bli_trmm34m.h +++ b/frame/3/trmm3/4m/bli_trmm34m.h @@ -32,6 +32,8 @@ */ +#include "bli_trmm34m_entry.h" + // // Prototype object-based interface. diff --git a/frame/3/trmm3/4m/bli_trmm34m_entry.c b/frame/3/trmm3/4m/bli_trmm34m_entry.c new file mode 100644 index 000000000..20ebb1b69 --- /dev/null +++ b/frame/3/trmm3/4m/bli_trmm34m_entry.c @@ -0,0 +1,51 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trmm_t* trmm4m_l_cntl; +extern trmm_t* trmm4m_r_cntl; + +void bli_trmm34m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_trmm3_front( side, alpha, a, b, beta, c, + trmm4m_l_cntl, + trmm4m_r_cntl ); +} + diff --git a/frame/3/trmm3/4m/bli_trmm34m_entry.h b/frame/3/trmm3/4m/bli_trmm34m_entry.h new file mode 100644 index 000000000..8b273330f --- /dev/null +++ b/frame/3/trmm3/4m/bli_trmm34m_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trmm34m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/trmm3/bli_trmm3.c b/frame/3/trmm3/bli_trmm3.c index 2740194f9..37b588662 100644 --- a/frame/3/trmm3/bli_trmm3.c +++ b/frame/3/trmm3/bli_trmm3.c @@ -34,9 +34,6 @@ #include "blis.h" -extern trmm_t* trmm_l_cntl; -extern trmm_t* trmm_r_cntl; - // // Define object-based interface. // @@ -47,20 +44,10 @@ void bli_trmm3( side_t side, obj_t* beta, obj_t* c ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *c ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *c ) || -#endif - FALSE - ) - return bli_trmm34m( side, alpha, a, b, beta, c ); - - bli_trmm3_front( side, alpha, a, b, beta, c, - trmm_l_cntl, - trmm_r_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *c ) ) ) + bli_trmm34m_entry( side, alpha, a, b, beta, c ); + else + bli_trmm3_entry( side, alpha, a, b, beta, c ); } // diff --git a/frame/3/trmm3/bli_trmm3.h b/frame/3/trmm3/bli_trmm3.h index 9fad723bd..e7e039d8a 100644 --- a/frame/3/trmm3/bli_trmm3.h +++ b/frame/3/trmm3/bli_trmm3.h @@ -33,6 +33,7 @@ */ #include "bli_trmm3_check.h" +#include "bli_trmm3_entry.h" #include "bli_trmm3_front.h" #include "bli_trmm34m.h" diff --git a/frame/3/trmm3/bli_trmm3_entry.c b/frame/3/trmm3/bli_trmm3_entry.c new file mode 100644 index 000000000..3e68e48f0 --- /dev/null +++ b/frame/3/trmm3/bli_trmm3_entry.c @@ -0,0 +1,51 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trmm_t* trmm_l_cntl; +extern trmm_t* trmm_r_cntl; + +void bli_trmm3_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ) +{ + bli_trmm3_front( side, alpha, a, b, beta, c, + trmm_l_cntl, + trmm_r_cntl ); +} + diff --git a/frame/3/trmm3/bli_trmm3_entry.h b/frame/3/trmm3/bli_trmm3_entry.h new file mode 100644 index 000000000..86f04c117 --- /dev/null +++ b/frame/3/trmm3/bli_trmm3_entry.h @@ -0,0 +1,41 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trmm3_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b, + obj_t* beta, + obj_t* c ); + diff --git a/frame/3/trsm/3m/bli_trsm3m.c b/frame/3/trsm/3m/bli_trsm3m.c index 32b8a4434..e1c63a024 100644 --- a/frame/3/trsm/3m/bli_trsm3m.c +++ b/frame/3/trsm/3m/bli_trsm3m.c @@ -34,11 +34,6 @@ #include "blis.h" -extern trsm_t* trsm3m_l_cntl; -extern trsm_t* trsm3m_r_cntl; -extern trsm_t* trsm_l_cntl; -extern trsm_t* trsm_r_cntl; - // // Define object-based interface. // @@ -47,17 +42,12 @@ void bli_trsm3m( side_t side, obj_t* a, obj_t* b ) { - trsm_t* l_cntl; - trsm_t* r_cntl; - // Since 3m only applies to the complex domain, we use the regular // control tree for real domain cases. - if ( bli_obj_is_complex( *b ) ) { l_cntl = trsm3m_l_cntl; r_cntl = trsm3m_r_cntl; } - else { l_cntl = trsm_l_cntl; r_cntl = trsm_r_cntl; } - - bli_trsm_front( side, alpha, a, b, - l_cntl, - r_cntl ); + if ( bli_obj_is_complex( *b ) ) + bli_trsm3m_entry( side, alpha, a, b ); + else + bli_trsm_entry( side, alpha, a, b ); } // diff --git a/frame/3/trsm/3m/bli_trsm3m.h b/frame/3/trsm/3m/bli_trsm3m.h index 90d98af37..2c3136d41 100644 --- a/frame/3/trsm/3m/bli_trsm3m.h +++ b/frame/3/trsm/3m/bli_trsm3m.h @@ -33,6 +33,7 @@ */ #include "bli_trsm3m_cntl.h" +#include "bli_trsm3m_entry.h" #include "bli_gemmtrsm3m_l_ukr_ref.h" #include "bli_gemmtrsm3m_u_ukr_ref.h" diff --git a/frame/3/trsm/3m/bli_trsm3m_entry.c b/frame/3/trsm/3m/bli_trsm3m_entry.c new file mode 100644 index 000000000..1b95b76df --- /dev/null +++ b/frame/3/trsm/3m/bli_trsm3m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trsm_t* trsm3m_l_cntl; +extern trsm_t* trsm3m_r_cntl; + +void bli_trsm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ) +{ + bli_trsm_front( side, alpha, a, b, + trsm3m_l_cntl, + trsm3m_r_cntl ); +} + diff --git a/frame/3/trsm/3m/bli_trsm3m_entry.h b/frame/3/trsm/3m/bli_trsm3m_entry.h new file mode 100644 index 000000000..a5e542182 --- /dev/null +++ b/frame/3/trsm/3m/bli_trsm3m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trsm3m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ); + diff --git a/frame/3/trsm/4m/bli_trsm4m.c b/frame/3/trsm/4m/bli_trsm4m.c index d3564703a..9a3c51bf8 100644 --- a/frame/3/trsm/4m/bli_trsm4m.c +++ b/frame/3/trsm/4m/bli_trsm4m.c @@ -34,11 +34,6 @@ #include "blis.h" -extern trsm_t* trsm4m_l_cntl; -extern trsm_t* trsm4m_r_cntl; -extern trsm_t* trsm_l_cntl; -extern trsm_t* trsm_r_cntl; - // // Define object-based interface. // @@ -47,17 +42,12 @@ void bli_trsm4m( side_t side, obj_t* a, obj_t* b ) { - trsm_t* l_cntl; - trsm_t* r_cntl; - // Since 4m only applies to the complex domain, we use the regular // control tree for real domain cases. - if ( bli_obj_is_complex( *b ) ) { l_cntl = trsm4m_l_cntl; r_cntl = trsm4m_r_cntl; } - else { l_cntl = trsm_l_cntl; r_cntl = trsm_r_cntl; } - - bli_trsm_front( side, alpha, a, b, - l_cntl, - r_cntl ); + if ( bli_obj_is_complex( *b ) ) + bli_trsm4m_entry( side, alpha, a, b ); + else + bli_trsm_entry( side, alpha, a, b ); } // diff --git a/frame/3/trsm/4m/bli_trsm4m.h b/frame/3/trsm/4m/bli_trsm4m.h index 95ccbec6d..1d705a930 100644 --- a/frame/3/trsm/4m/bli_trsm4m.h +++ b/frame/3/trsm/4m/bli_trsm4m.h @@ -33,6 +33,7 @@ */ #include "bli_trsm4m_cntl.h" +#include "bli_trsm4m_entry.h" #include "bli_gemmtrsm4m_l_ukr_ref.h" #include "bli_gemmtrsm4m_u_ukr_ref.h" diff --git a/frame/3/trsm/4m/bli_trsm4m_entry.c b/frame/3/trsm/4m/bli_trsm4m_entry.c new file mode 100644 index 000000000..c56b7ae32 --- /dev/null +++ b/frame/3/trsm/4m/bli_trsm4m_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trsm_t* trsm4m_l_cntl; +extern trsm_t* trsm4m_r_cntl; + +void bli_trsm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ) +{ + bli_trsm_front( side, alpha, a, b, + trsm4m_l_cntl, + trsm4m_r_cntl ); +} + diff --git a/frame/3/trsm/4m/bli_trsm4m_entry.h b/frame/3/trsm/4m/bli_trsm4m_entry.h new file mode 100644 index 000000000..3a5b906a4 --- /dev/null +++ b/frame/3/trsm/4m/bli_trsm4m_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trsm4m_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ); + diff --git a/frame/3/trsm/bli_trsm.c b/frame/3/trsm/bli_trsm.c index ef7b1afbc..14c4983b1 100644 --- a/frame/3/trsm/bli_trsm.c +++ b/frame/3/trsm/bli_trsm.c @@ -34,9 +34,6 @@ #include "blis.h" -extern trsm_t* trsm_l_cntl; -extern trsm_t* trsm_r_cntl; - // // Define object-based interface. // @@ -45,20 +42,10 @@ void bli_trsm( side_t side, obj_t* a, obj_t* b ) { - if ( -#ifdef BLIS_ENABLE_SCOMPLEX_VIA_4M - bli_obj_is_scomplex( *b ) || -#endif -#ifdef BLIS_ENABLE_DCOMPLEX_VIA_4M - bli_obj_is_dcomplex( *b ) || -#endif - FALSE - ) - return bli_trsm4m( side, alpha, a, b ); - - bli_trsm_front( side, alpha, a, b, - trsm_l_cntl, - trsm_r_cntl ); + if ( bli_4m_is_enabled( bli_obj_datatype( *b ) ) ) + bli_trsm4m_entry( side, alpha, a, b ); + else + bli_trsm_entry( side, alpha, a, b ); } // diff --git a/frame/3/trsm/bli_trsm.h b/frame/3/trsm/bli_trsm.h index ec47e974e..9b434288d 100644 --- a/frame/3/trsm/bli_trsm.h +++ b/frame/3/trsm/bli_trsm.h @@ -34,6 +34,7 @@ #include "bli_trsm_cntl.h" #include "bli_trsm_check.h" +#include "bli_trsm_entry.h" #include "bli_trsm_front.h" #include "bli_trsm_int.h" diff --git a/frame/3/trsm/bli_trsm_entry.c b/frame/3/trsm/bli_trsm_entry.c new file mode 100644 index 000000000..cca3c469b --- /dev/null +++ b/frame/3/trsm/bli_trsm_entry.c @@ -0,0 +1,49 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "blis.h" + +extern trsm_t* trsm_l_cntl; +extern trsm_t* trsm_r_cntl; + +void bli_trsm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ) +{ + bli_trsm_front( side, alpha, a, b, + trsm_l_cntl, + trsm_r_cntl ); +} + diff --git a/frame/3/trsm/bli_trsm_entry.h b/frame/3/trsm/bli_trsm_entry.h new file mode 100644 index 000000000..55a20c94d --- /dev/null +++ b/frame/3/trsm/bli_trsm_entry.h @@ -0,0 +1,39 @@ +/* + + BLIS + An object-based framework for developing high-performance BLAS-like + libraries. + + Copyright (C) 2014, The University of Texas at Austin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of The University of Texas at Austin nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +void bli_trsm_entry( side_t side, + obj_t* alpha, + obj_t* a, + obj_t* b ); +