Skip to content

Commit

Permalink
Wrap generalized Hermitian eigenvalue routine
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed Feb 26, 2018
1 parent c24b490 commit fc534b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ eltype{T}(A::ElementalMatrix{T}) = T
@enum UpperOrLower LOWER UPPER
@enum LeftOrRight LEFT RIGHT
@enum UnitOrNonUnit NON_UNIT UNIT
@enum Pencil AXBX=1 ABX=2 BAX=3

# Get MPIWorldComm
function CommWorldValue()
Expand Down
8 changes: 8 additions & 0 deletions src/lapack_like/spectral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ for (elty, ext) in ((:Float32, :s),
return w
end

function eigvalsHermitian(pencil::Pencil, uplo::UpperOrLower, A::$mat{$elty}, B::$mat{$elty}, sort::SortType = ASCENDING)
w = $mat(real($elty))
ElError(ccall(($(string("ElHermitianGenDefEig", mattype, "_", ext)), libEl), Cuint,
(Pencil, UpperOrLower, Ptr{Void}, Ptr{Void}, Ptr{Void}, SortType),
pencil, uplo, A.obj, B.obj, w.obj, sort))
return w
end

function eigHermitian(uplo::UpperOrLower, A::$mat{$elty}, sort::SortType = ASCENDING)
w = $mat(real($elty))
Z = $mat($elty)
Expand Down

0 comments on commit fc534b9

Please sign in to comment.