-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into public
Conflicts: flens/lapack/Makefile
- Loading branch information
Showing
31 changed files
with
1,302 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include <iostream> | ||
#include <flens/flens.cxx> | ||
|
||
using namespace flens; | ||
using namespace std; | ||
|
||
int | ||
main() | ||
{ | ||
typedef complex<double> ZComplex; | ||
typedef GeMatrix<FullStorage<ZComplex> > ZGeMatrix; | ||
|
||
ZComplex I(0,1); | ||
|
||
ZGeMatrix A(2,3); | ||
|
||
A = 2.*I, 3.+I, 1., | ||
4., 2.+2.*I, 4.; | ||
|
||
cout << "A = " << A << endl; | ||
|
||
// in-place conjugate (via overloaded operators) | ||
A = conjugate(A); | ||
cout << "A = " << A << endl; | ||
|
||
// in-place conjugate (via explicit copy call) | ||
blas::copy(Conj, A, A); | ||
cout << "A = " << A << endl; | ||
|
||
// in-place conjugate (via explicit call) (new) | ||
blas::conj(A); | ||
cout << "A = " << A << endl; | ||
|
||
// elementwise variant | ||
ZGeMatrix::IndexVariable k, l; | ||
|
||
A(k,l) = Real(A(k,l)) - Imag(A(k,l)) * I; | ||
cout << "A = " << A << endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.