libflame  12600
blis_macro_defs.h
Go to the documentation of this file.
00001 /*
00002    libflame
00003    An object-based infrastructure for developing high-performance
00004    dense linear algebra libraries.
00005 
00006    Copyright (C) 2011, The University of Texas
00007 
00008    libflame is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU Lesser General Public License as
00010    published by the Free Software Foundation; either version 2.1 of
00011    the License, or (at your option) any later version.
00012 
00013    libflame is distributed in the hope that it will be useful, but
00014    WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with libflame; if you did not receive a copy, see
00020    http://www.gnu.org/licenses/.
00021 
00022    For more information, please contact us at flame@cs.utexas.edu or
00023    send mail to:
00024 
00025    Field G. Van Zee and/or
00026    Robert A. van de Geijn
00027    The University of Texas at Austin
00028    Department of Computer Sciences
00029    1 University Station C0500
00030    Austin TX 78712
00031 */
00032 
00033 #ifndef BLIS1_MACRO_DEFS_H
00034 #define BLIS1_MACRO_DEFS_H
00035 
00036 // --- Constants ---------------------------------------------------------------
00037 
00038 #define BLIS1_NO_INTRINSICS  0
00039 #define BLIS1_SSE_INTRINSICS 3
00040 
00041 // --- boolean ---
00042 
00043 #undef FALSE
00044 #define FALSE 0
00045 
00046 #undef TRUE
00047 #define TRUE 1
00048 
00049 /*
00050 // --- trans ---
00051 
00052 #define BLIS1_NO_TRANSPOSE      'n'
00053 #define BLIS1_TRANSPOSE         't'
00054 #define BLIS1_CONJ_NO_TRANSPOSE 'c'
00055 #define BLIS1_CONJ_TRANSPOSE    'h'
00056 
00057 // --- conj ---
00058 
00059 #define BLIS1_NO_CONJUGATE      'n'
00060 #define BLIS1_CONJUGATE         'c'
00061 
00062 // --- uplo ---
00063 
00064 #define BLIS1_LOWER_TRIANGULAR  'l'
00065 #define BLIS1_UPPER_TRIANGULAR  'u'
00066 
00067 // --- side ---
00068 
00069 #define BLIS1_LEFT              'l'
00070 #define BLIS1_RIGHT             'r'
00071 
00072 // --- diag ---
00073 
00074 #define BLIS1_NONUNIT_DIAG      'n'
00075 #define BLIS1_UNIT_DIAG         'u'
00076 #define BLIS1_ZERO_DIAG         'z'
00077 */
00078 
00079 // --- Functional macros -------------------------------------------------------
00080 
00081 // --- Type-agnostic ---
00082 
00083 // min, max, abs
00084 
00085 #define bl1_min( a, b )  ( (a) < (b) ? (a) : (b) )
00086 #define bl1_max( a, b )  ( (a) > (b) ? (a) : (b) )
00087 #define bl1_abs( a )     ( (a) <= 0 ? -(a) : (a) )
00088 
00089 // fmin, fmax, fabs
00090 
00091 #define bl1_fmin( a, b ) bl1_min( a, b )
00092 #define bl1_fmax( a, b ) bl1_max( a, b )
00093 #define bl1_fabs( a )    ( (a) <= 0.0 ? -(a) : (a) )
00094 
00095 // fminabs, fmaxabs
00096 #define bl1_fminabs( a, b ) \
00097 \
00098     bl1_fmin( bl1_fabs( a ), \
00099               bl1_fabs( b ) )
00100 
00101 #define bl1_fmaxabs( a, b ) \
00102 \
00103     bl1_fmax( bl1_fabs( a ), \
00104               bl1_fabs( b ) )
00105 
00106 // --- Type-dependent ---
00107 
00108 // --- neg1 ---
00109 
00110 // void bl1_sneg1( float* x );
00111 #define bl1_sneg1( x ) \
00112 *(x)     *= -1.0F;
00113 
00114 // void bl1_dneg1( double* x );
00115 #define bl1_dneg1( x ) \
00116 *(x)     *= -1.0;
00117 
00118 // void bl1_cneg1( scomplex* x );
00119 #define bl1_cneg1( x ) \
00120 (x)->real *= -1.0F; \
00121 (x)->imag *= -1.0F;
00122 
00123 // void bl1_zneg1( dcomplex* x );
00124 #define bl1_zneg1( x ) \
00125 (x)->real *= -1.0; \
00126 (x)->imag *= -1.0;
00127 
00128 // --- neg2 ---
00129 
00130 // void bl1_sneg2( float* x, float* y );
00131 #define bl1_sneg2( x, y ) \
00132 *(y)      = -1.0F * *(x);
00133 
00134 // void bl1_dneg2( double* x, double* y );
00135 #define bl1_dneg2( x, y ) \
00136 *(y)      = -1.0  * *(x);
00137 
00138 // void bl1_cneg2( scomplex* x, scomplex* y );
00139 #define bl1_cneg2( x, y ) \
00140 (y)->real = -1.0F * (x)->real; \
00141 (y)->imag = -1.0F * (x)->imag;
00142 
00143 // void bl1_zneg2( dcomplex* x, dcomplex* y );
00144 #define bl1_zneg2( x, y ) \
00145 (y)->real = -1.0  * (x)->real; \
00146 (y)->imag = -1.0  * (x)->imag;
00147 
00148 // --- sqrte ---
00149 
00150 // void bl1_ssqrte( float* alpha, int* error );
00151 #define bl1_ssqrte( alpha, error ) \
00152 if ( *(alpha)      <= 0.0F || isnan( *(alpha) ) ) {  *(error) = FLA_FAILURE; } \
00153 else { *(alpha)      =  ( float ) sqrt( *(alpha) );  *(error) = FLA_SUCCESS; }
00154 
00155 // void bl1_dsqrte( double* alpha, int* error );
00156 #define bl1_dsqrte( alpha, error ) \
00157 if ( *(alpha)      <= 0.0 || isnan( *(alpha) ) ) {   *(error) = FLA_FAILURE; } \
00158 else { *(alpha)      = ( double ) sqrt( *(alpha) );  *(error) = FLA_SUCCESS; }
00159 
00160 // void bl1_csqrte( scomplex* alpha, int* error );
00161 #define bl1_csqrte( alpha, error ) \
00162 if ( (alpha)->real <= 0.0F || isnan( (alpha)->real) ) \
00163 {                     *(error) = FLA_FAILURE; } \
00164 else { \
00165 (alpha)->real =  ( float ) sqrt( (alpha)->real ); \
00166 (alpha)->imag = 0.0F; *(error) = FLA_SUCCESS; }
00167 
00168 // void bl1_zsqrte( dcomplex* alpha, int* error );
00169 #define bl1_zsqrte( alpha, error ) \
00170 if ( (alpha)->real <= 0.0 || isnan( (alpha)->real) )  \
00171 {                     *(error) = FLA_FAILURE; } \
00172 else { \
00173 (alpha)->real = ( double ) sqrt( (alpha)->real ); \
00174 (alpha)->imag = 0.0;  *(error) = FLA_SUCCESS; }
00175 
00176 // --- absval2 ---
00177 
00178 // void bl1_sabsval2( float* alpha, float* absval );
00179 #define bl1_sabsval2( alpha, absval ) \
00180 *(absval) = ( float ) fabs( ( double ) *(alpha) );
00181 
00182 // void bl1_dabsval2( double* alpha, double* absval );
00183 #define bl1_dabsval2( alpha, absval ) \
00184 *(absval) = fabs( *(alpha) );
00185 
00186 // void bl1_cabsval2( scomplex* x, scomplex* a );
00187 #define bl1_cabsval2( x, a ) \
00188 { \
00189     float  s   = bl1_fmaxabs( (x)->real, (x)->imag ); \
00190     float  mag = sqrtf( s ) * \
00191                  sqrtf( ( (x)->real / s ) * (x)->real + \
00192                         ( (x)->imag / s ) * (x)->imag ); \
00193     (a)->real   = mag; \
00194     (a)->imag   = 0.0F; \
00195 }
00196 
00197 // void bl1_csabsval2( scomplex* x, float* a );
00198 #define bl1_csabsval2( x, a ) \
00199 { \
00200     float  s   = bl1_fmaxabs( (x)->real, (x)->imag ); \
00201     float  mag = sqrtf( s ) * \
00202                  sqrtf( ( (x)->real / s ) * (x)->real + \
00203                         ( (x)->imag / s ) * (x)->imag ); \
00204     *(a)       = mag; \
00205 }
00206 
00207 // void bl1_zabsval2( dcomplex* x, dcomplex* a );
00208 #define bl1_zabsval2( x, a ) \
00209 { \
00210     double s   = bl1_fmaxabs( (x)->real, (x)->imag ); \
00211     double mag = sqrt( s ) * \
00212                  sqrt( ( (x)->real / s ) * (x)->real + \
00213                        ( (x)->imag / s ) * (x)->imag ); \
00214     (a)->real   = mag; \
00215     (a)->imag   = 0.0; \
00216 }
00217 
00218 // void bl1_zdabsval2( dcomplex* x, double* a );
00219 #define bl1_zdabsval2( x, a ) \
00220 { \
00221     double s   = bl1_fmaxabs( (x)->real, (x)->imag ); \
00222     double mag = sqrt( s ) * \
00223                  sqrt( ( (x)->real / s ) * (x)->real + \
00224                        ( (x)->imag / s ) * (x)->imag ); \
00225     *(a)       = mag; \
00226 }
00227 
00228 
00229 // --- absqr ---
00230 
00231 // void bl1_sabsqr( float* alpha );
00232 #define bl1_sabsqr( alpha ) \
00233 *(alpha) = *(alpha) * *(alpha);
00234 
00235 // void bl1_dabsqr( double* alpha );
00236 #define bl1_dabsqr( alpha ) \
00237 *(alpha) = *(alpha) * *(alpha);
00238 
00239 // void bl1_cabsqr( scomplex* alpha );
00240 #define bl1_cabsqr( alpha ) \
00241 (alpha)->real = (alpha)->real * (alpha)->real + (alpha)->imag * (alpha)->imag; \
00242 (alpha)->imag = 0.0F;
00243 
00244 // void bl1_zabsqr( dcomplex* alpha );
00245 #define bl1_zabsqr( alpha ) \
00246 (alpha)->real = (alpha)->real * (alpha)->real + (alpha)->imag * (alpha)->imag; \
00247 (alpha)->imag = 0.0;
00248 
00249 // --- invscals ---
00250 
00251 // void bl1_sinvscals( float* a, float* y );
00252 #define bl1_sinvscals( a, y ) \
00253 *(y) = *(y) / *(a);
00254 
00255 // void bl1_dinvscals( double* a, double* y );
00256 #define bl1_dinvscals( a, y ) \
00257 *(y) = *(y) / *(a);
00258 
00259 // void bl1_csinvscals( float* a, scomplex* y );
00260 #define bl1_csinvscals( a, y ) \
00261 { \
00262 (y)->real = (y)->real / *(a); \
00263 (y)->imag = (y)->imag / *(a); \
00264 }
00265 
00266 // void bl1_cinvscals( scomplex* a, scomplex* y );
00267 #define bl1_cinvscals( a, y ) \
00268 { \
00269     float  s     = bl1_fmaxabs( (a)->real, (a)->imag ); \
00270     float  ar_s  = (a)->real / s; \
00271     float  ai_s  = (a)->imag / s; \
00272     float  yrt   = (y)->real; \
00273     float  temp  = ( ar_s * (a)->real + ai_s * (a)->imag ); \
00274     (y)->real    = ( (yrt)     * ar_s + (y)->imag * ai_s ) / temp; \
00275     (y)->imag    = ( (y)->imag * ar_s - (yrt)     * ai_s ) / temp; \
00276 }
00277 
00278 // void bl1_zdinvscals( double* a, dcomplex* y );
00279 #define bl1_zdinvscals( a, y ) \
00280 { \
00281 (y)->real = (y)->real / *(a); \
00282 (y)->imag = (y)->imag / *(a); \
00283 }
00284 
00285 // void bl1_zinvscals( dcomplex* a, dcomplex* y );
00286 #define bl1_zinvscals( a, y ) \
00287 { \
00288     double s     = bl1_fmaxabs( (a)->real, (a)->imag ); \
00289     double ar_s  = (a)->real / s; \
00290     double ai_s  = (a)->imag / s; \
00291     double yrt   = (y)->real; \
00292     double temp  = ( ar_s * (a)->real + ai_s * (a)->imag ); \
00293     (y)->real    = ( (yrt)     * ar_s + (y)->imag * ai_s ) / temp; \
00294     (y)->imag    = ( (y)->imag * ar_s - (yrt)     * ai_s ) / temp; \
00295 }
00296 
00297 // --- div3 ---
00298 
00299 // void bl1_sdiv3( float* x, float* y, float* a );
00300 #define bl1_sdiv3( x, y, a ) \
00301 *(a) = *(x) / *(y);
00302 
00303 // void bl1_ddiv3( double* x, double* y, double* a );
00304 #define bl1_ddiv3( x, y, a ) \
00305 *(a) = *(x) / *(y);
00306 
00307 // void bl1_cdiv3( scomplex* x, scomplex* y, scomplex* a );
00308 // a = x / y;
00309 #define bl1_cdiv3( x, y, a ) \
00310 { \
00311     *a = *x; \
00312     bl1_cinvscals( y, a ); \
00313 }
00314 
00315 // void bl1_zdiv3( dcomplex* x, dcomplex* y, dcomplex* a );
00316 #define bl1_zdiv3( x, y, a ) \
00317 { \
00318     *a = *x; \
00319     bl1_zinvscals( y, a ); \
00320 }
00321 
00322 // --- add3 ---
00323 
00324 // void bl1_sadd3( float* x, float* y, float* a );
00325 #define bl1_sadd3( x, y, a ) \
00326 *(a) = *(x) + *(y);
00327 
00328 // void bl1_dadd3( double* x, double* y, double* a );
00329 #define bl1_dadd3( x, y, a ) \
00330 *(a) = *(x) + *(y);
00331 
00332 // void bl1_cadd3( scomplex* x, scomplex* y, scomplex* a );
00333 #define bl1_cadd3( x, y, a ) \
00334 { \
00335 (a)->real = (x)->real + (y)->real; \
00336 (a)->imag = (x)->imag + (y)->imag; \
00337 }
00338 
00339 // void bl1_zadd3( dcomplex* x, dcomplex* y, dcomplex* a );
00340 #define bl1_zadd3( x, y, a ) \
00341 { \
00342 (a)->real = (x)->real + (y)->real; \
00343 (a)->imag = (x)->imag + (y)->imag; \
00344 }
00345 
00346 // --- copys ---
00347 
00348 // void bl1_scopys( conj1_t conj, float* x, float* y );
00349 #define bl1_scopys( conj, x, y ) \
00350 *(y) = *(x);
00351 
00352 // void bl1_dcopys( conj1_t conj, double* x, double* y );
00353 #define bl1_dcopys( conj, x, y ) \
00354 *(y) = *(x);
00355 
00356 // void bl1_ccopys( conj1_t conj, scomplex* x, scomplex* y );
00357 #define bl1_ccopys( conj, x, y ) \
00358 *(y) = *(x); \
00359 if ( bl1_is_conj( conj ) ) (y)->imag *= -1.0F;
00360 
00361 // void bl1_zcopys( conj1_t conj, dcomplex* x, dcomplex* y );
00362 #define bl1_zcopys( conj, x, y ) \
00363 *(y) = *(x); \
00364 if ( bl1_is_conj( conj ) ) (y)->imag *= -1.0;
00365 
00366 // --- scals ---
00367 
00368 // void bl1_sscals( float* a, float* y );
00369 #define bl1_sscals( a, y ) \
00370 *(y) = *(a) * *(y);
00371 
00372 // void bl1_dscals( double* a, double* y );
00373 #define bl1_dscals( a, y ) \
00374 *(y) = *(a) * *(y);
00375 
00376 // void bl1_csscals( float* a, scomplex* y );
00377 #define bl1_csscals( a, y ) \
00378 { \
00379 (y)->real = *(a) * (y)->real; \
00380 (y)->imag = *(a) * (y)->imag; \
00381 }
00382 
00383 // void bl1_cscals( scomplex* a, scomplex* y );
00384 #define bl1_cscals( a, y ) \
00385 { \
00386 float tempr = (a)->real * (y)->real - (a)->imag * (y)->imag; \
00387 float tempi = (a)->imag * (y)->real + (a)->real * (y)->imag; \
00388 (y)->real = tempr; \
00389 (y)->imag = tempi; \
00390 }
00391 
00392 // void bl1_zdscals( double* a, dcomplex* y );
00393 #define bl1_zdscals( a, y ) \
00394 { \
00395 (y)->real = *(a) * (y)->real; \
00396 (y)->imag = *(a) * (y)->imag; \
00397 }
00398 
00399 // void bl1_zscals( dcomplex* a, dcomplex* y );
00400 #define bl1_zscals( a, y ) \
00401 { \
00402 double tempr = (a)->real * (y)->real - (a)->imag * (y)->imag; \
00403 double tempi = (a)->imag * (y)->real + (a)->real * (y)->imag; \
00404 (y)->real = tempr; \
00405 (y)->imag = tempi; \
00406 }
00407 
00408 // --- mult3 ---
00409 
00410 // void bl1_smult3( float* x, float* y, float* a );
00411 #define bl1_smult3( x, y, a ) \
00412 *(a) = *(x) * *(y);
00413 
00414 // void bl1_dmult3( double* x, double* y, double* a );
00415 #define bl1_dmult3( x, y, a ) \
00416 *(a) = *(x) * *(y);
00417 
00418 // void bl1_cmult3( scomplex* x, scomplex* y, scomplex* a );
00419 #define bl1_cmult3( x, y, a ) \
00420 { \
00421 float tempr = (x)->real * (y)->real - (x)->imag * (y)->imag; \
00422 float tempi = (x)->imag * (y)->real + (x)->real * (y)->imag; \
00423 (a)->real = tempr; \
00424 (a)->imag = tempi; \
00425 }
00426 
00427 // void bl1_zmult3( dcomplex* x, dcomplex* y, dcomplex* a );
00428 #define bl1_zmult3( x, y, a ) \
00429 { \
00430 double tempr = (x)->real * (y)->real - (x)->imag * (y)->imag; \
00431 double tempi = (x)->imag * (y)->real + (x)->real * (y)->imag; \
00432 (a)->real = tempr; \
00433 (a)->imag = tempi; \
00434 }
00435 
00436 // --- mult4 ---
00437 
00438 // void bl1_smult4( float* alpha, float* x, float* y1, float* y2 );
00439 #define bl1_smult4( alpha, x, y1, y2 ) \
00440 *(y2) = *(y1) + *(alpha) * *(x);
00441 
00442 // void bl1_dmult4( double* alpha, double* x, double* y1, double* y2 );
00443 #define bl1_dmult4( alpha, x, y1, y2 ) \
00444 *(y2) = *(y1) + *(alpha) * *(x);
00445 
00446 // void bl1_cmult4( scomplex* alpha, scomplex* x, scomplex* y1, scomplex* y2 );
00447 #define bl1_cmult4( alpha, x, y1, y2 ) \
00448 { \
00449 (y2)->real = (y1)->real + (alpha)->real * (x)->real - (alpha)->imag * (x)->imag; \
00450 (y2)->imag = (y1)->imag + (alpha)->imag * (x)->real + (alpha)->real * (x)->imag; \
00451 }
00452 
00453 // void bl1_zmult4( dcomplex* alpha, dcomplex* x, dcomplex* y1, dcomplex* y2 );
00454 #define bl1_zmult4( alpha, x, y1, y2 ) \
00455 { \
00456 (y2)->real = (y1)->real + (alpha)->real * (x)->real - (alpha)->imag * (x)->imag; \
00457 (y2)->imag = (y1)->imag + (alpha)->imag * (x)->real + (alpha)->real * (x)->imag; \
00458 }
00459 
00460 // --- conjs ---
00461 
00462 // void bl1_sconjs( float* a );
00463 #define bl1_sconjs( a ) \
00464 ;
00465 
00466 // void bl1_dconjs( double* a );
00467 #define bl1_dconjs( a ) \
00468 ;
00469 
00470 // void bl1_cconjs( scomplex* a );
00471 #define bl1_cconjs( a ) \
00472 (a)->imag *= -1.0F;
00473 
00474 // void bl1_zconjs( dcomplex* a );
00475 #define bl1_zconjs( a ) \
00476 (a)->imag *= -1.0;
00477 
00478 // --- copyconj ---
00479 
00480 // void bl1_scopyconj( float* x, float* y );
00481 #define bl1_scopyconj( x, y ) \
00482 *(y) = *(x);
00483 
00484 // void bl1_dcopyconj( double* x, double* y );
00485 #define bl1_dcopyconj( x, y ) \
00486 *(y) = *(x);
00487 
00488 // void bl1_ccopyconj( scomplex* x, scomplex* y );
00489 #define bl1_ccopyconj( x, y ) \
00490 (y)->real =         (x)->real; \
00491 (y)->imag = -1.0F * (x)->imag;
00492 
00493 // void bl1_zcopyconj( dcomplex* x, dcomplex* y );
00494 #define bl1_zcopyconj( x, y ) \
00495 (y)->real =         (x)->real; \
00496 (y)->imag = -1.0  * (x)->imag;
00497 
00498 // --- eq1 ---
00499 
00500 // void bl1_seq1( float* alpha );
00501 #define bl1_seq1( alpha ) \
00502   ( *alpha == 1.0F )
00503 
00504 // void bl1_deq1( double* alpha );
00505 #define bl1_deq1( alpha ) \
00506   ( *alpha == 1.0 )
00507 
00508 // void bl1_ceq1( scomplex* alpha );
00509 #define bl1_ceq1( alpha ) \
00510   ( (alpha)->real == 1.0F && (alpha)->imag == 0.0F )
00511 
00512 // void bl1_zeq1( dcomplex* alpha );
00513 #define bl1_zeq1( alpha ) \
00514   ( (alpha)->real == 1.0 && (alpha)->imag == 0.0 )
00515 
00516 // --- Swapping/toggle macros --------------------------------------------------
00517 
00518 // --- swap_pointers ---
00519 
00520 #define bl1_sswap_pointers( a, b ) \
00521 { \
00522 float* temp = (a); \
00523 (a) = (b); \
00524 (b) = temp; \
00525 }
00526 
00527 #define bl1_dswap_pointers( a, b ) \
00528 { \
00529 double* temp = (a); \
00530 (a) = (b); \
00531 (b) = temp; \
00532 }
00533 
00534 #define bl1_cswap_pointers( a, b ) \
00535 { \
00536 void* temp = (a); \
00537 (a) = (b); \
00538 (b) = temp; \
00539 }
00540 
00541 #define bl1_zswap_pointers( a, b ) \
00542 { \
00543 void* temp = (a); \
00544 (a) = (b); \
00545 (b) = temp; \
00546 }
00547 
00548 // --- swap_ints ---
00549 
00550 #define bl1_swap_ints( a, b ) \
00551 { \
00552 int temp = (a); \
00553 (a) = (b); \
00554 (b) = temp; \
00555 }
00556 
00557 // --- swap_trans ---
00558 
00559 #define bl1_swap_trans( a, b ) \
00560 { \
00561 trans1_t temp = (a); \
00562 (a) = (b); \
00563 (b) = temp; \
00564 }
00565 
00566 // --- swap_conj ---
00567 
00568 #define bl1_swap_conj( a, b ) \
00569 { \
00570 conj1_t temp = (a); \
00571 (a) = (b); \
00572 (b) = temp; \
00573 }
00574 
00575 // --- toggle_side ---
00576 
00577 #define bl1_toggle_side( side ) \
00578 { \
00579 if ( bl1_is_left( side ) ) side = BLIS1_RIGHT; \
00580 else                       side = BLIS1_LEFT; \
00581 }
00582 
00583 // --- toggle_uplo ---
00584 
00585 #define bl1_toggle_uplo( uplo ) \
00586 { \
00587 if ( bl1_is_lower( uplo ) ) uplo = BLIS1_UPPER_TRIANGULAR; \
00588 else                        uplo = BLIS1_LOWER_TRIANGULAR; \
00589 }
00590 
00591 // --- toggle_trans ---
00592 #define bl1_toggle_trans( trans ) \
00593 { \
00594 if      ( bl1_is_notrans( trans ) )     trans = BLIS1_TRANSPOSE; \
00595 else if ( bl1_is_trans( trans ) )       trans = BLIS1_NO_TRANSPOSE; \
00596 else if ( bl1_is_conjnotrans( trans ) ) trans = BLIS1_CONJ_TRANSPOSE; \
00597 else                                    trans = BLIS1_CONJ_NO_TRANSPOSE; \
00598 }
00599 
00600 // --- toggle_conjtrans ---
00601 #define bl1_toggle_conjtrans( trans ) \
00602 { \
00603 if      ( bl1_is_notrans( trans ) )     trans = BLIS1_CONJ_TRANSPOSE; \
00604 else                                    trans = BLIS1_NO_TRANSPOSE; \
00605 }
00606 
00607 // --- toggle_conj ---
00608 
00609 #define bl1_toggle_conj( conj ) \
00610 { \
00611 if ( bl1_is_conj( conj ) ) conj = BLIS1_NO_CONJUGATE; \
00612 else                       conj = BLIS1_CONJUGATE; \
00613 }
00614 
00615 #endif // #ifndef BLIS1_MACRO_DEFS_H