Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  Copyright (c) 2011, Intel Corporation. All rights reserved.
0003 
0004  Redistribution and use in source and binary forms, with or without modification,
0005  are permitted provided that the following conditions are met:
0006 
0007  * Redistributions of source code must retain the above copyright notice, this
0008    list of conditions and the following disclaimer.
0009  * Redistributions in binary form must reproduce the above copyright notice,
0010    this list of conditions and the following disclaimer in the documentation
0011    and/or other materials provided with the distribution.
0012  * Neither the name of Intel Corporation nor the names of its contributors may
0013    be used to endorse or promote products derived from this software without
0014    specific prior written permission.
0015 
0016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
0017  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0018  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0019  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
0020  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
0021  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
0022  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
0023  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0024  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0025  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0026 
0027  ********************************************************************************
0028  *   Content : Eigen bindings to LAPACKe
0029  *    Householder QR decomposition of a matrix w/o pivoting based on
0030  *    LAPACKE_?geqrf function.
0031  ********************************************************************************
0032 */
0033 
0034 #ifndef EIGEN_QR_LAPACKE_H
0035 #define EIGEN_QR_LAPACKE_H
0036 
0037 namespace Eigen { 
0038 
0039 namespace internal {
0040 
0041 /** \internal Specialization for the data types supported by LAPACKe */
0042 
0043 #define EIGEN_LAPACKE_QR_NOPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \
0044 template<typename MatrixQR, typename HCoeffs> \
0045 struct householder_qr_inplace_blocked<MatrixQR, HCoeffs, EIGTYPE, true> \
0046 { \
0047   static void run(MatrixQR& mat, HCoeffs& hCoeffs, Index = 32, \
0048       typename MatrixQR::Scalar* = 0) \
0049   { \
0050     lapack_int m = (lapack_int) mat.rows(); \
0051     lapack_int n = (lapack_int) mat.cols(); \
0052     lapack_int lda = (lapack_int) mat.outerStride(); \
0053     lapack_int matrix_order = (MatrixQR::IsRowMajor) ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \
0054     LAPACKE_##LAPACKE_PREFIX##geqrf( matrix_order, m, n, (LAPACKE_TYPE*)mat.data(), lda, (LAPACKE_TYPE*)hCoeffs.data()); \
0055     hCoeffs.adjointInPlace(); \
0056   } \
0057 };
0058 
0059 EIGEN_LAPACKE_QR_NOPIV(double, double, d)
0060 EIGEN_LAPACKE_QR_NOPIV(float, float, s)
0061 EIGEN_LAPACKE_QR_NOPIV(dcomplex, lapack_complex_double, z)
0062 EIGEN_LAPACKE_QR_NOPIV(scomplex, lapack_complex_float, c)
0063 
0064 } // end namespace internal
0065 
0066 } // end namespace Eigen
0067 
0068 #endif // EIGEN_QR_LAPACKE_H