// // Copyright (c) 2003--2008 // Toon Knapen, Karl Meerbergen, Kresimir Fresl, // Thomas Klimpel and Rutger ter Borg // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // THIS FILE IS AUTOMATICALLY GENERATED // PLEASE DO NOT EDIT! // #ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEEVX_HPP #define BOOST_NUMERIC_BINDINGS_LAPACK_HEEVX_HPP #include #include namespace boost { namespace numeric { namespace bindings { namespace lapack { $DESCRIPTION template< typename ValueType, typename Enable = void > struct heevx_impl{}; // complex specialization template< typename ValueType > struct heevx_impl< ValueType, boost::enable_if< is_complex::type > { typedef typename ValueType value_type; typedef typename traits::type_traits::real_type real_type; // overloaded member functions to call lapack static void operator()( char const jobz, char const range, char const uplo, int const n, traits::complex_f* a, int const lda, float const vl, float const vu, int const il, int const iu, float const abstol, int& m, float* w, traits::complex_f* z, int const ldz, traits::complex_f* work, int const lwork, float* rwork, int* iwork, int* ifail, int& info ) { LAPACK_CHEEVX( &jobz, &range, &uplo, &n, traits::complex_ptr(a), &lda, &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z), &ldz, traits::complex_ptr(work), &lwork, rwork, iwork, ifail, &info ); } static void operator()( char const jobz, char const range, char const uplo, int const n, traits::complex_d* a, int const lda, double const vl, double const vu, int const il, int const iu, double const abstol, int& m, double* w, traits::complex_d* z, int const ldz, traits::complex_d* work, int const lwork, double* rwork, int* iwork, int* ifail, int& info ) { LAPACK_ZHEEVX( &jobz, &range, &uplo, &n, traits::complex_ptr(a), &lda, &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z), &ldz, traits::complex_ptr(work), &lwork, rwork, iwork, ifail, &info ); } static std::size_t min_size_work( $ARGUMENTS ) { $FORMULAE } static std::size_t min_size_rwork( $ARGUMENTS ) { $FORMULAE } static std::size_t min_size_iwork( $ARGUMENTS ) { $FORMULAE } // user-defined workspace specialization template< typename MatrixA, typename VectorW, typename MatrixZ, typename VectorIFAIL, typename WORK, typename RWORK, typename IWORK > static void operator()( char const jobz, char const range, MatrixA& a, real_type const vl, real_type const vu, int const il, int const iu, real_type const abstol, int& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail, int& info, workspace3< WORK, RWORK, IWORK >& work ) { assert( jobz == 'N' || jobz == 'V' ); assert( range == 'A' || range == 'V' || range == 'I' ); assert( traits::matrix_uplo_tag(a) == 'U' || traits::matrix_uplo_tag(a) == 'L' ); assert( traits::matrix_size2(a) >= 0 ); assert( traits::leading_dimension(a) >= std::max(1, traits::matrix_size2(a)) ); operator()( jobz, range, traits::matrix_uplo_tag(a), traits::matrix_size2(a), traits::matrix_storage(a), traits::leading_dimension(a), vl, vu, il, iu, abstol, m, traits::vector_storage(w), traits::matrix_storage(z), traits::leading_dimension(z), traits::vector_storage(work), traits::vector_size(work), traits::vector_storage(rwork), traits::vector_storage(iwork), traits::vector_storage(ifail), info ); } // minimal workspace specialization template< typename MatrixA, typename VectorW, typename MatrixZ, typename VectorIFAIL > static void operator()( char const jobz, char const range, MatrixA& a, real_type const vl, real_type const vu, int const il, int const iu, real_type const abstol, int& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail, int& info, minimal_workspace& work ) { traits::detail::array< value_type > tmp_work( min_size_work( ... ) ) ); traits::detail::array< real_type > tmp_rwork( min_size_rwork( ... ) ) ); traits::detail::array< int > tmp_iwork( min_size_iwork( ... ) ) ); operator()( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, ifail, info, workspace( tmp_work, tmp_rwork, tmp_iwork ) ); } // optimal workspace specialization template< typename MatrixA, typename VectorW, typename MatrixZ, typename VectorIFAIL > static void operator()( char const jobz, char const range, MatrixA& a, real_type const vl, real_type const vu, int const il, int const iu, real_type const abstol, int& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail, int& info, optimal_workspace &work ) { $SETUP_TMPSIZES operator()( $WORKSPACE_QUERY ) traits::detail::array< value_type > tmp_work( $TMP_SIZE ); traits::detail::array< real_type > tmp_rwork( $TMP_SIZE ); traits::detail::array< int > tmp_iwork( $TMP_SIZE ); operator()( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, ifail, info, workspace( tmp_work, tmp_rwork, tmp_iwork ) ); } }; }}}} // namespace boost::numeric::bindings::lapack #endif