Initial commit.

This commit is contained in:
Field G. Van Zee
2012-12-03 12:36:11 -06:00
commit 00f3498a89
885 changed files with 112954 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_ABSQR2_H
#define BLIS_ABSQR2_H
// absq2s
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of a.
#define bl2_ssabsq2s( x, a ) \
{ \
(a) = ( float )( (x) * (x) ); \
}
#define bl2_dsabsq2s( x, a ) \
{ \
(a) = ( float )( (x) * (x) ); \
}
#define bl2_csabsq2s( x, a ) \
{ \
(a) = ( float )( (x).real * (x).real + \
(x).imag * (x).imag ); \
}
#define bl2_zsabsq2s( x, a ) \
{ \
(a) = ( float )( (x).real * (x).real + \
(x).imag * (x).imag ); \
}
#define bl2_sdabsq2s( x, a ) \
{ \
(a) = ( double )( (x) * (x) ); \
}
#define bl2_ddabsq2s( x, a ) \
{ \
(a) = ( double )( (x) * (x) ); \
}
#define bl2_cdabsq2s( x, a ) \
{ \
(a) = ( double )( (x).real * (x).real + \
(x).imag * (x).imag ); \
}
#define bl2_zdabsq2s( x, a ) \
{ \
(a) = ( double )( (x).real * (x).real + \
(x).imag * (x).imag ); \
}
#define bl2_scabsq2s( x, a ) \
{ \
(a).real = ( float )( (x) * (x) ); \
(a).imag = 0.0F; \
}
#define bl2_dcabsq2s( x, a ) \
{ \
(a).real = ( float )( (x) * (x) ); \
(a).imag = 0.0; \
}
#define bl2_ccabsq2s( x, a ) \
{ \
(a).real = ( float )( (x).real * (x).real + \
(x).imag * (x).imag ); \
(a).imag = 0.0F; \
}
#define bl2_zcabsq2s( x, a ) \
{ \
(a).real = ( float )( (x).real * (x).real + \
(x).imag * (x).imag ); \
(a).imag = 0.0; \
}
#define bl2_szabsq2s( x, a ) \
{ \
(a).real = ( double )( (x) * (x) ); \
(a).imag = 0.0F; \
}
#define bl2_dzabsq2s( x, a ) \
{ \
(a).real = ( double )( (x) * (x) ); \
(a).imag = 0.0; \
}
#define bl2_czabsq2s( x, a ) \
{ \
(a).real = ( double )( (x).real * (x).real + \
(x).imag * (x).imag ); \
(a).imag = 0.0F; \
}
#define bl2_zzabsq2s( x, a ) \
{ \
(a).real = ( double )( (x).real * (x).real + \
(x).imag * (x).imag ); \
(a).imag = 0.0; \
}
#define bl2_sabsq2s( x, a ) \
{ \
bl2_ssabsq2s( x, a ); \
}
#define bl2_dabsq2s( x, a ) \
{ \
bl2_ddabsq2s( x, a ); \
}
#define bl2_cabsq2s( x, a ) \
{ \
bl2_ccabsq2s( x, a ); \
}
#define bl2_zabsq2s( x, a ) \
{ \
bl2_zzabsq2s( x, a ); \
}
#endif

View File

@@ -0,0 +1,151 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_ABVAL2S_H
#define BLIS_ABVAL2S_H
// abval2s
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of a.
#define bl2_ssabval2s( x, a ) \
{ \
bl2_ssabsq2s( x, a ); \
bl2_sssqrt2s( a, a ); \
}
#define bl2_dsabval2s( x, a ) \
{ \
bl2_dsabsq2s( x, a ); \
bl2_sssqrt2s( a, a ); \
}
#define bl2_csabval2s( x, a ) \
{ \
bl2_csabsq2s( x, a ); \
bl2_sssqrt2s( a, a ); \
}
#define bl2_zsabval2s( x, a ) \
{ \
bl2_zsabsq2s( x, a ); \
bl2_sssqrt2s( a, a ); \
}
#define bl2_sdabval2s( x, a ) \
{ \
bl2_sdabsq2s( x, a ); \
bl2_ddsqrt2s( a, a ); \
}
#define bl2_ddabval2s( x, a ) \
{ \
bl2_ddabsq2s( x, a ); \
bl2_ddsqrt2s( a, a ); \
}
#define bl2_cdabval2s( x, a ) \
{ \
bl2_cdabsq2s( x, a ); \
bl2_ddsqrt2s( a, a ); \
}
#define bl2_zdabval2s( x, a ) \
{ \
bl2_zdabsq2s( x, a ); \
bl2_ddsqrt2s( a, a ); \
}
#define bl2_scabval2s( x, a ) \
{ \
bl2_scabsq2s( x, a ); \
bl2_ccsqrt2s( a, a ); \
}
#define bl2_dcabval2s( x, a ) \
{ \
bl2_dcabsq2s( x, a ); \
bl2_ccsqrt2s( a, a ); \
}
#define bl2_ccabval2s( x, a ) \
{ \
bl2_ccabsq2s( x, a ); \
bl2_ccsqrt2s( a, a ); \
}
#define bl2_zcabval2s( x, a ) \
{ \
bl2_zcabsq2s( x, a ); \
bl2_ccsqrt2s( a, a ); \
}
#define bl2_szabval2s( x, a ) \
{ \
bl2_szabsq2s( x, a ); \
bl2_zzsqrt2s( a, a ); \
}
#define bl2_dzabval2s( x, a ) \
{ \
bl2_dzabsq2s( x, a ); \
bl2_zzsqrt2s( a, a ); \
}
#define bl2_czabval2s( x, a ) \
{ \
bl2_czabsq2s( x, a ); \
bl2_zzsqrt2s( a, a ); \
}
#define bl2_zzabval2s( x, a ) \
{ \
bl2_zzabsq2s( x, a ); \
bl2_zzsqrt2s( a, a ); \
}
#define bl2_sabval2s( x, a ) \
{ \
bl2_ssabval2s( x, a ); \
}
#define bl2_dabval2s( x, a ) \
{ \
bl2_ddabval2s( x, a ); \
}
#define bl2_cabval2s( x, a ) \
{ \
bl2_ccabval2s( x, a ); \
}
#define bl2_zabval2s( x, a ) \
{ \
bl2_zzabval2s( x, a ); \
}
#endif

View File

@@ -0,0 +1,139 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_ADDS_H
#define BLIS_ADDS_H
// adds
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
#define bl2_ssadds( a, y ) \
{ \
(y) += ( float )(a); \
}
#define bl2_sdadds( a, y ) \
{ \
(y) += ( double )(a); \
}
#define bl2_scadds( a, y ) \
{ \
(y).real += ( float )(a); \
/*(y).imag += 0.0F;*/ \
}
#define bl2_szadds( a, y ) \
{ \
(y).real += ( double )(a); \
/*(y).imag += 0.0F;*/ \
}
#define bl2_dsadds( a, y ) \
{ \
(y) += ( float )(a); \
}
#define bl2_ddadds( a, y ) \
{ \
(y) += ( double )(a); \
}
#define bl2_dcadds( a, y ) \
{ \
(y).real += ( float )(a); \
/*(y).imag += 0.0F;*/ \
}
#define bl2_dzadds( a, y ) \
{ \
(y).real += ( double )(a); \
/*(y).imag += 0.0F;*/ \
}
#define bl2_csadds( a, y ) \
{ \
(y) += ( float )(a).real; \
}
#define bl2_cdadds( a, y ) \
{ \
(y) += ( double )(a).real; \
}
#define bl2_ccadds( a, y ) \
{ \
(y).real += ( float )(a).real; \
(y).imag += ( float )(a).imag; \
}
#define bl2_czadds( a, y ) \
{ \
(y).real += ( double )(a).real; \
(y).imag += ( double )(a).imag; \
}
#define bl2_zsadds( a, y ) \
{ \
(y) += ( float )(a).real; \
}
#define bl2_zdadds( a, y ) \
{ \
(y) += ( double )(a).real; \
}
#define bl2_zcadds( a, y ) \
{ \
(y).real += ( float )(a).real; \
(y).imag += ( float )(a).imag; \
}
#define bl2_zzadds( a, y ) \
{ \
(y).real += ( double )(a).real; \
(y).imag += ( double )(a).imag; \
}
#define bl2_sadds( a, y ) \
{ \
bl2_ssadds( a, y ); \
}
#define bl2_dadds( a, y ) \
{ \
bl2_ddadds( a, y ); \
}
#define bl2_cadds( a, y ) \
{ \
bl2_ccadds( a, y ); \
}
#define bl2_zadds( a, y ) \
{ \
bl2_zzadds( a, y ); \
}
#endif

View File

@@ -0,0 +1,86 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_ADDS_MXN_H
#define BLIS_ADDS_MXN_H
// adds_mxn
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_ssadds_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_ssadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_ddadds_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_ddadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_ccadds_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_ccadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_zzadds_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_zzadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#endif

View File

