Skip to content

Commit

Permalink
- By default the LAPACK test suit triggered by 'make check' did not t…
Browse files Browse the repository at this point in the history
…est non-symmetric eigenvalue problems.

- In debug mode there was in some cases an assertion failure for real valued, non-symmetric eigenvalue problems.
- The LAPACK test suit now tests larger eigenvalue problems
  • Loading branch information
michael-lehn committed Apr 18, 2014
1 parent 29cd5d0 commit 67eb201
Show file tree
Hide file tree
Showing 30 changed files with 1,237 additions and 14 deletions.
3 changes: 0 additions & 3 deletions flens/blas/level1extensions/conj.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ conj(MA &&A)
FLENS_BLASLOG_BEGIN_MCOTR(Conj, A);

# ifdef HAVE_CXXBLAS_GECOTR
typedef typename RemoveRef<MA>::Type MatrixA;
typedef typename MatrixA::IndexType IndexType;

cxxblas::gecotr(A.order(), Conj,
A.numRows(), A.numCols(),
A.data(), A.leadingDimension());
Expand Down
2 changes: 2 additions & 0 deletions flens/lapack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ test/ :
check : test/
$(MAKE) -C test/MATGEN
$(MAKE) -C test cleanup
$(MAKE) -C test ded.out
$(MAKE) -C test zed.out
$(MAKE) -C test dtest.out
$(MAKE) -C test ztest.out
$(MAKE) -C test dnep.out
Expand Down
4 changes: 3 additions & 1 deletion flens/lapack/ge/hrd.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ hrd_impl(IndexType iLo,
// left
//
GeView Work(n-i-ib+1, ib, work, ldWork);
larfb(Left, ConjTrans, Forward, ColumnWise,
larfb(Left,
IsComplex<T>::value ? ConjTrans : Trans,
Forward, ColumnWise,
A(_(i+1,iHi),_(i,i+ib-1)),
Tr,
A(_(i+1,iHi),_(i+ib,n)),
Expand Down
2 changes: 0 additions & 2 deletions flens/lapack/interface/src/gees.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ LAPACK_DECL(dgees)(const char *JOBVS,
LOGICAL *BWORK,
INTEGER *INFO)
{
std::cerr << "dgees: N = " << *N << std::endl;

using std::max;
using std::min;
//
Expand Down
2 changes: 0 additions & 2 deletions flens/lapack/interface/src/geesx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ LAPACK_DECL(dgeesx)(const char *JOBVS,
LOGICAL *BWORK,
INTEGER *INFO)
{
std::cerr << "dgeesx: N = " << *N << std::endl;

using std::max;
using std::min;
//
Expand Down
4 changes: 0 additions & 4 deletions flens/lapack/interface/src/geev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ LAPACK_DECL(dgeev)(const char *JOBVL,
const INTEGER *LWORK,
INTEGER *INFO)
{
std::cerr << "dgeev: N = " << *N << std::endl;

using std::max;
using std::min;
//
Expand Down Expand Up @@ -101,8 +99,6 @@ LAPACK_DECL(zgeev)(const char *JOBVL,
DOUBLE *RWORK,
INTEGER *INFO)
{
std::cerr << "zgeev: N = " << *N << std::endl;

using std::max;
using std::min;
//
Expand Down
2 changes: 0 additions & 2 deletions flens/lapack/interface/src/geevx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ LAPACK_DECL(dgeevx)(const char *BALANC,
INTEGER *IWORK,
INTEGER *INFO)
{
std::cerr << "dgeevx: N = " << *N << std::endl;

using std::max;
using std::min;
//
Expand Down
Binary file modified flens/lapack/test.tgz
Binary file not shown.
57 changes: 57 additions & 0 deletions flens/scalaroperations/acos.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2014, Michael Lehn
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2) 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.
* 3) Neither the name of the FLENS development group 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
* OWNER 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 FLENS_SCALAROPERATIONS_ACOS_H
#define FLENS_SCALAROPERATIONS_ACOS_H 1

#include <cxxblas/auxiliary/complex.h>
#include <flens/auxiliary/auxiliary.h>
#include <flens/scalartypes/impl/scalarclosure.h>

namespace flens {

struct ScalarOpACos {};

template <typename S>
const typename ScalarClosure<ScalarOpACos, S, S>::ElementType
evalScalarClosure(const ScalarClosure<ScalarOpACos, S, S> &exp);

//-- operator overloading
template <typename S>
const ScalarClosure<ScalarOpACos,
typename S::Impl,
typename S::Impl>
ACos(const Scalar<S> &s);

} // namespace flens

#endif // FLENS_SCALAROPERATIONS_ACOS_H
64 changes: 64 additions & 0 deletions flens/scalaroperations/acos.tcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright (c) 2014, Michael Lehn
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2) 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.
* 3) Neither the name of the FLENS development group 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
* OWNER 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 FLENS_SCALAROPERATIONS_ACOS_TCC
#define FLENS_SCALAROPERATIONS_ACOS_TCC 1

#include <cmath>
#include <cxxblas/auxiliary/complex.h>
#include <flens/auxiliary/auxiliary.h>
#include <flens/scalaroperations/acos.h>
#include <flens/scalartypes/impl/scalarclosure.h>

namespace flens {

template <typename S>
const typename ScalarClosure<ScalarOpACos, S, S>::ElementType
evalScalarClosure(const ScalarClosure<ScalarOpACos, S, S> &exp)
{
return acos(exp.left().value());
}

//-- operator overloading
template <typename S>
const ScalarClosure<ScalarOpACos,
typename S::Impl,
typename S::Impl>
ACos(const Scalar<S> &s)
{
typedef ScalarClosure<ScalarOpACos, typename S::Impl, typename S::Impl> SC;
return SC(s.impl(), s.impl());
}

} // namespace flens

#endif // FLENS_SCALAROPERATIONS_ACOS_TCC
57 changes: 57 additions & 0 deletions flens/scalaroperations/asin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2014, Michael Lehn
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2) 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.
* 3) Neither the name of the FLENS development group 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
* OWNER 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 FLENS_SCALAROPERATIONS_ASIN_H
#define FLENS_SCALAROPERATIONS_ASIN_H 1

#include <cxxblas/auxiliary/complex.h>
#include <flens/auxiliary/auxiliary.h>
#include <flens/scalartypes/impl/scalarclosure.h>

namespace flens {

struct ScalarOpASin {};

template <typename S>
const typename ScalarClosure<ScalarOpASin, S, S>::ElementType
evalScalarClosure(const ScalarClosure<ScalarOpASin, S, S> &exp);

//-- operator overloading
template <typename S>
const ScalarClosure<ScalarOpASin,
typename S::Impl,
typename S::Impl>
ASin(const Scalar<S> &s);

} // namespace flens

#endif // FLENS_SCALAROPERATIONS_ASIN_H
64 changes: 64 additions & 0 deletions flens/scalaroperations/asin.tcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright (c) 2014, Michael Lehn
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2) 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.
* 3) Neither the name of the FLENS development group 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
* OWNER 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 FLENS_SCALAROPERATIONS_ASIN_TCC
#define FLENS_SCALAROPERATIONS_ASIN_TCC 1

