]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - blis/frame/base/bli_3mh.c
TI Linear Algebra Library (LINALG) Rlease 1.0.0
[dense-linear-algebra-libraries/linalg.git] / blis / frame / base / bli_3mh.c
1 /*
3    BLIS    
4    An object-based framework for developing high-performance BLAS-like
5    libraries.
7    Copyright (C) 2014, The University of Texas at Austin
9    Redistribution and use in source and binary forms, with or without
10    modification, are permitted provided that the following conditions are
11    met:
12     - Redistributions of source code must retain the above copyright
13       notice, this list of conditions and the following disclaimer.
14     - Redistributions in binary form must reproduce the above copyright
15       notice, this list of conditions and the following disclaimer in the
16       documentation and/or other materials provided with the distribution.
17     - Neither the name of The University of Texas at Austin nor the names
18       of its contributors may be used to endorse or promote products
19       derived from this software without specific prior written permission.
21    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
35 #include "blis.h"
37 static char*  bli_3mh_str        = "3mh";
39 static bool_t bli_will_use_3mh_c = FALSE;
40 static bool_t bli_will_use_3mh_z = FALSE;
43 char*  bli_3mh_get_string( void ) { return bli_3mh_str; }
45 bool_t bli_3mh_is_enabled_dt( num_t dt )
46 {
47         if      ( bli_is_scomplex( dt ) ) return bli_3mh_is_enabled_c();
48         else if ( bli_is_dcomplex( dt ) ) return bli_3mh_is_enabled_z();
49         else                              return FALSE;
50 }
51 bool_t bli_3mh_is_enabled_c( void ) { return bli_will_use_3mh_c; }
52 bool_t bli_3mh_is_enabled_z( void ) { return bli_will_use_3mh_z; }
55 void bli_3mh_enable_dt( num_t dt )
56 {
57         if      ( bli_is_scomplex( dt ) ) bli_3mh_enable_c();
58         else if ( bli_is_dcomplex( dt ) ) bli_3mh_enable_z();
59 }
60 void bli_3mh_enable_c( void )  { bli_will_use_3mh_c = TRUE; }
61 void bli_3mh_enable_z( void )  { bli_will_use_3mh_z = TRUE; }
62 void bli_3mh_enable( void )    { bli_will_use_3mh_c =
63                                  bli_will_use_3mh_z = TRUE; }
66 void bli_3mh_disable_dt( num_t dt )
67 {
68         if      ( bli_is_scomplex( dt ) ) bli_3mh_disable_c();
69         else if ( bli_is_dcomplex( dt ) ) bli_3mh_disable_z();
70 }
72 void bli_3mh_disable_c( void )  { bli_will_use_3mh_c = FALSE; }
73 void bli_3mh_disable_z( void )  { bli_will_use_3mh_z = FALSE; }
74 void bli_3mh_disable( void )    { bli_will_use_3mh_c =
75                                   bli_will_use_3mh_z = FALSE; }