@@ -0,0 +1,180 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_ADDS_MXN_UPLO_H
#define BLIS_ADDS_MXN_UPLO_H
// adds_mxn_u
#define bl2_ssadds_mxn_u( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_ssadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_ddadds_mxn_u( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_ddadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_ccadds_mxn_u( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_ccadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_zzadds_mxn_u( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_zzadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
// adds_mxn_l
#define bl2_ssadds_mxn_l( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_ssadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_ddadds_mxn_l( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
/*printf( "copying elem (%u,%u) with diagoff %d\n", i, j, diagoff );*/ \
bl2_ddadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_ccadds_mxn_l( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_ccadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_zzadds_mxn_l( diagoff, m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_zzadds( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#endif

View File

@@ -0,0 +1,396 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_AXMYS_H
#define BLIS_AXMYS_H
// axmys
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - The third char encodes the type of y.
// -- (axy) = (ss?) ------------------------------------------------------------
#define bl2_sssaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_ssdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sscaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sszaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( float ) (a) * ( float ) (x) ); \
}
// -- (axy) = (sd?) ------------------------------------------------------------
#define bl2_sdsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sddaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (sc?) ------------------------------------------------------------
#define bl2_scsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_scdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_sccaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( float ) (a) * ( float ) (x).real ); \
(y).imag -= ( float )( ( float ) (a) * ( float ) (x).imag ); \
}
#define bl2_sczaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( float ) (a) * ( float ) (x).real ); \
(y).imag -= ( double )( ( float ) (a) * ( float ) (x).imag ); \
}
// -- (axy) = (sz?) ------------------------------------------------------------
#define bl2_szsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag -= ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_szzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag -= ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (ds?) ------------------------------------------------------------
#define bl2_dssaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dsdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dscaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dszaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dd?) ------------------------------------------------------------
#define bl2_ddsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dddaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dc?) ------------------------------------------------------------
#define bl2_dcsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dcdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dccaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag -= ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_dczaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag -= ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (dz?) ------------------------------------------------------------
#define bl2_dzsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag -= ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_dzzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag -= ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (cs?) ------------------------------------------------------------
#define bl2_cssaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_csdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_cscaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag -= ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_cszaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag -= ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (cd?) ------------------------------------------------------------
#define bl2_cdsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cddaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cdcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag -= ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_cdzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag -= ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (cc?) ------------------------------------------------------------
#define bl2_ccsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_ccdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_cccaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag -= ( float )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_cczaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag -= ( double )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (cz?) ------------------------------------------------------------
#define bl2_czsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag -= ( float )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_czzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag -= ( double )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
// -- (axy) = (zs?) ------------------------------------------------------------
#define bl2_zssaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zsdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zscaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag -= ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_zszaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag -= ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (zd?) ------------------------------------------------------------
#define bl2_zdsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zddaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zdcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag -= ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_zdzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag -= ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (zc?) ------------------------------------------------------------
#define bl2_zcsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zcdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zccaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag -= ( float )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_zczaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag -= ( double )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (zz?) ------------------------------------------------------------
#define bl2_zzsaxmys( a, x, y ) \
{ \
(y) -= ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzdaxmys( a, x, y ) \
{ \
(y) -= ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzcaxmys( a, x, y ) \
{ \
(y).real -= ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag -= ( float )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_zzzaxmys( a, x, y ) \
{ \
(y).real -= ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag -= ( double )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_saxmys( a, x, y ) \
{ \
bl2_sssaxmys( a, x, y ); \
}
#define bl2_daxmys( a, x, y ) \
{ \
bl2_dddaxmys( a, x, y ); \
}
#define bl2_caxmys( a, x, y ) \
{ \
bl2_cccaxmys( a, x, y ); \
}
#define bl2_zaxmys( a, x, y ) \
{ \
bl2_zzzaxmys( a, x, y ); \
}
#endif

View File

@@ -0,0 +1,397 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_AXPYJS_H
#define BLIS_AXPYJS_H
// axpyjs
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - The third char encodes the type of y.
// - x is used in conjugated form.
// -- (axy) = (ss?) ------------------------------------------------------------
#define bl2_sssaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_ssdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sscaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sszaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a) * ( float ) (x) ); \
}
// -- (axy) = (sd?) ------------------------------------------------------------
#define bl2_sdsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sddaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (sc?) ------------------------------------------------------------
#define bl2_scsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_scdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_sccaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a) * ( float ) (x).real ); \
(y).imag += ( float )( ( float ) (a) * ( float )-(x).imag ); \
}
#define bl2_sczaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a) * ( float ) (x).real ); \
(y).imag += ( double )( ( float ) (a) * ( float )-(x).imag ); \
}
// -- (axy) = (sz?) ------------------------------------------------------------
#define bl2_szsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( float )( ( double ) (a) * ( double )-(x).imag ); \
}
#define bl2_szzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( double )( ( double ) (a) * ( double )-(x).imag ); \
}
// -- (axy) = (ds?) ------------------------------------------------------------
#define bl2_dssaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dsdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dscaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dszaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dd?) ------------------------------------------------------------
#define bl2_ddsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dddaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dc?) ------------------------------------------------------------
#define bl2_dcsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dcdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dccaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( float )( ( double ) (a) * ( double )-(x).imag ); \
}
#define bl2_dczaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( double )( ( double ) (a) * ( double )-(x).imag ); \
}
// -- (axy) = (dz?) ------------------------------------------------------------
#define bl2_dzsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( float )( ( double ) (a) * ( double )-(x).imag ); \
}
#define bl2_dzzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( double )( ( double ) (a) * ( double )-(x).imag ); \
}
// -- (axy) = (cs?) ------------------------------------------------------------
#define bl2_cssaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_csdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_cscaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_cszaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (cd?) ------------------------------------------------------------
#define bl2_cdsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cddaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cdcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_cdzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (cc?) ------------------------------------------------------------
#define bl2_ccsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_ccdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_cccaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_cczaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (cz?) ------------------------------------------------------------
#define bl2_czsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_czzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
// -- (axy) = (zs?) ------------------------------------------------------------
#define bl2_zssaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zsdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zscaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_zszaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (zd?) ------------------------------------------------------------
#define bl2_zdsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zddaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zdcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_zdzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (zc?) ------------------------------------------------------------
#define bl2_zcsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zcdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zccaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_zczaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (zz?) ------------------------------------------------------------
#define bl2_zzsaxpyjs( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzdaxpyjs( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzcaxpyjs( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_zzzaxpyjs( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_saxpyjs( a, x, y ) \
{ \
bl2_sssaxpyjs( a, x, y ); \
}
#define bl2_daxpyjs( a, x, y ) \
{ \
bl2_dddaxpyjs( a, x, y ); \
}
#define bl2_caxpyjs( a, x, y ) \
{ \
bl2_cccaxpyjs( a, x, y ); \
}
#define bl2_zaxpyjs( a, x, y ) \
{ \
bl2_zzzaxpyjs( a, x, y ); \
}
#endif

View File

@@ -0,0 +1,396 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_AXPYS_H
#define BLIS_AXPYS_H
// axpys
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - The third char encodes the type of y.
// -- (axy) = (ss?) ------------------------------------------------------------
#define bl2_sssaxpys( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_ssdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sscaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sszaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a) * ( float ) (x) ); \
}
// -- (axy) = (sd?) ------------------------------------------------------------
#define bl2_sdsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sddaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (sc?) ------------------------------------------------------------
#define bl2_scsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_scdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_sccaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a) * ( float ) (x).real ); \
(y).imag += ( float )( ( float ) (a) * ( float ) (x).imag ); \
}
#define bl2_sczaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a) * ( float ) (x).real ); \
(y).imag += ( double )( ( float ) (a) * ( float ) (x).imag ); \
}
// -- (axy) = (sz?) ------------------------------------------------------------
#define bl2_szsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_szzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (ds?) ------------------------------------------------------------
#define bl2_dssaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dsdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dscaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dszaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dd?) ------------------------------------------------------------
#define bl2_ddsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dddaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dc?) ------------------------------------------------------------
#define bl2_dcsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dcdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dccaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_dczaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (dz?) ------------------------------------------------------------
#define bl2_dzsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_dzzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag += ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (cs?) ------------------------------------------------------------
#define bl2_cssaxpys( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_csdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_cscaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_cszaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (cd?) ------------------------------------------------------------
#define bl2_cdsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cddaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cdcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_cdzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (cc?) ------------------------------------------------------------
#define bl2_ccsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_ccdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_cccaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_cczaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (cz?) ------------------------------------------------------------
#define bl2_czsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_czzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
// -- (axy) = (zs?) ------------------------------------------------------------
#define bl2_zssaxpys( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zsdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zscaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_zszaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (zd?) ------------------------------------------------------------
#define bl2_zdsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zddaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zdcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_zdzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (zc?) ------------------------------------------------------------
#define bl2_zcsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zcdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zccaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( float )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_zczaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag += ( double )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (zz?) ------------------------------------------------------------
#define bl2_zzsaxpys( a, x, y ) \
{ \
(y) += ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzdaxpys( a, x, y ) \
{ \
(y) += ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzcaxpys( a, x, y ) \
{ \
(y).real += ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( float )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_zzzaxpys( a, x, y ) \
{ \
(y).real += ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag += ( double )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_saxpys( a, x, y ) \
{ \
bl2_sssaxpys( a, x, y ); \
}
#define bl2_daxpys( a, x, y ) \
{ \
bl2_dddaxpys( a, x, y ); \
}
#define bl2_caxpys( a, x, y ) \
{ \
bl2_cccaxpys( a, x, y ); \
}
#define bl2_zaxpys( a, x, y ) \
{ \
bl2_zzzaxpys( a, x, y ); \
}
#endif

View File

@@ -0,0 +1,136 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_CAST_H
#define BLIS_CAST_H
// cast
// Notes:
// - The first char encodes the type of *ap.
// - The second char encodes the type of b.
#define bl2_sscast( ap, b ) \
{ \
(b) = ( float ) *(( float* )(ap)); \
}
#define bl2_dscast( ap, b ) \
{ \
(b) = ( float ) *(( double* )(ap)); \
}
#define bl2_cscast( ap, b ) \
{ \
(b) = ( float ) (( scomplex* )(ap))->real; \
}
#define bl2_zscast( ap, b ) \
{ \
(b) = ( float ) (( dcomplex* )(ap))->real; \
}
#define bl2_sdcast( ap, b ) \
{ \
(b) = ( double ) *(( float* )(ap)); \
}
#define bl2_ddcast( ap, b ) \
{ \
(b) = ( double ) *(( double* )(ap)); \
}
#define bl2_cdcast( ap, b ) \
{ \
(b) = ( double ) (( scomplex* )(ap))->real; \
}
#define bl2_zdcast( ap, b ) \
{ \
(b) = ( double ) (( dcomplex* )(ap))->real; \
}
#define bl2_sccast( ap, b ) \
{ \
(b).real = ( float ) *(( float* )(ap)); \
(b).imag = 0.0F; \
}
#define bl2_dccast( ap, b ) \
{ \
(b).real = ( float ) *(( double* )(ap)); \
(b).imag = 0.0F; \
}
#define bl2_cccast( ap, b ) \
{ \
(b).real = ( float ) (( scomplex* )(ap))->real; \
(b).imag = ( float ) (( scomplex* )(ap))->imag; \
}
#define bl2_zccast( ap, b ) \
{ \
(b).real = ( float ) (( dcomplex* )(ap))->real; \
(b).imag = ( float ) (( dcomplex* )(ap))->imag; \
}
#define bl2_szcast( ap, b ) \
{ \
(b).real = ( double ) *(( float* )(ap)); \
(b).imag = 0.0; \
}
#define bl2_dzcast( ap, b ) \
{ \
(b).real = ( double ) *(( double* )(ap)); \
(b).imag = 0.0; \
}
#define bl2_czcast( ap, b ) \
{ \
(b).real = ( double ) (( scomplex* )(ap))->real; \
(b).imag = ( double ) (( scomplex* )(ap))->imag; \
}
#define bl2_zzcast( ap, b ) \
{ \
(b).real = ( double ) (( dcomplex* )(ap))->real; \
(b).imag = ( double ) (( dcomplex* )(ap))->imag; \
}
#define bl2_scast( ap, b ) \
\
bl2_sscast( ap, b );
#define bl2_dcast( ap, b ) \
\
bl2_ddcast( ap, b );
#define bl2_ccast( ap, b ) \
\
bl2_cccast( ap, b );
#define bl2_zcast( ap, b ) \
\
bl2_zzcast( ap, b );
#endif

View File

@@ -0,0 +1,57 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_CONJS_H
#define BLIS_CONJS_H
// conjs
#define bl2_sconjs( x ) \
{ \
; \
}
#define bl2_dconjs( x ) \
{ \
; \
}
#define bl2_cconjs( x ) \
{ \
(x).imag = -(x).imag; \
}
#define bl2_zconjs( x ) \
{ \
(x).imag = -(x).imag; \
}
#endif

View File

@@ -0,0 +1,173 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_CONSTANTS_H
#define BLIS_CONSTANTS_H
// return pointers to constants
// 2
#define bl2_s2 \
\
( BLIS_CONST_S_PTR( BLIS_TWO ) )
#define bl2_d2 \
\
( BLIS_CONST_D_PTR( BLIS_TWO ) )
#define bl2_c2 \
\
( BLIS_CONST_C_PTR( BLIS_TWO ) )
#define bl2_z2 \
\
( BLIS_CONST_Z_PTR( BLIS_TWO ) )
// 1
#define bl2_s1 \
\
( BLIS_CONST_S_PTR( BLIS_ONE ) )
#define bl2_d1 \
\
( BLIS_CONST_D_PTR( BLIS_ONE ) )
#define bl2_c1 \
\
( BLIS_CONST_C_PTR( BLIS_ONE ) )
#define bl2_z1 \
\
( BLIS_CONST_Z_PTR( BLIS_ONE ) )
// 0
#define bl2_s0 \
\
( BLIS_CONST_S_PTR( BLIS_ZERO ) )
#define bl2_d0 \
\
( BLIS_CONST_D_PTR( BLIS_ZERO ) )
#define bl2_c0 \
\
( BLIS_CONST_C_PTR( BLIS_ZERO ) )
#define bl2_z0 \
\
( BLIS_CONST_Z_PTR( BLIS_ZERO ) )
// -1
#define bl2_sm1 \
\
( BLIS_CONST_S_PTR( BLIS_MINUS_ONE ) )
#define bl2_dm1 \
\
( BLIS_CONST_D_PTR( BLIS_MINUS_ONE ) )
#define bl2_cm1 \
\
( BLIS_CONST_C_PTR( BLIS_MINUS_ONE ) )
#define bl2_zm1 \
\
( BLIS_CONST_Z_PTR( BLIS_MINUS_ONE ) )
// -2
#define bl2_sm2 \
\
( BLIS_CONST_S_PTR( BLIS_MINUS_TWO ) )
#define bl2_dm2 \
\
( BLIS_CONST_D_PTR( BLIS_MINUS_TWO ) )
#define bl2_cm2 \
\
( BLIS_CONST_C_PTR( BLIS_MINUS_TWO ) )
#define bl2_zm2 \
\
( BLIS_CONST_Z_PTR( BLIS_MINUS_TWO ) )
// set to constant
// set0
#define bl2_sset0( a ) \
{ \
(a) = 0.0F; \
}
#define bl2_dset0( a ) \
{ \
(a) = 0.0; \
}
#define bl2_cset0( a ) \
{ \
(a).real = 0.0F; \
(a).imag = 0.0F; \
}
#define bl2_zset0( a ) \
{ \
(a).real = 0.0; \
(a).imag = 0.0; \
}
// setimag0
#define bl2_ssetimag0( a ) \
{ \
; \
}
#define bl2_dsetimag0( a ) \
{ \
; \
}
#define bl2_csetimag0( a ) \
{ \
(a).imag = 0.0F; \
}
#define bl2_zsetimag0( a ) \
{ \
(a).imag = 0.0; \
}
#endif

View File

@@ -0,0 +1,152 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_COPYCJS_H
#define BLIS_COPYCJS_H
// copycjs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
// - x is (conditionally) copied in conjugated form.
#define bl2_sscopycjs( conj, x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dscopycjs( conj, x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_cscopycjs( conj, x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zscopycjs( conj, x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdcopycjs( conj, x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddcopycjs( conj, x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdcopycjs( conj, x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdcopycjs( conj, x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_sccopycjs( conj, x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_dccopycjs( conj, x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_cccopycjs( conj, x, y ) \
{ \
(y).real = ( float ) (x).real; \
if ( bl2_is_conj( conj ) ) \
(y).imag = ( float ) -(x).imag; \
else \
(y).imag = ( float ) (x).imag; \
}
#define bl2_zccopycjs( conj, x, y ) \
{ \
(y).real = ( float ) (x).real; \
if ( bl2_is_conj( conj ) ) \
(y).imag = ( float ) -(x).imag; \
else \
(y).imag = ( float ) (x).imag; \
}
#define bl2_szcopycjs( conj, x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_dzcopycjs( conj, x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_czcopycjs( conj, x, y ) \
{ \
(y).real = ( double ) (x).real; \
if ( bl2_is_conj( conj ) ) \
(y).imag = ( double ) -(x).imag; \
else \
(y).imag = ( double ) (x).imag; \
}
#define bl2_zzcopycjs( conj, x, y ) \
{ \
(y).real = ( double ) (x).real; \
if ( bl2_is_conj( conj ) ) \
(y).imag = ( double ) -(x).imag; \
else \
(y).imag = ( double ) (x).imag; \
}
#define bl2_scopycjs( conj, x, y ) \
{ \
bl2_sscopycjs( conj, x, y ); \
}
#define bl2_dcopycjs( conj, x, y ) \
{ \
bl2_ddcopycjs( conj, x, y ); \
}
#define bl2_ccopycjs( conj, x, y ) \
{ \
bl2_cccopycjs( conj, x, y ); \
}
#define bl2_zcopycjs( conj, x, y ) \
{ \
bl2_zzcopycjs( conj, x, y ); \
}
#endif

View File

@@ -0,0 +1,140 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_CONJ2S_H
#define BLIS_CONJ2S_H
// copyjs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
// - x is copied in conjugated form.
#define bl2_sscopyjs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dscopyjs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_cscopyjs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zscopyjs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdcopyjs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddcopyjs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdcopyjs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdcopyjs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_sccopyjs( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_dccopyjs( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_cccopyjs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) -(x).imag; \
}
#define bl2_zccopyjs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) -(x).imag; \
}
#define bl2_szcopyjs( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_dzcopyjs( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_czcopyjs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) -(x).imag; \
}
#define bl2_zzcopyjs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) -(x).imag; \
}
#define bl2_scopyjs( x, y ) \
{ \
bl2_sscopyjs( x, y ); \
}
#define bl2_dcopyjs( x, y ) \
{ \
bl2_ddcopyjs( x, y ); \
}
#define bl2_ccopyjs( x, y ) \
{ \
bl2_cccopyjs( x, y ); \
}
#define bl2_zcopyjs( x, y ) \
{ \
bl2_zzcopyjs( x, y ); \
}
#endif