#include <cmath>
#include <cxxblas/auxiliary/complex.h>
#include <flens/auxiliary/auxiliary.h>
#include <flens/scalaroperations/asin.h>
#include <flens/scalartypes/impl/scalarclosure.h>

namespace flens {

template <typename S>
const typename ScalarClosure<ScalarOpASin, S, S>::ElementType
evalScalarClosure(const ScalarClosure<ScalarOpASin, S, S> &exp)
{
return asin(exp.left().value());
}

//-- operator overloading
template <typename S>
const ScalarClosure<ScalarOpASin,
typename S::Impl,
typename S::Impl>
ASin(const Scalar<S> &s)
{
typedef ScalarClosure<ScalarOpASin, typename S::Impl, typename S::Impl> SC;
return SC(s.impl(), s.impl());
}

} // namespace flens

#endif // FLENS_SCALAROPERATIONS_ASIN_TCC
57 changes: 57 additions & 0 deletions flens/scalaroperations/atan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2014, Michael Lehn
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2) 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.
* 3) Neither the name of the FLENS development group 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
* OWNER 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 FLENS_SCALAROPERATIONS_ATAN_H
#define FLENS_SCALAROPERATIONS_ATAN_H 1

#include <cxxblas/auxiliary/complex.h>
#include <flens/auxiliary/auxiliary.h>
#include <flens/scalartypes/impl/scalarclosure.h>

namespace flens {

struct ScalarOpATan {};

template <typename S>
const typename ScalarClosure<ScalarOpATan, S, S>::ElementType
evalScalarClosure(const ScalarClosure<ScalarOpATan, S, S> &exp);

//-- operator overloading
template <typename S>
const ScalarClosure<ScalarOpATan,
typename S::Impl,
typename S::Impl>
ATan(const Scalar<S> &s);

} // namespace flens

#endif // FLENS_SCALAROPERATIONS_ATAN_H
Loading

0 comments on commit 67eb201

Please sign in to comment.