mirror of
https://github.com/amd/blis.git
synced 2026-04-20 15:48:50 +00:00
Implemented the 1m method.
Details: - Implemented the 1m method for inducing complex domain matrix multiplication. 1m support has been added to all level-3 operations, including trsm, and is now the default induced method when native complex domain gemm microkernels are omitted from the configuration. - Updated _cntx_init() operations to take a datatype parameter. This was needed for the corresponding function for 1m (because 1m requires us to choose between column-oriented or row-oriented execution, which requires us to query the context for the storage preference of the gemm microkernel, which requires knowing the datatype) but I decided that it made sense for consistency to add the parameter to all other cntx initialization functions as well, even though those functions don't use the parameter. - Updated bli_cntx_set_blkszs() and bli_gks_cntx_set_blkszs() to take a second scalar for each blocksize entry. The semantic meaning of the two scalars now is that the first will scale the default blocksize while the second will scale the maximum blocksize. This allows scaling the two independently, and was needed to support 1m, which requires scaling for a register blocksize but not the register storage blocksize (ie: "packdim") analogue. - Deprecated bli_blksz_reduce_dt_to() and defined two new functions, bli_blksz_reduce_def_to() and bli_blksz_reduce_max_to(), for reducing default and maximum blocksizes to some desired blocksize multiple. These functions are needed in the updated definitions of bli_cntx_set_blkszs() and bli_gks_cntx_set_blkszs(). - Added support for the 1e and 1r packing schemas to packm, including 1e/1r packing kernels. - Added a minor optimization to bli_gemm_ker_var2() that allows, under certain circumstances (specifically, real domain beta and row- or column-stored matrix C), the real domain macrokernel and microkernel to be called directly, rather than using the virtual microkernel via the complex domain macrokernel, which carries a slight additional amount of overhead. - Added 1m support to the testsuite. - Added 1m support to Makefile and runme.sh in test/3m4m. Also simplified some code in test_gemm.c driver.
This commit is contained in:
53
frame/include/level0/1e/bli_copy1es.h
Normal file
53
frame/include/level0/1e/bli_copy1es.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_COPY1ES_H
|
||||
#define BLIS_COPY1ES_H
|
||||
|
||||
// copy1es
|
||||
|
||||
#define bli_ccopy1es( a, bri, bir ) \
|
||||
{ \
|
||||
bli_ccopyris( bli_creal(a), bli_cimag(a), bli_creal(bri), bli_cimag(bri) ); \
|
||||
bli_ccopyris( -bli_cimag(a), bli_creal(a), bli_creal(bir), bli_cimag(bir) ); \
|
||||
}
|
||||
|
||||
#define bli_zcopy1es( a, bri, bir ) \
|
||||
{ \
|
||||
bli_zcopyris( bli_zreal(a), bli_zimag(a), bli_zreal(bri), bli_zimag(bri) ); \
|
||||
bli_zcopyris( -bli_zimag(a), bli_zreal(a), bli_zreal(bir), bli_zimag(bir) ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
53
frame/include/level0/1e/bli_copyj1es.h
Normal file
53
frame/include/level0/1e/bli_copyj1es.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_COPYJ1ES_H
|
||||
#define BLIS_COPYJ1ES_H
|
||||
|
||||
// copyj1es
|
||||
|
||||
#define bli_ccopyj1es( a, bri, bir ) \
|
||||
{ \
|
||||
bli_ccopyris( bli_creal(a), -bli_cimag(a), bli_creal(bri), bli_cimag(bri) ); \
|
||||
bli_ccopyris( bli_cimag(a), bli_creal(a), bli_creal(bir), bli_cimag(bir) ); \
|
||||
}
|
||||
|
||||
#define bli_zcopyj1es( a, bri, bir ) \
|
||||
{ \
|
||||
bli_zcopyris( bli_zreal(a), -bli_zimag(a), bli_zreal(bri), bli_zimag(bri) ); \
|
||||
bli_zcopyris( bli_zimag(a), bli_zreal(a), bli_zreal(bir), bli_zimag(bir) ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
53
frame/include/level0/1e/bli_invert1es.h
Normal file
53
frame/include/level0/1e/bli_invert1es.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_INVERT1ES_H
|
||||
#define BLIS_INVERT1ES_H
|
||||
|
||||
// invert1es
|
||||
|
||||
#define bli_cinvert1es( bri, bir ) \
|
||||
{ \
|
||||
bli_cinvertris( bli_creal(bri), bli_cimag(bri) ); \
|
||||
bli_ccopyris( bli_creal(bri), -bli_cimag(bri), bli_cimag(bir), bli_creal(bir) ); \
|
||||
}
|
||||
|
||||
#define bli_zinvert1es( bri, bir ) \
|
||||
{ \
|
||||
bli_zinvertris( bli_zreal(bri), bli_zimag(bri) ); \
|
||||
bli_zcopyris( bli_zreal(bri), -bli_zimag(bri), bli_zimag(bir), bli_zreal(bir) ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
53
frame/include/level0/1e/bli_scal1es.h
Normal file
53
frame/include/level0/1e/bli_scal1es.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL1ES_H
|
||||
#define BLIS_SCAL1ES_H
|
||||
|
||||
// scal1es
|
||||
|
||||
#define bli_cscal1es( a, yri, yir ) \
|
||||
{ \
|
||||
bli_cscalris( bli_creal(a), bli_cimag(a), bli_creal(yri), bli_cimag(yri) ); \
|
||||
bli_ccopyris( -bli_cimag(yri), bli_creal(yri), bli_creal(yir), bli_cimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_zscal1es( a, yri, yir ) \
|
||||
{ \
|
||||
bli_zscalris( bli_zreal(a), bli_zimag(a), bli_zreal(yri), bli_zimag(yri) ); \
|
||||
bli_zcopyris( -bli_zimag(yri), bli_zreal(yri), bli_zreal(yir), bli_zimag(yir) ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
65
frame/include/level0/1e/bli_scal21es.h
Normal file
65
frame/include/level0/1e/bli_scal21es.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL21ES_H
|
||||
#define BLIS_SCAL21ES_H
|
||||
|
||||
// scal21es
|
||||
|
||||
#define bli_cscal21es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_cscal2ris( bli_creal(a), bli_cimag(a), bli_creal(x), bli_cimag(x), bli_creal(yri), bli_cimag(yri) ); \
|
||||
bli_cscal2ris( bli_creal(a), bli_cimag(a), -bli_cimag(x), bli_creal(x), bli_creal(yir), bli_cimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_zscal21es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_zscal2ris( bli_zreal(a), bli_zimag(a), bli_zreal(x), bli_zimag(x), bli_zreal(yri), bli_zimag(yri) ); \
|
||||
bli_zscal2ris( bli_zreal(a), bli_zimag(a), -bli_zimag(x), bli_zreal(x), bli_zreal(yir), bli_zimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_scscal21es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_scscal2ris( bli_sreal(a), bli_simag(a), bli_creal(x), bli_cimag(x), bli_creal(yri), bli_cimag(yri) ); \
|
||||
bli_scscal2ris( bli_sreal(a), bli_simag(a), -bli_cimag(x), bli_creal(x), bli_creal(yir), bli_cimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_dzscal21es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_dzscal2ris( bli_dreal(a), bli_dimag(a), bli_zreal(x), bli_zimag(x), bli_zreal(yri), bli_zimag(yri) ); \
|
||||
bli_dzscal2ris( bli_dreal(a), bli_dimag(a), -bli_zimag(x), bli_zreal(x), bli_zreal(yir), bli_zimag(yir) ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
65
frame/include/level0/1e/bli_scal2j1es.h
Normal file
65
frame/include/level0/1e/bli_scal2j1es.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL2J1ES_H
|
||||
#define BLIS_SCAL2J1ES_H
|
||||
|
||||
// scal2j1es
|
||||
|
||||
#define bli_cscal2j1es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_cscal2ris( bli_creal(a), bli_cimag(a), bli_creal(x), -bli_cimag(x), bli_creal(yri), bli_cimag(yri) ); \
|
||||
bli_cscal2ris( bli_creal(a), bli_cimag(a), bli_cimag(x), bli_creal(x), bli_creal(yir), bli_cimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_zscal2j1es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_zscal2ris( bli_zreal(a), bli_zimag(a), bli_zreal(x), -bli_zimag(x), bli_zreal(yri), bli_zimag(yri) ); \
|
||||
bli_zscal2ris( bli_zreal(a), bli_zimag(a), bli_zimag(x), bli_zreal(x), bli_zreal(yir), bli_zimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_scscal2j1es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_scscal2ris( bli_sreal(a), bli_simag(a), bli_creal(x), -bli_cimag(x), bli_creal(yri), bli_cimag(yri) ); \
|
||||
bli_scscal2ris( bli_sreal(a), bli_simag(a), bli_cimag(x), bli_creal(x), bli_creal(yir), bli_cimag(yir) ); \
|
||||
}
|
||||
|
||||
#define bli_dzscal2j1es( a, x, yri, yir ) \
|
||||
{ \
|
||||
bli_dzscal2ris( bli_dreal(a), bli_dimag(a), bli_zreal(x), -bli_zimag(x), bli_zreal(yri), bli_zimag(yri) ); \
|
||||
bli_dzscal2ris( bli_dreal(a), bli_dimag(a), bli_zimag(x), bli_zreal(x), bli_zreal(yir), bli_zimag(yir) ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
126
frame/include/level0/1m/bli_invert1ms_mxn_diag.h
Normal file
126
frame/include/level0/1m/bli_invert1ms_mxn_diag.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_INVERT1MS_MXN_DIAG_H
|
||||
#define BLIS_INVERT1MS_MXN_DIAG_H
|
||||
|
||||
// invert1ms_mxn_diag
|
||||
|
||||
#define bli_cinvert1ms_mxn_diag( schema, offm, offn, m, n, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_off_ri = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y; \
|
||||
scomplex* restrict y_off_ir = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_cinvert1es( *(y_off_ri + i*rs_y + i*cs_y), \
|
||||
*(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_off_r = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2; \
|
||||
float* restrict y_off_i = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2 + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_cinvert1rs( *(y_off_r + i*rs_y2 + i*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zinvert1ms_mxn_diag( schema, offm, offn, m, n, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_off_ri = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y; \
|
||||
dcomplex* restrict y_off_ir = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_zinvert1es( *(y_off_ri + i*rs_y + i*cs_y), \
|
||||
*(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_off_r = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2; \
|
||||
double* restrict y_off_i = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2 + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_zinvert1rs( *(y_off_r + i*rs_y2 + i*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
124
frame/include/level0/1m/bli_scal1ms_mxn.h
Normal file
124
frame/include/level0/1m/bli_scal1ms_mxn.h
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL1MS_MXN_H
|
||||
#define BLIS_SCAL1MS_MXN_H
|
||||
|
||||
// scal1ms_mxn
|
||||
|
||||
#define bli_cscal1ms_mxn( schema, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_ri = y; \
|
||||
scomplex* restrict y_ir = y + ld_y/2; \
|
||||
\
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < m; ++i ) \
|
||||
{ \
|
||||
bli_cscal1es( *(a), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_r = y_cast; \
|
||||
float* restrict y_i = y_cast + ld_y; \
|
||||
\
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < m; ++i ) \
|
||||
{ \
|
||||
bli_cscal1rs( *(a), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zscal1ms_mxn( schema, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_ri = y; \
|
||||
dcomplex* restrict y_ir = y + ld_y/2; \
|
||||
\
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zscal1es( *(a), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop,
|
||||
which steps in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_r = y_cast; \
|
||||
double* restrict y_i = y_cast + ld_y; \
|
||||
\
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zscal1rs( *(a), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
126
frame/include/level0/1m/bli_scal21ms_mxn_diag.h
Normal file
126
frame/include/level0/1m/bli_scal21ms_mxn_diag.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL21MS_MXN_DIAG_H
|
||||
#define BLIS_SCAL21MS_MXN_DIAG_H
|
||||
|
||||
// scal21ms_mxn_diag
|
||||
|
||||
#define bli_cscscal21ms_mxn_diag( schema, m, n, a, x, rs_x, cs_x, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_off_ri = y; \
|
||||
scomplex* restrict y_off_ir = y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_scscal21es( *(x + i*rs_x + i*cs_x), \
|
||||
*(a), \
|
||||
*(y_off_ri + i*rs_y + i*cs_y), \
|
||||
*(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_off_r = y_cast; \
|
||||
float* restrict y_off_i = y_cast + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_scscal21rs( *(x + i*rs_x + i*cs_x), \
|
||||
*(a), \
|
||||
*(y_off_r + i*rs_y2 + i*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zdzscal21ms_mxn_diag( schema, m, n, a, x, rs_x, cs_x, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_off_ri = y; \
|
||||
dcomplex* restrict y_off_ir = y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_dzscal21es( *(x + i*rs_x + i*cs_x), \
|
||||
*(a), \
|
||||
*(y_off_ri + i*rs_y + i*cs_y), \
|
||||
*(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_off_r = y_cast; \
|
||||
double* restrict y_off_i = y_cast + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_dzscal21rs( *(x + i*rs_x + i*cs_x), \
|
||||
*(a), \
|
||||
*(y_off_r + i*rs_y2 + i*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
296
frame/include/level0/1m/bli_scal21ms_mxn_uplo.h
Normal file
296
frame/include/level0/1m/bli_scal21ms_mxn_uplo.h
Normal file
@@ -0,0 +1,296 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL21MS_MXN_UPLO_H
|
||||
#define BLIS_SCAL21MS_MXN_UPLO_H
|
||||
|
||||
// scal21ms_mxn_uplo
|
||||
|
||||
#define bli_cscal21ms_mxn_uplo( schema, uplo, conjx, m, a, x, rs_x, cs_x, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_ri = y; \
|
||||
scomplex* restrict y_ir = y + ld_y/2; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_cscal2j1es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_cscal21es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_cscal2j1es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_cscal21es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_r = y_cast; \
|
||||
float* restrict y_i = y_cast + ld_y; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_cscal2j1rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_cscal21rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_cscal2j1rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_cscal21rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zscal21ms_mxn_uplo( schema, uplo, conjx, m, a, x, rs_x, cs_x, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_ri = y; \
|
||||
dcomplex* restrict y_ir = y + ld_y/2; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zscal2j1es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zscal21es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_zscal2j1es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_zscal21es( *(a), \
|
||||
*(x + i*rs_x + j*cs_x), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_r = y_cast; \
|
||||
double* restrict y_i = y_cast + ld_y; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zscal2j1rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zscal21rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
if ( bli_is_conj( conjx ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_zscal2j1rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_noconj( conjx ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < m; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_zscal21rs( *(a), \
|
||||
*(x + i*rs_x + j*cs_x ), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
164
frame/include/level0/1m/bli_set1ms_mxn.h
Normal file
164
frame/include/level0/1m/bli_set1ms_mxn.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SET1MS_MXN_H
|
||||
#define BLIS_SET1MS_MXN_H
|
||||
|
||||
// set1ms_mxn
|
||||
|
||||
#define bli_cset1ms_mxn( schema, offm, offn, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
inc_t offm_local = offm; \
|
||||
inc_t offn_local = offn; \
|
||||
dim_t m_local = m; \
|
||||
dim_t n_local = n; \
|
||||
inc_t rs_y1 = rs_y; \
|
||||
inc_t cs_y1 = cs_y; \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Optimization: The loops walk through y with unit stride if y is
|
||||
column-stored. If y is row-stored, swap the dimensions and strides
|
||||
to preserve unit stride movement. */ \
|
||||
if ( cs_y == 1 ) \
|
||||
{ \
|
||||
bli_swap_incs( offm_local, offn_local ); \
|
||||
bli_swap_dims( m_local, n_local ); \
|
||||
bli_swap_incs( rs_y1, cs_y1 ); \
|
||||
bli_swap_incs( rs_y2, cs_y2 ); \
|
||||
} \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_off_ri = y + (offm_local )*rs_y1 \
|
||||
+ (offn_local )*cs_y1; \
|
||||
scomplex* restrict y_off_ir = y + (offm_local )*rs_y1 \
|
||||
+ (offn_local )*cs_y1 + ld_y/2; \
|
||||
\
|
||||
for ( j = 0; j < n_local; ++j ) \
|
||||
for ( i = 0; i < m_local; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1es( *(a), \
|
||||
*(y_off_ri + i*rs_y1 + j*cs_y1), \
|
||||
*(y_off_ir + i*rs_y1 + j*cs_y1) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_off_r = y_cast + (offm_local )*rs_y2 \
|
||||
+ (offn_local )*cs_y2; \
|
||||
float* restrict y_off_i = y_cast + (offm_local )*rs_y2 \
|
||||
+ (offn_local )*cs_y2 + ld_y; \
|
||||
\
|
||||
for ( j = 0; j < n_local; ++j ) \
|
||||
for ( i = 0; i < m_local; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1rs( *(a), \
|
||||
*(y_off_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zset1ms_mxn( schema, offm, offn, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
inc_t offm_local = offm; \
|
||||
inc_t offn_local = offn; \
|
||||
dim_t m_local = m; \
|
||||
dim_t n_local = n; \
|
||||
inc_t rs_y1 = rs_y; \
|
||||
inc_t cs_y1 = cs_y; \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Optimization: The loops walk through y with unit stride if y is
|
||||
column-stored. If y is row-stored, swap the dimensions and strides
|
||||
to preserve unit stride movement. */ \
|
||||
if ( cs_y == 1 ) \
|
||||
{ \
|
||||
bli_swap_incs( offm_local, offn_local ); \
|
||||
bli_swap_dims( m_local, n_local ); \
|
||||
bli_swap_incs( rs_y1, cs_y1 ); \
|
||||
bli_swap_incs( rs_y2, cs_y2 ); \
|
||||
} \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_off_ri = y + (offm_local )*rs_y1 \
|
||||
+ (offn_local )*cs_y1; \
|
||||
dcomplex* restrict y_off_ir = y + (offm_local )*rs_y1 \
|
||||
+ (offn_local )*cs_y1 + ld_y/2; \
|
||||
\
|
||||
for ( j = 0; j < n_local; ++j ) \
|
||||
for ( i = 0; i < m_local; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1es( *(a), \
|
||||
*(y_off_ri + i*rs_y1 + j*cs_y1), \
|
||||
*(y_off_ir + i*rs_y1 + j*cs_y1) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_off_r = y_cast + (offm_local )*rs_y2 \
|
||||
+ (offn_local )*cs_y2; \
|
||||
double* restrict y_off_i = y_cast + (offm_local )*rs_y2 \
|
||||
+ (offn_local )*cs_y2 + ld_y; \
|
||||
\
|
||||
for ( j = 0; j < n_local; ++j ) \
|
||||
for ( i = 0; i < m_local; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1rs( *(a), \
|
||||
*(y_off_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
130
frame/include/level0/1m/bli_set1ms_mxn_diag.h
Normal file
130
frame/include/level0/1m/bli_set1ms_mxn_diag.h
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SET1MS_MXN_DIAG_H
|
||||
#define BLIS_SET1MS_MXN_DIAG_H
|
||||
|
||||
// set1ms_mxn_diag
|
||||
|
||||
#define bli_cset1ms_mxn_diag( schema, offm, offn, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_off_ri = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y; \
|
||||
scomplex* restrict y_off_ir = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1es( *(a), \
|
||||
*(y_off_ri + i*rs_y + i*cs_y), \
|
||||
*(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_off_r = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2; \
|
||||
float* restrict y_off_i = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2 + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1rs( *(a), \
|
||||
*(y_off_r + i*rs_y2 + i*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zset1ms_mxn_diag( schema, offm, offn, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_off_ri = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y; \
|
||||
dcomplex* restrict y_off_ir = y + (offm )*rs_y \
|
||||
+ (offn )*cs_y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1es( *(a), \
|
||||
*(y_off_ri + i*rs_y + i*cs_y), \
|
||||
*(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_off_r = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2; \
|
||||
double* restrict y_off_i = y_cast + (offm )*rs_y2 \
|
||||
+ (offn )*cs_y2 + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1rs( *(a), \
|
||||
*(y_off_r + i*rs_y2 + i*cs_y2), \
|
||||
*(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
198
frame/include/level0/1m/bli_set1ms_mxn_uplo.h
Normal file
198
frame/include/level0/1m/bli_set1ms_mxn_uplo.h
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SET1MS_MXN_UPLO_H
|
||||
#define BLIS_SET1MS_MXN_UPLO_H
|
||||
|
||||
// set1ms_mxn_uplo
|
||||
|
||||
#define bli_cset1ms_mxn_uplo( schema, diagoff, uplo, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
doff_t diagoff_abs = bli_abs( diagoff ); \
|
||||
inc_t offdiag_inc; \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
/* Set the off-diagonal increment. */ \
|
||||
if ( diagoff > 0 ) offdiag_inc = cs_y; \
|
||||
else /* if ( diagoff < 0 ) */ offdiag_inc = rs_y; \
|
||||
\
|
||||
scomplex* restrict y0 = y + (diagoff_abs )*offdiag_inc; \
|
||||
scomplex* restrict y_ri = y0; \
|
||||
scomplex* restrict y_ir = y0 + ld_y/2; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1es( *(a), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1es( *(a), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
/* Set the off-diagonal increment. */ \
|
||||
if ( diagoff > 0 ) offdiag_inc = cs_y2; \
|
||||
else /* if ( diagoff < 0 ) */ offdiag_inc = rs_y2; \
|
||||
\
|
||||
float* restrict y0 = ( float* )y + (diagoff_abs )*offdiag_inc; \
|
||||
float* restrict y_r = y0; \
|
||||
float* restrict y_i = y0 + ld_y; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1rs( *(a), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_ccopy1rs( *(a), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zset1ms_mxn_uplo( schema, diagoff, uplo, m, n, a, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
doff_t diagoff_abs = bli_abs( diagoff ); \
|
||||
inc_t offdiag_inc; \
|
||||
dim_t i, j; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
/* Set the off-diagonal increment. */ \
|
||||
if ( diagoff > 0 ) offdiag_inc = cs_y; \
|
||||
else /* if ( diagoff < 0 ) */ offdiag_inc = rs_y; \
|
||||
\
|
||||
dcomplex* restrict y0 = y + (diagoff_abs )*offdiag_inc; \
|
||||
dcomplex* restrict y_ri = y0; \
|
||||
dcomplex* restrict y_ir = y0 + ld_y/2; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1es( *(a), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1es( *(a), \
|
||||
*(y_ri + i*rs_y + j*cs_y), \
|
||||
*(y_ir + i*rs_y + j*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
/* Set the off-diagonal increment. */ \
|
||||
if ( diagoff > 0 ) offdiag_inc = cs_y2; \
|
||||
else /* if ( diagoff < 0 ) */ offdiag_inc = rs_y2; \
|
||||
\
|
||||
double* restrict y0 = ( double* )y + (diagoff_abs )*offdiag_inc; \
|
||||
double* restrict y_r = y0; \
|
||||
double* restrict y_i = y0 + ld_y; \
|
||||
\
|
||||
if ( bli_is_lower( uplo ) ) \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = j; i < m; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1rs( *(a), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_upper( uplo ) ) */ \
|
||||
{ \
|
||||
for ( j = 0; j < n; ++j ) \
|
||||
for ( i = 0; i < j + 1; ++i ) \
|
||||
{ \
|
||||
bli_zcopy1rs( *(a), \
|
||||
*(y_r + i*rs_y2 + j*cs_y2), \
|
||||
*(y_i + i*rs_y2 + j*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
114
frame/include/level0/1m/bli_seti01ms_mxn_diag.h
Normal file
114
frame/include/level0/1m/bli_seti01ms_mxn_diag.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SETI01MS_MXN_DIAG_H
|
||||
#define BLIS_SETI01MS_MXN_DIAG_H
|
||||
|
||||
// seti01ms_mxn_diag
|
||||
|
||||
#define bli_cseti01ms_mxn_diag( schema, m, n, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
scomplex* restrict y_off_ri = y; \
|
||||
scomplex* restrict y_off_ir = y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_cseti0s( *(y_off_ri + i*rs_y + i*cs_y) ); \
|
||||
bli_csetr0s( *(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
float* restrict y_cast = ( float* )y; \
|
||||
float* restrict y_off_i = y_cast + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_sset0s( *(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define bli_zseti01ms_mxn_diag( schema, m, n, y, rs_y, cs_y, ld_y ) \
|
||||
{ \
|
||||
dim_t min_m_n = bli_min( m, n ); \
|
||||
dim_t i; \
|
||||
\
|
||||
/* Handle 1e and 1r separately. */ \
|
||||
if ( bli_is_1e_packed( schema ) ) \
|
||||
{ \
|
||||
dcomplex* restrict y_off_ri = y; \
|
||||
dcomplex* restrict y_off_ir = y + ld_y/2; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_zseti0s( *(y_off_ri + i*rs_y + i*cs_y) ); \
|
||||
bli_zsetr0s( *(y_off_ir + i*rs_y + i*cs_y) ); \
|
||||
} \
|
||||
} \
|
||||
else /* if ( bli_is_1r_packed( schema ) ) */ \
|
||||
{ \
|
||||
inc_t rs_y2 = rs_y; \
|
||||
inc_t cs_y2 = cs_y; \
|
||||
\
|
||||
/* Scale the non-unit stride by two for the 1r loop, which steps
|
||||
in units of real (not complex) values. */ \
|
||||
if ( rs_y2 == 1 ) { cs_y2 *= 2; } \
|
||||
else /* if ( cs_y2 == 1 ) */ { rs_y2 *= 2; } \
|
||||
\
|
||||
double* restrict y_cast = ( double* )y; \
|
||||
double* restrict y_off_i = y_cast + ld_y; \
|
||||
\
|
||||
for ( i = 0; i < min_m_n; ++i ) \
|
||||
{ \
|
||||
bli_dset0s( *(y_off_i + i*rs_y2 + i*cs_y2) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
51
frame/include/level0/1r/bli_copy1rs.h
Normal file
51
frame/include/level0/1r/bli_copy1rs.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_COPY1RS_H
|
||||
#define BLIS_COPY1RS_H
|
||||
|
||||
// copy1rs
|
||||
|
||||
#define bli_ccopy1rs( a, br, bi ) \
|
||||
{ \
|
||||
bli_ccopyris( bli_creal(a), bli_cimag(a), br, bi ); \
|
||||
}
|
||||
|
||||
#define bli_zcopy1rs( a, br, bi ) \
|
||||
{ \
|
||||
bli_zcopyris( bli_zreal(a), bli_zimag(a), br, bi ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
51
frame/include/level0/1r/bli_copyj1rs.h
Normal file
51
frame/include/level0/1r/bli_copyj1rs.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_COPYJ1RS_H
|
||||
#define BLIS_COPYJ1RS_H
|
||||
|
||||
// copyj1rs
|
||||
|
||||
#define bli_ccopyj1rs( a, br, bi ) \
|
||||
{ \
|
||||
bli_ccopyjris( bli_creal(a), bli_cimag(a), br, bi ); \
|
||||
}
|
||||
|
||||
#define bli_zcopyj1rs( a, br, bi ) \
|
||||
{ \
|
||||
bli_zcopyjris( bli_zreal(a), bli_zimag(a), br, bi ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
43
frame/include/level0/1r/bli_invert1rs.h
Normal file
43
frame/include/level0/1r/bli_invert1rs.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_INVERT1RS_H
|
||||
#define BLIS_INVERT1RS_H
|
||||
|
||||
// invert1rs
|
||||
|
||||
#define bli_cinvert1rs( xr, xi ) bli_cinvertris( xr, xi )
|
||||
#define bli_zinvert1rs( xr, xi ) bli_zinvertris( xr, xi )
|
||||
|
||||
#endif
|
||||
61
frame/include/level0/1r/bli_scal1rs.h
Normal file
61
frame/include/level0/1r/bli_scal1rs.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL1RS_H
|
||||
#define BLIS_SCAL1RS_H
|
||||
|
||||
// scal1rs
|
||||
|
||||
#define bli_cscal1rs( a, yr, yi ) \
|
||||
{ \
|
||||
bli_cscalris( bli_creal(a), bli_cimag(a), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_zscal1rs( a, yr, yi ) \
|
||||
{ \
|
||||
bli_zscalris( bli_zreal(a), bli_zimag(a), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_scscal1rs( a, yr, yi ) \
|
||||
{ \
|
||||
bli_scscalris( bli_sreal(a), bli_simag(a), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_dzscal1rs( a, yr, yi ) \
|
||||
{ \
|
||||
bli_dzscalris( bli_dreal(a), bli_dimag(a), yr, yi ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
61
frame/include/level0/1r/bli_scal21rs.h
Normal file
61
frame/include/level0/1r/bli_scal21rs.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL21RS_H
|
||||
#define BLIS_SCAL21RS_H
|
||||
|
||||
// scal21rs
|
||||
|
||||
#define bli_cscal21rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_cscal2ris( bli_creal(a), bli_cimag(a), bli_creal(x), bli_cimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_zscal21rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_zscal2ris( bli_zreal(a), bli_zimag(a), bli_zreal(x), bli_zimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_scscal21rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_scscal2ris( bli_sreal(a), bli_simag(a), bli_creal(x), bli_cimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_dzscal21rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_dzscal2ris( bli_dreal(a), bli_dimag(a), bli_zreal(x), bli_zimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
61
frame/include/level0/1r/bli_scal2j1rs.h
Normal file
61
frame/include/level0/1r/bli_scal2j1rs.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas at Austin nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BLIS_SCAL2J1RS_H
|
||||
#define BLIS_SCAL2J1RS_H
|
||||
|
||||
// scal2j1rs
|
||||
|
||||
#define bli_cscal2j1rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_cscal2jris( bli_creal(a), bli_cimag(a), bli_creal(x), bli_cimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_zscal2j1rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_zscal2jris( bli_zreal(a), bli_zimag(a), bli_zreal(x), bli_zimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_scscal2j1rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_scscal2jris( bli_sreal(a), bli_simag(a), bli_creal(x), bli_cimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#define bli_dzscal2j1rs( a, x, yr, yi ) \
|
||||
{ \
|
||||
bli_dzscal2jris( bli_dreal(a), bli_dimag(a), bli_zreal(x), bli_zimag(x), yr, yi ); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user