View File

@@ -0,0 +1,140 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_COPYNZJS_H
#define BLIS_COPYNZJS_H
// copynzjs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
// - x is copied in conjugated form.
#define bl2_sscopynzjs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dscopynzjs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_cscopynzjs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zscopynzjs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdcopynzjs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddcopynzjs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdcopynzjs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdcopynzjs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_sccopynzjs( x, y ) \
{ \
(y).real = ( float ) (x); \
/* (y).imag = 0.0F; (SKIP COPYING OF ZERO) */ \
}
#define bl2_dccopynzjs( x, y ) \
{ \
(y).real = ( float ) (x); \
/* (y).imag = 0.0F; (SKIP COPYING OF ZERO) */ \
}
#define bl2_cccopynzjs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) -(x).imag; \
}
#define bl2_zccopynzjs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) -(x).imag; \
}
#define bl2_szcopynzjs( x, y ) \
{ \
(y).real = ( double ) (x); \
/* (y).imag = 0.0; (SKIP COPYING OF ZERO) */ \
}
#define bl2_dzcopynzjs( x, y ) \
{ \
(y).real = ( double ) (x); \
/* (y).imag = 0.0; (SKIP COPYING OF ZERO) */ \
}
#define bl2_czcopynzjs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) -(x).imag; \
}
#define bl2_zzcopynzjs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) -(x).imag; \
}
#define bl2_scopynzjs( x, y ) \
{ \
bl2_sscopynzjs( x, y ); \
}
#define bl2_dcopynzjs( x, y ) \
{ \
bl2_ddcopynzjs( x, y ); \
}
#define bl2_ccopynzjs( x, y ) \
{ \
bl2_cccopynzjs( x, y ); \
}
#define bl2_zcopynzjs( x, y ) \
{ \
bl2_zzcopynzjs( x, y ); \
}
#endif

View File

@@ -0,0 +1,139 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_COPYNZS_H
#define BLIS_COPYNZS_H
// copynzs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_sscopynzs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dscopynzs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_cscopynzs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zscopynzs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdcopynzs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddcopynzs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdcopynzs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdcopynzs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_sccopynzs( x, y ) \
{ \
(y).real = ( float ) (x); \
/* (y).imag = 0.0F; (SKIP COPYING OF ZERO) */ \
}
#define bl2_dccopynzs( x, y ) \
{ \
(y).real = ( float ) (x); \
/* (y).imag = 0.0F (SKIP COPYING OF ZERO) */; \
}
#define bl2_cccopynzs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) (x).imag; \
}
#define bl2_zccopynzs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) (x).imag; \
}
#define bl2_szcopynzs( x, y ) \
{ \
(y).real = ( double ) (x); \
/* (y).imag = 0.0; (SKIP COPYING OF ZERO) */ \
}
#define bl2_dzcopynzs( x, y ) \
{ \
(y).real = ( double ) (x); \
/* (y).imag = 0.0; (SKIP COPYING OF ZERO) */ \
}
#define bl2_czcopynzs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) (x).imag; \
}
#define bl2_zzcopynzs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) (x).imag; \
}
#define bl2_scopynzs( x, y ) \
{ \
bl2_sscopynzs( x, y ); \
}
#define bl2_dcopynzs( x, y ) \
{ \
bl2_ddcopynzs( x, y ); \
}
#define bl2_ccopynzs( x, y ) \
{ \
bl2_cccopynzs( x, y ); \
}
#define bl2_zcopynzs( x, y ) \
{ \
bl2_zzcopynzs( x, y ); \
}
#endif

View File

@@ -0,0 +1,139 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_COPYS_H
#define BLIS_COPYS_H
// copys
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_sscopys( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dscopys( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_cscopys( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zscopys( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdcopys( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddcopys( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdcopys( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdcopys( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_sccopys( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_dccopys( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_cccopys( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) (x).imag; \
}
#define bl2_zccopys( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = ( float ) (x).imag; \
}
#define bl2_szcopys( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_dzcopys( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_czcopys( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) (x).imag; \
}
#define bl2_zzcopys( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = ( double ) (x).imag; \
}
#define bl2_scopys( x, y ) \
{ \
bl2_sscopys( x, y ); \
}
#define bl2_dcopys( x, y ) \
{ \
bl2_ddcopys( x, y ); \
}
#define bl2_ccopys( x, y ) \
{ \
bl2_cccopys( x, y ); \
}
#define bl2_zcopys( x, y ) \
{ \
bl2_zzcopys( x, y ); \
}
#endif

View File

@@ -0,0 +1,86 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_COPYS_MXN_H
#define BLIS_COPYS_MXN_H
// copys_mxn
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_sscopys_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_sscopys( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_ddcopys_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_ddcopys( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_cccopys_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_cccopys( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_zzcopys_mxn( m, n, x, rs_x, cs_x, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_zzcopys( *(x + i*rs_x + j*cs_x), \
*(y + i*rs_y + j*cs_y) ); \
}
#endif

View File

@@ -0,0 +1,402 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_DOTJS_H
#define BLIS_DOTJS_H
// dotjs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
// - The third char encodes the type of rho.
// - x is used in conjugated form.
// -- (xyr) = (ss?) ------------------------------------------------------------
#define bl2_sssdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_ssddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_sscdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_sszdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (sd?) ------------------------------------------------------------
#define bl2_sdsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_sdddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_sdcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_sdzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (sc?) ------------------------------------------------------------
#define bl2_scsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_scddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_sccdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_sczdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (sz?) ------------------------------------------------------------
#define bl2_szsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_szddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_szcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_szzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (ds?) ------------------------------------------------------------
#define bl2_dssdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_dsddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_dscdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_dszdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (dd?) ------------------------------------------------------------
#define bl2_ddsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_ddddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_ddcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_ddzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (dc?) ------------------------------------------------------------
#define bl2_dcsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_dcddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_dccdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_dczdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (dz?) ------------------------------------------------------------
#define bl2_dzsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_dzddotjs( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_dzcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_dzzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (cs?) ------------------------------------------------------------
#define bl2_cssdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_csddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_cscdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float )-(x).imag * ( float ) (y); \
}
#define bl2_cszdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double )-(x).imag * ( double ) (y); \
}
// -- (xyr) = (cd?) ------------------------------------------------------------
#define bl2_cdsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_cdddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_cdcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float )-(x).imag * ( float ) (y); \
}
#define bl2_cdzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double )-(x).imag * ( double ) (y); \
}
// -- (xyr) = (cc?) ------------------------------------------------------------
#define bl2_ccsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_ccddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_cccdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real + ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag - ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_cczdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real + ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag - ( double ) (x).imag * ( double ) (y).real; \
}
// -- (xyr) = (cz?) ------------------------------------------------------------
#define bl2_czsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_czddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_czcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real + ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag - ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_czzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real + ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag - ( double ) (x).imag * ( double ) (y).real; \
}
// -- (xyr) = (zs?) ------------------------------------------------------------
#define bl2_zssdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_zsddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_zscdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float ) (x).imag * ( float ) (y); \
}
#define bl2_zszdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double ) (x).imag * ( double ) (y); \
}
// -- (xyr) = (zd?) ------------------------------------------------------------
#define bl2_zdsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_zdddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_zdcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float ) (x).imag * ( float ) (y); \
}
#define bl2_zdzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double ) (x).imag * ( double ) (y); \
}
// -- (xyr) = (zc?) ------------------------------------------------------------
#define bl2_zcsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_zcddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_zccdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real + ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag - ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_zczdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real + ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag - ( double ) (x).imag * ( double ) (y).real; \
}
// -- (xyr) = (zz?) ------------------------------------------------------------
#define bl2_zzsdotjs( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_zzddotjs( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_zzcdotjs( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real + ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag - ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_zzzdotjs( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real + ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag - ( double ) (x).imag * ( double ) (y).real; \
}
#define bl2_sdotjs( x, y, a ) \
{ \
bl2_sssdotjs( x, y, a ); \
}
#define bl2_ddotjs( x, y, a ) \
{ \
bl2_ddddotjs( x, y, a ); \
}
#define bl2_cdotjs( x, y, a ) \
{ \
bl2_cccdotjs( x, y, a ); \
}
#define bl2_zdotjs( x, y, a ) \
{ \
bl2_zzzdotjs( x, y, a ); \
}
#endif

