// // 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_GELS_HPP #define BOOST_NUMERIC_BINDINGS_LAPACK_GELS_HPP #include #include namespace boost { namespace numeric { namespace bindings { namespace lapack { $DESCRIPTION template< typename ValueType, typename Enable = void > struct gels_impl{}; // real specialization template< typename ValueType > struct gels_impl< ValueType, boost::enable_if< is_real::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 trans, int const m, int const n, int const nrhs, float* a, int const lda, float* b, int const ldb, float* work, int const lwork, int& info ) { LAPACK_SGELS( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, &info ); } static void operator()( char const trans, int const m, int const n, int const nrhs, double* a, int const lda, double* b, int const ldb, double* work, int const lwork, int& info ) { LAPACK_DGELS( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, &info ); } // user-defined workspace specialization template< typename MatrixA, typename MatrixB, typename WORK > static void operator()( char const trans, MatrixA& a, MatrixB& b, int& info, workspace1< WORK >& work ) { assert( trans == 'N' || trans == 'T' ); assert( traits::matrix_size1(a) >= 0 ); assert( traits::matrix_size2(a) >= 0 ); assert( traits::leading_dimension(a) >= std::max(1, traits::matrix_size1(a)) ); operator()( trans, traits::matrix_size1(a), traits::matrix_size2(a), traits::matrix_size2(b), traits::matrix_storage(a), traits::leading_dimension(a), traits::matrix_storage(b), traits::leading_dimension(b), traits::vector_storage(work), traits::vector_size(work), info ); } // minimal workspace specialization template< typename MatrixA, typename MatrixB > static void operator()( char const trans, MatrixA& a, MatrixB& b, int& info, minimal_workspace& work ) { } // optimal workspace specialization template< typename MatrixA, typename MatrixB > static void operator()( char const trans, MatrixA& a, MatrixB& b, int& info, optimal_workspace &work ) { } }; // complex specialization template< typename ValueType > struct gels_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 trans, int const m, int const n, int const nrhs, traits::complex_f* a, int const lda, traits::complex_f* b, int const ldb, traits::complex_f* work, int const lwork, int& info ) { LAPACK_CGELS( &trans, &m, &n, &nrhs, traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(work), &lwork, &info ); } static void operator()( char const trans, int const m, int const n, int const nrhs, traits::complex_d* a, int const lda, traits::complex_d* b, int const ldb, traits::complex_d* work, int const lwork, int& info ) { LAPACK_ZGELS( &trans, &m, &n, &nrhs, traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(work), &lwork, &info ); } // user-defined workspace specialization template< typename MatrixA, typename MatrixB, typename WORK > static void operator()( char const trans, MatrixA& a, MatrixB& b, int& info, workspace1< WORK >& work ) { assert( trans == 'N' || trans == 'C' ); assert( traits::matrix_size1(a) >= 0 ); assert( traits::matrix_size2(a) >= 0 ); assert( traits::matrix_size2(b) >= 0 ); assert( traits::leading_dimension(a) >= std::max(1, traits::matrix_size1(a)) ); operator()( trans, traits::matrix_size1(a), traits::matrix_size2(a), traits::matrix_size2(b), traits::matrix_storage(a), traits::leading_dimension(a), traits::matrix_storage(b), traits::leading_dimension(b), traits::vector_storage(work), traits::vector_size(work), info ); } // minimal workspace specialization template< typename MatrixA, typename MatrixB > static void operator()( char const trans, MatrixA& a, MatrixB& b, int& info, minimal_workspace& work ) { } // optimal workspace specialization template< typename MatrixA, typename MatrixB > static void operator()( char const trans, MatrixA& a, MatrixB& b, int& info, optimal_workspace &work ) { } }; }}}} // namespace boost::numeric::bindings::lapack #endif