View File

@@ -0,0 +1,401 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_DOTS_H
#define BLIS_DOTS_H
// dots
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
// - The third char encodes the type of rho.
// -- (xyr) = (ss?) ------------------------------------------------------------
#define bl2_sssdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_ssddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_sscdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_sszdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (sd?) ------------------------------------------------------------
#define bl2_sdsdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_sdddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_sdcdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_sdzdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (sc?) ------------------------------------------------------------
#define bl2_scsdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_scddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_sccdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_sczdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (sz?) ------------------------------------------------------------
#define bl2_szsdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_szddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_szcdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_szzdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (ds?) ------------------------------------------------------------
#define bl2_dssdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_dsddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_dscdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_dszdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (dd?) ------------------------------------------------------------
#define bl2_ddsdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y); \
}
#define bl2_ddddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y); \
}
#define bl2_ddcdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y); \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_ddzdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y); \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (dc?) ------------------------------------------------------------
#define bl2_dcsdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_dcddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_dccdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_dczdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (dz?) ------------------------------------------------------------
#define bl2_dzsdots( x, y, a ) \
{ \
(a) += ( float ) (x) * ( float ) (y).real; \
}
#define bl2_dzddots( x, y, a ) \
{ \
(a) += ( double ) (x) * ( double ) (y).real; \
}
#define bl2_dzcdots( x, y, a ) \
{ \
(a).real += ( float ) (x) * ( float ) (y).real; \
/* (a).imag += ( float ) 0.0; */ \
}
#define bl2_dzzdots( x, y, a ) \
{ \
(a).real += ( double ) (x) * ( double ) (y).real; \
/* (a).imag += ( double ) 0.0; */ \
}
// -- (xyr) = (cs?) ------------------------------------------------------------
#define bl2_cssdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_csddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_cscdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float ) (x).imag * ( float ) (y); \
}
#define bl2_cszdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double ) (x).imag * ( double ) (y); \
}
// -- (xyr) = (cd?) ------------------------------------------------------------
#define bl2_cdsdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_cdddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_cdcdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float ) (x).imag * ( float ) (y); \
}
#define bl2_cdzdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double ) (x).imag * ( double ) (y); \
}
// -- (xyr) = (cc?) ------------------------------------------------------------
#define bl2_ccsdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_ccddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_cccdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag + ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_cczdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag + ( double ) (x).imag * ( double ) (y).real; \
}
// -- (xyr) = (cz?) ------------------------------------------------------------
#define bl2_czsdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_czddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_czcdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag + ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_czzdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag + ( double ) (x).imag * ( double ) (y).real; \
}
// -- (xyr) = (zs?) ------------------------------------------------------------
#define bl2_zssdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_zsddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_zscdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float ) (x).imag * ( float ) (y); \
}
#define bl2_zszdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double ) (x).imag * ( double ) (y); \
}
// -- (xyr) = (zd?) ------------------------------------------------------------
#define bl2_zdsdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y); \
}
#define bl2_zdddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y); \
}
#define bl2_zdcdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y); \
(a).imag += ( float ) (x).imag * ( float ) (y); \
}
#define bl2_zdzdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y); \
(a).imag += ( double ) (x).imag * ( double ) (y); \
}
// -- (xyr) = (zc?) ------------------------------------------------------------
#define bl2_zcsdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_zcddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_zccdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag + ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_zczdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag + ( double ) (x).imag * ( double ) (y).real; \
}
// -- (xyr) = (zz?) ------------------------------------------------------------
#define bl2_zzsdots( x, y, a ) \
{ \
(a) += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
}
#define bl2_zzddots( x, y, a ) \
{ \
(a) += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
}
#define bl2_zzcdots( x, y, a ) \
{ \
(a).real += ( float ) (x).real * ( float ) (y).real - ( float ) (x).imag * ( float ) (y).imag; \
(a).imag += ( float ) (x).real * ( float ) (y).imag + ( float ) (x).imag * ( float ) (y).real; \
}
#define bl2_zzzdots( x, y, a ) \
{ \
(a).real += ( double ) (x).real * ( double ) (y).real - ( double ) (x).imag * ( double ) (y).imag; \
(a).imag += ( double ) (x).real * ( double ) (y).imag + ( double ) (x).imag * ( double ) (y).real; \
}
#define bl2_sdots( x, y, a ) \
{ \
bl2_sssdots( x, y, a ); \
}
#define bl2_ddots( x, y, a ) \
{ \
bl2_ddddots( x, y, a ); \
}
#define bl2_cdots( x, y, a ) \
{ \
bl2_cccdots( x, y, a ); \
}
#define bl2_zdots( x, y, a ) \
{ \
bl2_zzzdots( x, y, a ); \
}
#endif

View File

@@ -0,0 +1,161 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_EQ_H
#define BLIS_EQ_H
// eq1
#define bl2_seq1( a ) \
\
( (a) == 1.0F )
#define bl2_deq1( a ) \
\
( (a) == 1.0 )
#define bl2_ceq1( a ) \
\
( (a).real == 1.0F && (a).imag == 0.0F )
#define bl2_zeq1( a ) \
\
( (a).real == 1.0 && (a).imag == 0.0 )
// eq0
#define bl2_seq0( a ) \
\
( (a) == 0.0F )
#define bl2_deq0( a ) \
\
( (a) == 0.0 )
#define bl2_ceq0( a ) \
\
( (a).real == 0.0F && (a).imag == 0.0F )
#define bl2_zeq0( a ) \
\
( (a).real == 0.0 && (a).imag == 0.0 )
// eqm1
#define bl2_seqm1( a ) \
\
( (a) == -1.0F )
#define bl2_deqm1( a ) \
\
( (a) == -1.0 )
#define bl2_ceqm1( a ) \
\
( (a).real == -1.0F && (a).imag == 0.0F )
#define bl2_zeqm1( a ) \
\
( (a).real == -1.0 && (a).imag == 0.0 )
// eq (passed by value)
#define bl2_seq( a, b ) \
\
( (a) == (b) )
#define bl2_deq( a, b ) \
\
( (a) == (b) )
#define bl2_ceq( a, b ) \
\
( ( (a).real == (b).real ) && \
( (a).imag == (b).imag ) )
#define bl2_zeq( a, b ) \
\
( ( (a).real == (b).real ) && \
( (a).imag == (b).imag ) )
#define bl2_ieq( a, b ) \
\
( (a) == (b) )
// eqa (passed by address)
#define bl2_seqa( a, b ) \
\
( *(( float* )(a)) == *(( float* )(b)) )
#define bl2_deqa( a, b ) \
\
( *(( double* )(a)) == *(( double* )(b)) )
#define bl2_ceqa( a, b ) \
\
( ( (( scomplex* )(a))->real == (( scomplex* )(b))->real ) && \
( (( scomplex* )(a))->imag == (( scomplex* )(b))->imag ) )
#define bl2_zeqa( a, b ) \
\
( ( (( dcomplex* )(a))->real == (( dcomplex* )(b))->real ) && \
( (( dcomplex* )(a))->imag == (( dcomplex* )(b))->imag ) )
#define bl2_ieqa( a, b ) \
\
( *(( int* )(a)) == *(( int* )(b)) )
// imageq0
#define bl2_simageq0( a ) \
\
( TRUE )
#define bl2_dimageq0( a ) \
\
( TRUE )
#define bl2_cimageq0( a ) \
\
( (( scomplex* )(a))->imag == ( float ) 0.0 )
#define bl2_zimageq0( a ) \
\
( (( dcomplex* )(a))->imag == ( double ) 0.0 )
#endif

View File

@@ -0,0 +1,64 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_FPRINTS_H
#define BLIS_FPRINTS_H
// prints
#define bl2_sfprints( file, spec, x ) \
{ \
fprintf( file, spec, (x) ); \
}
#define bl2_dfprints( file, spec, x ) \
{ \
fprintf( file, spec, (x) ); \
}
#define bl2_cfprints( file, spec, x ) \
{ \
fprintf( file, spec, (x).real ); \
fprintf( file, " + " ); \
fprintf( file, spec, (x).imag ); \
fprintf( file, " " ); \
}
#define bl2_zfprints( file, spec, x ) \
{ \
fprintf( file, spec, (x).real ); \
fprintf( file, " + " ); \
fprintf( file, spec, (x).imag ); \
fprintf( file, " " ); \
}
#endif

View File

@@ -0,0 +1,69 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_INVERTS_H
#define BLIS_INVERTS_H
// inverts
// Notes:
// - The first char encodes the type of x.
#define bl2_sinverts( x ) \
{ \
(x) = 1.0F / ( float ) (x); \
}
#define bl2_dinverts( x ) \
{ \
(x) = 1.0 / ( float ) (x); \
}
#define bl2_cinverts( x ) \
{ \
float temp = 1.0F / ( ( float ) (x).real * (x).real + \
( float ) (x).imag * (x).imag ); \
(x).real = ( float ) (x).real * temp; \
(x).imag = ( float ) (x).imag * -temp; \
}
#define bl2_zinverts( x ) \
{ \
double temp = 1.0 / ( ( double ) (x).real * (x).real + \
( double ) (x).imag * (x).imag ); \
(x).real = ( double ) (x).real * temp; \
(x).imag = ( double ) (x).imag * -temp; \
}
#endif

View File

@@ -0,0 +1,159 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_INVSCALCJS_H
#define BLIS_INVSCALCJS_H
// invscalcjs
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
#define bl2_ssinvscalcjs( conj, a, x ) \
{ \
(x) /= ( float ) (a); \
}
#define bl2_dsinvscalcjs( conj, a, x ) \
{ \
(x) /= ( float ) (a); \
}
#define bl2_csinvscalcjs( conj, a, x ) \
{ \
(x) /= ( float ) (a).real; \
}
#define bl2_zsinvscalcjs( conj, a, x ) \
{ \
(x) /= ( float ) (a).real; \
}
#define bl2_sdinvscalcjs( conj, a, x ) \
{ \
(x) /= ( double ) (a); \
}
#define bl2_ddinvscalcjs( conj, a, x ) \
{ \
(x) /= ( double ) (a); \
}
#define bl2_cdinvscalcjs( conj, a, x ) \
{ \
(x) /= ( double ) (a).real; \
}
#define bl2_zdinvscalcjs( conj, a, x ) \
{ \
(x) /= ( double ) (a).real; \
}
#define bl2_scinvscalcjs( conj, a, x ) \
{ \
(x).real /= ( float ) (a); \
(x).imag /= ( float ) (a); \
}
#define bl2_dcinvscalcjs( conj, a, x ) \
{ \
(x).real /= ( float ) (a); \
(x).imag /= ( float ) (a); \
}
#define bl2_ccinvscalcjs( conj, a, x ) \
{ \
float aimag = ( bl2_is_conj( conj ) ? ( float ) -(a).imag : \
( float ) (a).imag ); \
float temp = ( float ) (a).real * (a).real + ( float ) aimag * (a).imag; \
float xr = ( float ) ( ( float ) (a).real * (x).real + ( float ) aimag * (x).imag ) / temp; \
float xi = ( float ) ( ( float ) (a).real * (x).imag - ( float ) aimag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_zcinvscalcjs( conj, a, x ) \
{ \
float aimag = ( bl2_is_conj( conj ) ? ( float ) -(a).imag : \
( float ) (a).imag ); \
float temp = ( float ) (a).real * (a).real + ( float ) aimag * (a).imag; \
float xr = ( float ) ( ( float ) (a).real * (x).real + ( float ) aimag * (x).imag ) / temp; \
float xi = ( float ) ( ( float ) (a).real * (x).imag - ( float ) aimag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_szinvscalcjs( conj, a, x ) \
{ \
(x).real /= ( double ) (a); \
(x).imag /= ( double ) (a); \
}
#define bl2_dzinvscalcjs( conj, a, x ) \
{ \
(x).real /= ( double ) (a); \
(x).imag /= ( double ) (a); \
}
#define bl2_czinvscalcjs( conj, a, x ) \
{ \
double aimag = ( bl2_is_conj( conj ) ? ( double ) -(a).imag : \
( double ) (a).imag ); \
double temp = ( double ) (a).real * (a).real + ( double ) aimag * (a).imag; \
double xr = ( double ) ( ( double ) (a).real * (x).real + ( double ) aimag * (x).imag ) / temp; \
double xi = ( double ) ( ( double ) (a).real * (x).imag - ( double ) aimag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_zzinvscalcjs( conj, a, x ) \
{ \
double aimag = ( bl2_is_conj( conj ) ? ( double ) -(a).imag : \
( double ) (a).imag ); \
double temp = ( double ) (a).real * (a).real + ( double ) aimag * (a).imag; \
double xr = ( double ) ( ( double ) (a).real * (x).real + ( double ) aimag * (x).imag ) / temp; \
double xi = ( double ) ( ( double ) (a).real * (x).imag - ( double ) aimag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_sinvscalcjs( conj, a, x ) \
{ \
bl2_ssinvscalcjs( conj, a, x ); \
}
#define bl2_dinvscalcjs( conj, a, x ) \
{ \
bl2_ddinvscalcjs( conj, a, x ); \
}
#define bl2_cinvscalcjs( conj, a, x ) \
{ \
bl2_ccinvscalcjs( conj, a, x ); \
}
#define bl2_zinvscalcjs( conj, a, x ) \
{ \
bl2_zzinvscalcjs( conj, a, x ); \
}
#endif

View File

@@ -0,0 +1,152 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_INVSCALJS_H
#define BLIS_INVSCALJS_H
// invscaljs
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - a is used in conjugated form.
#define bl2_ssinvscaljs( a, x ) \
{ \
(x) /= ( float ) (a); \
}
#define bl2_dsinvscaljs( a, x ) \
{ \
(x) /= ( float ) (a); \
}
#define bl2_csinvscaljs( a, x ) \
{ \
(x) /= ( float ) (a).real; \
}
#define bl2_zsinvscaljs( a, x ) \
{ \
(x) /= ( float ) (a).real; \
}
#define bl2_sdinvscaljs( a, x ) \
{ \
(x) /= ( double ) (a); \
}
#define bl2_ddinvscaljs( a, x ) \
{ \
(x) /= ( double ) (a); \
}
#define bl2_cdinvscaljs( a, x ) \
{ \
(x) /= ( double ) (a).real; \
}
#define bl2_zdinvscaljs( a, x ) \
{ \
(x) /= ( double ) (a).real; \
}
#define bl2_scinvscaljs( a, x ) \
{ \
(x).real /= ( float ) (a); \
(x).imag /= ( float ) (a); \
}
#define bl2_dcinvscaljs( a, x ) \
{ \
(x).real /= ( float ) (a); \
(x).imag /= ( float ) (a); \
}
#define bl2_ccinvscaljs( a, x ) \
{ \
float temp = ( float ) (a).real * (a).real + ( float ) (a).imag * (a).imag; \
float xr = ( float ) ( ( float ) (a).real * (x).real - ( float ) (a).imag * (x).imag ) / temp; \
float xi = ( float ) ( ( float ) (a).real * (x).imag + ( float ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_zcinvscaljs( a, x ) \
{ \
float temp = ( float ) (a).real * (a).real + ( float ) (a).imag * (a).imag; \
float xr = ( float ) ( ( float ) (a).real * (x).real - ( float ) (a).imag * (x).imag ) / temp; \
float xi = ( float ) ( ( float ) (a).real * (x).imag + ( float ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_szinvscaljs( a, x ) \
{ \
(x).real /= ( double ) (a); \
(x).imag /= ( double ) (a); \
}
#define bl2_dzinvscaljs( a, x ) \
{ \
(x).real /= ( double ) (a); \
(x).imag /= ( double ) (a); \
}
#define bl2_czinvscaljs( a, x ) \
{ \
double temp = ( double ) (a).real * (a).real + ( double ) (a).imag * (a).imag; \
double xr = ( double ) ( ( double ) (a).real * (x).real - ( double ) (a).imag * (x).imag ) / temp; \
double xi = ( double ) ( ( double ) (a).real * (x).imag + ( double ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_zzinvscaljs( a, x ) \
{ \
double temp = ( double ) (a).real * (a).real + ( double ) (a).imag * (a).imag; \
double xr = ( double ) ( ( double ) (a).real * (x).real - ( double ) (a).imag * (x).imag ) / temp; \
double xi = ( double ) ( ( double ) (a).real * (x).imag + ( double ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_sinvscaljs( a, x ) \
{ \
bl2_ssinvscaljs( a, x ); \
}
#define bl2_dinvscaljs( a, x ) \
{ \
bl2_ddinvscaljs( a, x ); \
}
#define bl2_cinvscaljs( a, x ) \
{ \
bl2_ccinvscaljs( a, x ); \
}
#define bl2_zinvscaljs( a, x ) \
{ \
bl2_zzinvscaljs( a, x ); \
}
#endif

View File

@@ -0,0 +1,151 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_INVSCALS_H
#define BLIS_INVSCALS_H
// invscals
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
#define bl2_ssinvscals( a, x ) \
{ \
(x) /= ( float ) (a); \
}
#define bl2_dsinvscals( a, x ) \
{ \
(x) /= ( float ) (a); \
}
#define bl2_csinvscals( a, x ) \
{ \
(x) /= ( float ) (a).real; \
}
#define bl2_zsinvscals( a, x ) \
{ \
(x) /= ( float ) (a).real; \
}
#define bl2_sdinvscals( a, x ) \
{ \
(x) /= ( double ) (a); \
}
#define bl2_ddinvscals( a, x ) \
{ \
(x) /= ( double ) (a); \
}
#define bl2_cdinvscals( a, x ) \
{ \
(x) /= ( double ) (a).real; \
}
#define bl2_zdinvscals( a, x ) \
{ \
(x) /= ( double ) (a).real; \
}
#define bl2_scinvscals( a, x ) \
{ \
(x).real /= ( float ) (a); \
(x).imag /= ( float ) (a); \
}
#define bl2_dcinvscals( a, x ) \
{ \
(x).real /= ( float ) (a); \
(x).imag /= ( float ) (a); \
}
#define bl2_ccinvscals( a, x ) \
{ \
float temp = ( float ) (a).real * (a).real + ( float ) (a).imag * (a).imag; \
float xr = ( float ) ( ( float ) (a).real * (x).real + ( float ) (a).imag * (x).imag ) / temp; \
float xi = ( float ) ( ( float ) (a).real * (x).imag - ( float ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_zcinvscals( a, x ) \
{ \
float temp = ( float ) (a).real * (a).real + ( float ) (a).imag * (a).imag; \
float xr = ( float ) ( ( float ) (a).real * (x).real + ( float ) (a).imag * (x).imag ) / temp; \
float xi = ( float ) ( ( float ) (a).real * (x).imag - ( float ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_szinvscals( a, x ) \
{ \
(x).real /= ( double ) (a); \
(x).imag /= ( double ) (a); \
}
#define bl2_dzinvscals( a, x ) \
{ \
(x).real /= ( double ) (a); \
(x).imag /= ( double ) (a); \
}
#define bl2_czinvscals( a, x ) \
{ \
double temp = ( double ) (a).real * (a).real + ( double ) (a).imag * (a).imag; \
double xr = ( double ) ( ( double ) (a).real * (x).real + ( double ) (a).imag * (x).imag ) / temp; \
double xi = ( double ) ( ( double ) (a).real * (x).imag - ( double ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_zzinvscals( a, x ) \
{ \
double temp = ( double ) (a).real * (a).real + ( double ) (a).imag * (a).imag; \
double xr = ( double ) ( ( double ) (a).real * (x).real + ( double ) (a).imag * (x).imag ) / temp; \
double xi = ( double ) ( ( double ) (a).real * (x).imag - ( double ) (a).imag * (x).real ) / temp; \
(x).real = xr; \
(x).imag = xi; \
}
#define bl2_sinvscals( a, x ) \
{ \
bl2_ssinvscals( a, x ); \
}
#define bl2_dinvscals( a, x ) \
{ \
bl2_ddinvscals( a, x ); \
}
#define bl2_cinvscals( a, x ) \
{ \
bl2_ccinvscals( a, x ); \
}
#define bl2_zinvscals( a, x ) \
{ \
bl2_zzinvscals( a, x ); \
}
#endif

View File

@@ -0,0 +1,139 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_NEG2S_H
#define BLIS_NEG2S_H
// neg2s
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_ssneg2s( x, y ) \
{ \
(y) = ( float ) -(x); \
}
#define bl2_dsneg2s( x, y ) \
{ \
(y) = ( float ) -(x); \
}
#define bl2_csneg2s( x, y ) \
{ \
(y) = ( float ) -(x).real; \
}
#define bl2_zsneg2s( x, y ) \
{ \
(y) = ( float ) -(x).real; \
}
#define bl2_sdneg2s( x, y ) \
{ \
(y) = ( double ) -(x); \
}
#define bl2_ddneg2s( x, y ) \
{ \
(y) = ( double ) -(x); \
}
#define bl2_cdneg2s( x, y ) \
{ \
(y) = ( double ) -(x).real; \
}
#define bl2_zdneg2s( x, y ) \
{ \
(y) = ( double ) -(x).real; \
}
#define bl2_scneg2s( x, y ) \
{ \
(y).real = ( float ) -(x); \
(y).imag = 0.0F; \
}
#define bl2_dcneg2s( x, y ) \
{ \
(y).real = ( float ) -(x); \
(y).imag = 0.0F; \
}
#define bl2_ccneg2s( x, y ) \
{ \
(y).real = ( float ) -(x).real; \
(y).imag = ( float ) -(x).imag; \
}
#define bl2_zcneg2s( x, y ) \
{ \
(y).real = ( float ) -(x).real; \
(y).imag = ( float ) -(x).imag; \
}
#define bl2_szneg2s( x, y ) \
{ \
(y).real = ( double ) -(x); \
(y).imag = 0.0; \
}
#define bl2_dzneg2s( x, y ) \
{ \
(y).real = ( double ) -(x); \
(y).imag = 0.0; \
}
#define bl2_czneg2s( x, y ) \
{ \
(y).real = ( double ) -(x).real; \
(y).imag = ( double ) -(x).imag; \
}
#define bl2_zzneg2s( x, y ) \
{ \
(y).real = ( double ) -(x).real; \
(y).imag = ( double ) -(x).imag; \
}
#define bl2_sneg2s( x, y ) \
{ \
bl2_ssneg2s( x, y ); \
}
#define bl2_dneg2s( x, y ) \
{ \
bl2_ddneg2s( x, y ); \
}
#define bl2_cneg2s( x, y ) \
{ \
bl2_ccneg2s( x, y ); \
}
#define bl2_zneg2s( x, y ) \
{ \
bl2_zzneg2s( x, y ); \
}
#endif

View File

@@ -0,0 +1,139 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_PROJRS_H
#define BLIS_PROJRS_H
// projrs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_ssprojrs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dsprojrs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_csprojrs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zsprojrs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdprojrs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddprojrs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdprojrs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdprojrs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_scprojrs( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_dcprojrs( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_ccprojrs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = 0.0F; \
}
#define bl2_zcprojrs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = 0.0F; \
}
#define bl2_szprojrs( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_dzprojrs( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_czprojrs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = 0.0; \
}
#define bl2_zzprojrs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = 0.0; \
}
#define bl2_sprojrs( x, y ) \
{ \
bl2_ssprojrs( x, y ); \
}
#define bl2_dprojrs( x, y ) \
{ \
bl2_ddprojrs( x, y ); \
}
#define bl2_cprojrs( x, y ) \
{ \
bl2_ccprojrs( x, y ); \
}
#define bl2_zprojrs( x, y ) \
{ \
bl2_zzprojrs( x, y ); \
}
#endif

View File

@@ -0,0 +1,62 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_RANDS_H
#define BLIS_RANDS_H
#define bl2_srands( a ) \
{ \
(a) = ( float ) ( ( double ) rand() / \
( ( double ) RAND_MAX / 2.0 ) \
) - 1.0F; \
}
#define bl2_drands( a ) \
{ \
(a) = ( double ) ( ( double ) rand() / \
( ( double ) RAND_MAX / 2.0 ) \
) - 1.0F; \
}
#define bl2_crands( a ) \
{ \
bl2_srands( (a).real ); \
bl2_srands( (a).imag ); \
}
#define bl2_zrands( a ) \
{ \
bl2_drands( (a).real ); \
bl2_drands( (a).imag ); \
}
#endif

View File

@@ -0,0 +1,397 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SCAL2JS_H
#define BLIS_SCAL2JS_H
// scal2js
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - The third char encodes the type of y.
// - x is used in conjugated form.
// -- (axy) = (ss?) ------------------------------------------------------------
#define bl2_sssscal2js( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_ssdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sscscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sszscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a) * ( float ) (x) ); \
}
// -- (axy) = (sd?) ------------------------------------------------------------
#define bl2_sdsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sddscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (sc?) ------------------------------------------------------------
#define bl2_scsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_scdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_sccscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a) * ( float ) (x).real ); \
(y).imag = ( float )( ( float ) (a) * ( float )-(x).imag ); \
}
#define bl2_sczscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a) * ( float ) (x).real ); \
(y).imag = ( double )( ( float ) (a) * ( float )-(x).imag ); \
}
// -- (axy) = (sz?) ------------------------------------------------------------
#define bl2_szsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( float )( ( double ) (a) * ( double )-(x).imag ); \
}
#define bl2_szzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( double )( ( double ) (a) * ( double )-(x).imag ); \
}
// -- (axy) = (ds?) ------------------------------------------------------------
#define bl2_dssscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dsdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dscscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dszscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dd?) ------------------------------------------------------------
#define bl2_ddsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dddscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dc?) ------------------------------------------------------------
#define bl2_dcsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dcdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dccscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( float )( ( double ) (a) * ( double )-(x).imag ); \
}
#define bl2_dczscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( double )( ( double ) (a) * ( double )-(x).imag ); \
}
// -- (axy) = (dz?) ------------------------------------------------------------
#define bl2_dzsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( float )( ( double ) (a) * ( double )-(x).imag ); \
}
#define bl2_dzzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( double )( ( double ) (a) * ( double )-(x).imag ); \
}
// -- (axy) = (cs?) ------------------------------------------------------------
#define bl2_cssscal2js( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_csdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_cscscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_cszscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (cd?) ------------------------------------------------------------
#define bl2_cdsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cddscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cdcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_cdzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (cc?) ------------------------------------------------------------
#define bl2_ccsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_ccdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_cccscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_cczscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (cz?) ------------------------------------------------------------
#define bl2_czsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_czzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
// -- (axy) = (zs?) ------------------------------------------------------------
#define bl2_zssscal2js( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zsdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zscscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_zszscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (zd?) ------------------------------------------------------------
#define bl2_zdsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zddscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zdcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_zdzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (zc?) ------------------------------------------------------------
#define bl2_zcsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zcdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zccscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_zczscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x).real + ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x).real - ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (zz?) ------------------------------------------------------------
#define bl2_zzsscal2js( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzdscal2js( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzcscal2js( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_zzzscal2js( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x).real + ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x).real - ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_sscal2js( a, x, y ) \
{ \
bl2_sssscal2js( a, x, y ); \
}
#define bl2_dscal2js( a, x, y ) \
{ \
bl2_dddscal2js( a, x, y ); \
}
#define bl2_cscal2js( a, x, y ) \
{ \
bl2_cccscal2js( a, x, y ); \
}
#define bl2_zscal2js( a, x, y ) \
{ \
bl2_zzzscal2js( a, x, y ); \
}
#endif

View File

@@ -0,0 +1,396 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SCAL2S_H
#define BLIS_SCAL2S_H
// scal2s
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - The third char encodes the type of y.
// -- (axy) = (ss?) ------------------------------------------------------------
#define bl2_sssscal2s( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_ssdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sscscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a) * ( float ) (x) ); \
}
#define bl2_sszscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a) * ( float ) (x) ); \
}
// -- (axy) = (sd?) ------------------------------------------------------------
#define bl2_sdsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sddscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_sdzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (sc?) ------------------------------------------------------------
#define bl2_scsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_scdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a) * ( float ) (x).real ); \
}
#define bl2_sccscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a) * ( float ) (x).real ); \
(y).imag = ( float )( ( float ) (a) * ( float ) (x).imag ); \
}
#define bl2_sczscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a) * ( float ) (x).real ); \
(y).imag = ( double )( ( float ) (a) * ( float ) (x).imag ); \
}
// -- (axy) = (sz?) ------------------------------------------------------------
#define bl2_szsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_szcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_szzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (ds?) ------------------------------------------------------------
#define bl2_dssscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dsdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dscscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dszscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dd?) ------------------------------------------------------------
#define bl2_ddsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_dddscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x) ); \
}
#define bl2_ddzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x) ); \
}
// -- (axy) = (dc?) ------------------------------------------------------------
#define bl2_dcsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dcdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dccscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_dczscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (dz?) ------------------------------------------------------------
#define bl2_dzsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a) * ( double ) (x).real ); \
}
#define bl2_dzcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( float )( ( double ) (a) * ( double ) (x).imag ); \
}
#define bl2_dzzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a) * ( double ) (x).real ); \
(y).imag = ( double )( ( double ) (a) * ( double ) (x).imag ); \
}
// -- (axy) = (cs?) ------------------------------------------------------------
#define bl2_cssscal2s( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_csdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_cscscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_cszscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (cd?) ------------------------------------------------------------
#define bl2_cdsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cddscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_cdcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_cdzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (cc?) ------------------------------------------------------------
#define bl2_ccsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_ccdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_cccscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_cczscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (cz?) ------------------------------------------------------------
#define bl2_czsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_czcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_czzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
// -- (axy) = (zs?) ------------------------------------------------------------
#define bl2_zssscal2s( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zsdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x) ); \
}
#define bl2_zscscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x) ); \
}
#define bl2_zszscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x) ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x) ); \
}
// -- (axy) = (zd?) ------------------------------------------------------------
#define bl2_zdsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zddscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x) ); \
}
#define bl2_zdcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x) ); \
}
#define bl2_zdzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x) ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x) ); \
}
// -- (axy) = (zc?) ------------------------------------------------------------
#define bl2_zcsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zcdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
}
#define bl2_zccscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( float )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
#define bl2_zczscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( float ) (a).real * ( float ) (x).real - ( float ) (a).imag * ( float ) (x).imag ); \
(y).imag = ( double )( ( float ) (a).imag * ( float ) (x).real + ( float ) (a).real * ( float ) (x).imag ); \
}
// -- (axy) = (zz?) ------------------------------------------------------------
#define bl2_zzsscal2s( a, x, y ) \
{ \
(y) = ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzdscal2s( a, x, y ) \
{ \
(y) = ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
}
#define bl2_zzcscal2s( a, x, y ) \
{ \
(y).real = ( float )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( float )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_zzzscal2s( a, x, y ) \
{ \
(y).real = ( double )( ( double ) (a).real * ( double ) (x).real - ( double ) (a).imag * ( double ) (x).imag ); \
(y).imag = ( double )( ( double ) (a).imag * ( double ) (x).real + ( double ) (a).real * ( double ) (x).imag ); \
}
#define bl2_sscal2s( a, x, y ) \
{ \
bl2_sssscal2s( a, x, y ); \
}
#define bl2_dscal2s( a, x, y ) \
{ \
bl2_dddscal2s( a, x, y ); \
}
#define bl2_cscal2s( a, x, y ) \
{ \
bl2_cccscal2s( a, x, y ); \
}
#define bl2_zscal2s( a, x, y ) \
{ \
bl2_zzzscal2s( a, x, y ); \
}
#endif

View File

@@ -0,0 +1,156 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SCALCJS_H
#define BLIS_SCALCJS_H
// scalcjs
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - a is (conditionally) used in conjugated form.
#define bl2_ssscalcjs( conj, a, x ) \
{ \
(x) *= ( float ) (a); \
}
#define bl2_dsscalcjs( conj, a, x ) \
{ \
(x) *= ( float ) (a); \
}
#define bl2_csscalcjs( conj, a, x ) \
{ \
(x) *= ( float ) (a).real; \
}
#define bl2_zsscalcjs( conj, a, x ) \
{ \
(x) *= ( float ) (a).real; \
}
#define bl2_sdscalcjs( conj, a, x ) \
{ \
(x) *= ( double ) (a); \
}
#define bl2_ddscalcjs( conj, a, x ) \
{ \
(x) *= ( double ) (a); \
}
#define bl2_cdscalcjs( conj, a, x ) \
{ \
(x) *= ( double ) (a).real; \
}
#define bl2_zdscalcjs( conj, a, x ) \
{ \
(x) *= ( double ) (a).real; \
}
#define bl2_scscalcjs( conj, a, x ) \
{ \
(x).real *= ( float ) (a); \
(x).imag *= ( float ) (a); \
}
#define bl2_dcscalcjs( conj, a, x ) \
{ \
(x).real *= ( float ) (a); \
(x).imag *= ( float ) (a); \
}
#define bl2_ccscalcjs( conj, a, x ) \
{ \
float aimag = ( bl2_is_conj( conj ) ? ( float ) -(a).imag : \
( float ) (a).imag ); \
float tempr = ( float ) (a).real * (x).real - ( float ) aimag * (x).imag; \
float tempi = ( float ) (a).real * (x).imag + ( float ) aimag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_zcscalcjs( conj, a, x ) \
{ \
float aimag = ( bl2_is_conj( conj ) ? ( float ) -(a).imag : \
( float ) (a).imag ); \
float tempr = ( float ) (a).real * (x).real - ( float ) aimag * (x).imag; \
float tempi = ( float ) (a).real * (x).imag + ( float ) aimag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_szscalcjs( conj, a, x ) \
{ \
(x).real *= ( double ) (a); \
(x).imag *= ( double ) (a); \
}
#define bl2_dzscalcjs( conj, a, x ) \
{ \
(x).real *= ( double ) (a); \
(x).imag *= ( double ) (a); \
}
#define bl2_czscalcjs( conj, a, x ) \
{ \
double aimag = ( bl2_is_conj( conj ) ? ( double ) -(a).imag : \
( double ) (a).imag ); \
double tempr = ( double ) (a).real * (x).real - ( double ) aimag * (x).imag; \
double tempi = ( double ) (a).real * (x).imag + ( double ) aimag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_zzscalcjs( conj, a, x ) \
{ \
double aimag = ( bl2_is_conj( conj ) ? ( double ) -(a).imag : \
( double ) (a).imag ); \
double tempr = ( double ) (a).real * (x).real - ( double ) aimag * (x).imag; \
double tempi = ( double ) (a).real * (x).imag + ( double ) aimag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_sscalcjs( conj, a, x ) \
{ \
bl2_ssscalcjs( conj, a, x ); \
}
#define bl2_dscalcjs( conj, a, x ) \
{ \
bl2_ddscalcjs( conj, a, x ); \
}
#define bl2_cscalcjs( conj, a, x ) \
{ \
bl2_ccscalcjs( conj, a, x ); \
}
#define bl2_zscalcjs( conj, a, x ) \
{ \
bl2_zzscalcjs( conj, a, x ); \
}
#endif

View File

@@ -0,0 +1,148 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SCALJS_H
#define BLIS_SCALJS_H
// scaljs
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
// - a is used in conjugated form.
#define bl2_ssscaljs( a, x ) \
{ \
(x) *= ( float ) (a); \
}
#define bl2_dsscaljs( a, x ) \
{ \
(x) *= ( float ) (a); \
}
#define bl2_csscaljs( a, x ) \
{ \
(x) *= ( float ) (a).real; \
}
#define bl2_zsscaljs( a, x ) \
{ \
(x) *= ( float ) (a).real; \
}
#define bl2_sdscaljs( a, x ) \
{ \
(x) *= ( double ) (a); \
}
#define bl2_ddscaljs( a, x ) \
{ \
(x) *= ( double ) (a); \
}
#define bl2_cdscaljs( a, x ) \
{ \
(x) *= ( double ) (a).real; \
}
#define bl2_zdscaljs( a, x ) \
{ \
(x) *= ( double ) (a).real; \
}
#define bl2_scscaljs( a, x ) \
{ \
(x).real *= ( float ) (a); \
(x).imag *= ( float ) (a); \
}
#define bl2_dcscaljs( a, x ) \
{ \
(x).real *= ( float ) (a); \
(x).imag *= ( float ) (a); \
}
#define bl2_ccscaljs( a, x ) \
{ \
float tempr = ( float ) (a).real * (x).real + ( float ) (a).imag * (x).imag; \
float tempi = ( float ) (a).real * (x).imag - ( float ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_zcscaljs( a, x ) \
{ \
float tempr = ( float ) (a).real * (x).real + ( float ) (a).imag * (x).imag; \
float tempi = ( float ) (a).real * (x).imag - ( float ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_szscaljs( a, x ) \
{ \
(x).real *= ( double ) (a); \
(x).imag *= ( double ) (a); \
}
#define bl2_dzscaljs( a, x ) \
{ \
(x).real *= ( double ) (a); \
(x).imag *= ( double ) (a); \
}
#define bl2_czscaljs( a, x ) \
{ \
double tempr = ( double ) (a).real * (x).real + ( double ) (a).imag * (x).imag; \
double tempi = ( double ) (a).real * (x).imag - ( double ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_zzscaljs( a, x ) \
{ \
double tempr = ( double ) (a).real * (x).real + ( double ) (a).imag * (x).imag; \
double tempi = ( double ) (a).real * (x).imag - ( double ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_sscaljs( a, x ) \
{ \
bl2_ssscaljs( a, x ); \
}
#define bl2_dscaljs( a, x ) \
{ \
bl2_ddscaljs( a, x ); \
}
#define bl2_cscaljs( a, x ) \
{ \
bl2_ccscaljs( a, x ); \
}
#define bl2_zscaljs( a, x ) \
{ \
bl2_zzscaljs( a, x ); \
}
#endif

View File

@@ -0,0 +1,147 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SCALS_H
#define BLIS_SCALS_H
// scals
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
#define bl2_ssscals( a, x ) \
{ \
(x) *= ( float ) (a); \
}
#define bl2_dsscals( a, x ) \
{ \
(x) *= ( float ) (a); \
}
#define bl2_csscals( a, x ) \
{ \
(x) *= ( float ) (a).real; \
}
#define bl2_zsscals( a, x ) \
{ \
(x) *= ( float ) (a).real; \
}
#define bl2_sdscals( a, x ) \
{ \
(x) *= ( double ) (a); \
}
#define bl2_ddscals( a, x ) \
{ \
(x) *= ( double ) (a); \
}
#define bl2_cdscals( a, x ) \
{ \
(x) *= ( double ) (a).real; \
}
#define bl2_zdscals( a, x ) \
{ \
(x) *= ( double ) (a).real; \
}
#define bl2_scscals( a, x ) \
{ \
(x).real *= ( float ) (a); \
(x).imag *= ( float ) (a); \
}
#define bl2_dcscals( a, x ) \
{ \
(x).real *= ( float ) (a); \
(x).imag *= ( float ) (a); \
}
#define bl2_ccscals( a, x ) \
{ \
float tempr = ( float ) (a).real * (x).real - ( float ) (a).imag * (x).imag; \
float tempi = ( float ) (a).real * (x).imag + ( float ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_zcscals( a, x ) \
{ \
float tempr = ( float ) (a).real * (x).real - ( float ) (a).imag * (x).imag; \
float tempi = ( float ) (a).real * (x).imag + ( float ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_szscals( a, x ) \
{ \
(x).real *= ( double ) (a); \
(x).imag *= ( double ) (a); \
}
#define bl2_dzscals( a, x ) \
{ \
(x).real *= ( double ) (a); \
(x).imag *= ( double ) (a); \
}
#define bl2_czscals( a, x ) \
{ \
double tempr = ( double ) (a).real * (x).real - ( double ) (a).imag * (x).imag; \
double tempi = ( double ) (a).real * (x).imag + ( double ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_zzscals( a, x ) \
{ \
double tempr = ( double ) (a).real * (x).real - ( double ) (a).imag * (x).imag; \
double tempi = ( double ) (a).real * (x).imag + ( double ) (a).imag * (x).real; \
(x).real = tempr; \
(x).imag = tempi; \
}
#define bl2_sscals( a, x ) \
{ \
bl2_ssscals( a, x ); \
}
#define bl2_dscals( a, x ) \
{ \
bl2_ddscals( a, x ); \
}
#define bl2_cscals( a, x ) \
{ \
bl2_ccscals( a, x ); \
}
#define bl2_zscals( a, x ) \
{ \
bl2_zzscals( a, x ); \
}
#endif

View File

@@ -0,0 +1,82 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SET0_MXN_H
#define BLIS_SET0_MXN_H
// set0_mxn
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_sset0_mxn( m, n, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_sset0( *(y + i*rs_y + j*cs_y) ); \
}
#define bl2_dset0_mxn( m, n, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_dset0( *(y + i*rs_y + j*cs_y) ); \
}
#define bl2_cset0_mxn( m, n, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_cset0( *(y + i*rs_y + j*cs_y) ); \
}
#define bl2_zset0_mxn( m, n, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_zset0( *(y + i*rs_y + j*cs_y) ); \
}
#endif

View File

@@ -0,0 +1,143 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SQRT2S_H
#define BLIS_SQRT2S_H
// sqrt2s
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of a.
#define bl2_sssqrt2s( x, a ) \
{ \
(a) = ( float )sqrtf( (x) ); \
}
#define bl2_dssqrt2s( x, a ) \
{ \
(a) = ( float )sqrt( (x) ); \
}
#define bl2_cssqrt2s( x, a ) \
{ \
(a) = ( float )sqrtf( (x).real ); \
}
#define bl2_zssqrt2s( x, a ) \
{ \
(a) = ( float )sqrt( (x).real ); \
}
#define bl2_sdsqrt2s( x, a ) \
{ \
(a) = ( double )sqrtf( (x) ); \
}
#define bl2_ddsqrt2s( x, a ) \
{ \
(a) = ( double )sqrt( (x) ); \
}
#define bl2_cdsqrt2s( x, a ) \
{ \
(a) = ( double )sqrtf( (x).real ); \
}
#define bl2_zdsqrt2s( x, a ) \
{ \
(a) = ( double )sqrt( (x).real ); \
}
#define bl2_scsqrt2s( x, a ) \
{ \
(a).real = ( float )sqrtf( (x) ); \
(a).imag = 0.0F; \
}
#define bl2_dcsqrt2s( x, a ) \
{ \
(a).real = ( float )sqrt( (x) ); \
(a).imag = 0.0F; \
}
#define bl2_ccsqrt2s( x, a ) \
{ \
(a).real = ( float )sqrtf( (x).real ); \
(a).imag = 0.0F; \
}
#define bl2_zcsqrt2s( x, a ) \
{ \
(a).real = ( float )sqrt( (x).real ); \
(a).imag = 0.0F; \
}
#define bl2_szsqrt2s( x, a ) \
{ \
(a).real = ( double )sqrtf( (x) ); \
(a).imag = 0.0F; \
}
#define bl2_dzsqrt2s( x, a ) \
{ \
(a).real = ( double )sqrt( (x) ); \
(a).imag = 0.0F; \
}
#define bl2_czsqrt2s( x, a ) \
{ \
(a).real = ( double )sqrtf( (x).real ); \
(a).imag = 0.0F; \
}
#define bl2_zzsqrt2s( x, a ) \
{ \
(a).real = ( double )sqrt( (x).real ); \
(a).imag = 0.0F; \
}
#define bl2_ssqrt2s( x, a ) \
{ \
bl2_sssqrt2s( x, a ); \
}
#define bl2_dsqrt2s( x, a ) \
{ \
bl2_ddsqrt2s( x, a ); \
}
#define bl2_csqrt2s( x, a ) \
{ \
bl2_ccsqrt2s( x, a ); \
}
#define bl2_zsqrt2s( x, a ) \
{ \
bl2_zzsqrt2s( x, a ); \
}
#endif

View File

@@ -0,0 +1,139 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_SUBS_H
#define BLIS_SUBS_H
// subs
// Notes:
// - The first char encodes the type of a.
// - The second char encodes the type of x.
#define bl2_sssubs( a, y ) \
{ \
(y) -= ( float )(a); \
}
#define bl2_sdsubs( a, y ) \
{ \
(y) -= ( double )(a); \
}
#define bl2_scsubs( a, y ) \
{ \
(y).real -= ( float )(a); \
/*(y).imag -= 0.0F;*/ \
}
#define bl2_szsubs( a, y ) \
{ \
(y).real -= ( double )(a); \
/*(y).imag -= 0.0F;*/ \
}
#define bl2_dssubs( a, y ) \
{ \
(y) -= ( float )(a); \
}
#define bl2_ddsubs( a, y ) \
{ \
(y) -= ( double )(a); \
}
#define bl2_dcsubs( a, y ) \
{ \
(y).real -= ( float )(a); \
/*(y).imag -= 0.0F;*/ \
}
#define bl2_dzsubs( a, y ) \
{ \
(y).real -= ( double )(a); \
/*(y).imag -= 0.0F;*/ \
}
#define bl2_cssubs( a, y ) \
{ \
(y) -= ( float )(a).real; \
}
#define bl2_cdsubs( a, y ) \
{ \
(y) -= ( double )(a).real; \
}
#define bl2_ccsubs( a, y ) \
{ \
(y).real -= ( float )(a).real; \
(y).imag -= ( float )(a).imag; \
}
#define bl2_czsubs( a, y ) \
{ \
(y).real -= ( double )(a).real; \
(y).imag -= ( double )(a).imag; \
}
#define bl2_zssubs( a, y ) \
{ \
(y) -= ( float )(a).real; \
}
#define bl2_zdsubs( a, y ) \
{ \
(y) -= ( double )(a).real; \
}
#define bl2_zcsubs( a, y ) \
{ \
(y).real -= ( float )(a).real; \
(y).imag -= ( float )(a).imag; \
}
#define bl2_zzsubs( a, y ) \
{ \
(y).real -= ( double )(a).real; \
(y).imag -= ( double )(a).imag; \
}
#define bl2_ssubs( a, y ) \
{ \
bl2_sssubs( a, y ); \
}
#define bl2_dsubs( a, y ) \
{ \
bl2_ddsubs( a, y ); \
}
#define bl2_csubs( a, y ) \
{ \
bl2_ccsubs( a, y ); \
}
#define bl2_zsubs( a, y ) \
{ \
bl2_zzsubs( a, y ); \
}
#endif

View File

@@ -0,0 +1,459 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_XPBYS_H
#define BLIS_XPBYS_H
// xpbys
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of b.
// - The third char encodes the type of y.
// -- (xby) = (ss?) ------------------------------------------------------------
#define bl2_sssxpbys( x, b, y ) \
{ \
(y) = ( float )( ( float ) (x) + ( float ) (b) * ( float ) (y) ); \
}
#define bl2_ssdxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x) + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_sscxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( float ) (x) + ( float ) (b) * ( float ) (y).real ); \
}
#define bl2_sszxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( double ) (x) + ( double ) (b) * ( double ) (y).real ); \
}
// -- (xby) = (sd?) ------------------------------------------------------------
#define bl2_sdsxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x) + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_sddxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x) + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_sdcxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( double ) (x) + ( double ) (b) * ( double ) (y).real ); \
}
#define bl2_sdzxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( double ) (x) + ( double ) (b) * ( double ) (y).real ); \
}
// -- (xby) = (sc?) ------------------------------------------------------------
#define bl2_scsxpbys( x, b, y ) \
{ \
(y) = ( float )( ( float ) (x) + ( float ) (b).real * ( float ) (y) ); \
}
#define bl2_scdxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x) + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_sccxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( float ) (x) + ( float ) (b).real * ( float ) (y).real - \
( float ) (b).imag * ( float ) (y).imag ); \
float tempi = ( float )( ( float ) (x) + ( float ) (b).imag * ( float ) (y).real + \
( float ) (b).real * ( float ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_sczxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( double ) (x) + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
float tempi = ( float )( ( double ) (x) + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (sz?) ------------------------------------------------------------
#define bl2_szsxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x) + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_szdxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x) + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_szcxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( double ) (x) + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
float tempi = ( float )( ( double ) (x) + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_szzxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( double ) (x) + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
float tempi = ( float )( ( double ) (x) + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (ds?) ------------------------------------------------------------
#define bl2_dssxpbys( x, b, y ) \
{ \
(y) = ( double )( ( float ) (x) + ( float ) (b) * ( float ) (y) ); \
}
#define bl2_dsdxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x) + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_dscxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( float ) (x) + ( float ) (b) * ( float ) (y).real ); \
}
#define bl2_dszxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x) + ( double ) (b) * ( double ) (y).real ); \
}
// -- (xby) = (dd?) ------------------------------------------------------------
#define bl2_ddsxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x) + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_dddxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x) + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_ddcxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x) + ( double ) (b) * ( double ) (y).real ); \
}
#define bl2_ddzxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x) + ( double ) (b) * ( double ) (y).real ); \
}
// -- (xby) = (dc?) ------------------------------------------------------------
#define bl2_dcsxpbys( x, b, y ) \
{ \
(y) = ( double )( ( float ) (x) + ( float ) (b).real * ( float ) (y) ); \
}
#define bl2_dcdxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x) + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_dccxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( float ) (x) + ( float ) (b).real * ( float ) (y).real - \
( float ) (b).imag * ( float ) (y).imag ); \
double tempi = ( double )( ( float ) (x) + ( float ) (b).imag * ( float ) (y).real + \
( float ) (b).real * ( float ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_dczxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x) + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x) + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (dz?) ------------------------------------------------------------
#define bl2_dzsxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x) + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_dzdxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x) + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_dzcxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x) + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x) + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_dzzxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x) + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x) + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (cs?) ------------------------------------------------------------
#define bl2_cssxpbys( x, b, y ) \
{ \
(y) = ( float )( ( float ) (x).real + ( float ) (b) * ( float ) (y) ); \
}
#define bl2_csdxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_cscxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( float ) (x).real + ( float ) (b) * ( float ) (y).real ); \
(y).imag = ( float )( ( float ) (x).imag + ( float ) (b) * ( float ) (y).imag ); \
}
#define bl2_cszxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( float )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
// -- (xby) = (cd?) ------------------------------------------------------------
#define bl2_cdsxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_cddxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_cdcxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( float )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
#define bl2_cdzxpbys( x, b, y ) \
{ \
(y).real = ( float )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( float )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
// -- (xby) = (cc?) ------------------------------------------------------------
#define bl2_ccsxpbys( x, b, y ) \
{ \
(y) = ( float )( ( float ) (x).real + ( float ) (b).real * ( float ) (y) ); \
}
#define bl2_ccdxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_cccxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( float ) (x).real + ( float ) (b).real * ( float ) (y).real - \
( float ) (b).imag * ( float ) (y).imag ); \
float tempi = ( float )( ( float ) (x).imag + ( float ) (b).imag * ( float ) (y).real + \
( float ) (b).real * ( float ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_cczxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
float tempi = ( float )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (cz?) ------------------------------------------------------------
#define bl2_czsxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_czdxpbys( x, b, y ) \
{ \
(y) = ( float )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_czcxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
float tempi = ( float )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_czzxpbys( x, b, y ) \
{ \
float tempr = ( float )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
float tempi = ( float )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (zs?) ------------------------------------------------------------
#define bl2_zssxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_zsdxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_zscxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( double )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
#define bl2_zszxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( double )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
// -- (xby) = (zd?) ------------------------------------------------------------
#define bl2_zdsxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_zddxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y) ); \
}
#define bl2_zdcxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( double )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
#define bl2_zdzxpbys( x, b, y ) \
{ \
(y).real = ( double )( ( double ) (x).real + ( double ) (b) * ( double ) (y).real ); \
(y).imag = ( double )( ( double ) (x).imag + ( double ) (b) * ( double ) (y).imag ); \
}
// -- (xby) = (zc?) ------------------------------------------------------------
#define bl2_zcsxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_zcdxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_zccxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_zczxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
// -- (xby) = (zz?) ------------------------------------------------------------
#define bl2_zzsxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_zzdxpbys( x, b, y ) \
{ \
(y) = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y) ); \
}
#define bl2_zzcxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_zzzxpbys( x, b, y ) \
{ \
double tempr = ( double )( ( double ) (x).real + ( double ) (b).real * ( double ) (y).real - \
( double ) (b).imag * ( double ) (y).imag ); \
double tempi = ( double )( ( double ) (x).imag + ( double ) (b).imag * ( double ) (y).real + \
( double ) (b).real * ( double ) (y).imag ); \
(y).real = tempr; \
(y).imag = tempi; \
}
#define bl2_sxpbys( x, b, y ) \
{ \
bl2_sssxpbys( x, b, y ); \
}
#define bl2_dxpbys( x, b, y ) \
{ \
bl2_dddxpbys( x, b, y ); \
}
#define bl2_cxpbys( x, b, y ) \
{ \
bl2_cccxpbys( x, b, y ); \
}
#define bl2_zxpbys( x, b, y ) \
{ \
bl2_zzzxpbys( x, b, y ); \
}
#endif

View File

@@ -0,0 +1,91 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_XPBYS_MXN_H
#define BLIS_XPBYS_MXN_H
// xpbys_mxn
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of b.
// - The third char encodes the type of y.
#define bl2_sssxpbys_mxn( m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_sssxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_dddxpbys_mxn( m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_dddxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_cccxpbys_mxn( m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_cccxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
}
#define bl2_zzzxpbys_mxn( m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
for ( i = 0; i < m; ++i ) \
bl2_zzzxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
}
#endif

View File

@@ -0,0 +1,188 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/
#ifndef BLIS_XPBYS_MXN_UPLO_H
#define BLIS_XPBYS_MXN_UPLO_H
// xpbys_mxn_u
#define bl2_sssxpbys_mxn_u( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_sssxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_dddxpbys_mxn_u( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_dddxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_cccxpbys_mxn_u( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_cccxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_zzzxpbys_mxn_u( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i >= diagoff ) \
{ \
bl2_zzzxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
// xpbys_mxn_l
#define bl2_sssxpbys_mxn_l( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_sssxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_dddxpbys_mxn_l( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_dddxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_cccxpbys_mxn_l( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_cccxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#define bl2_zzzxpbys_mxn_l( diagoff, m, n, x, rs_x, cs_x, beta, y, rs_y, cs_y ) \
{ \
dim_t i, j; \
\
for ( j = 0; j < n; ++j ) \
{ \
for ( i = 0; i < m; ++i ) \
{ \
if ( (doff_t)j - (doff_t)i <= diagoff ) \
{ \
bl2_zzzxpbys( *(x + i*rs_x + j*cs_x), \
*(beta), \
*(y + i*rs_y + j*cs_y) ); \
} \
} \
} \
}
#endif

View File

@@ -0,0 +1,33 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/

View File

@@ -0,0 +1,33 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/

View File

@@ -0,0 +1,33 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2012, The University of Texas
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 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.
*/