Skip to content

Commit 30ad173

Browse files
committed
Add sort option for heevj
1 parent 4190b66 commit 30ad173

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ext/MatrixAlgebraKitAMDGPUExt/yarocsolver.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ for (heevd, heev, heevx, heevj, elty, relty) in
586586
V::StridedROCMatrix{$elty};
587587
uplo::Char='U',
588588
tol::$relty=eps($relty),
589-
max_sweeps::Int=100)
589+
max_sweeps::Int=100,
590+
sort::Char='N')
590591
chkuplo(uplo)
591592
n = checksquare(A)
592593
lda = max(1, stride(A, 2))
@@ -602,7 +603,8 @@ for (heevd, heev, heevx, heevj, elty, relty) in
602603
residual = ROCVector{$relty}(undef, 1)
603604
n_sweeps = ROCVector{Cint}(undef, 1)
604605
roc_uplo = convert(rocSOLVER.rocblas_fill, uplo)
605-
$heevj(dh, jobz, roc_uplo, n, A, lda, tol, residual, max_sweeps, n_sweeps, W, dev_info)
606+
roc_sort = sort == 'N' ? rocSOLVER.rocblas_esort_none : rocSOLVER.rocblas_esort_ascending
607+
$heevj(dh, sort, jobz, roc_uplo, n, A, lda, tol, residual, max_sweeps, n_sweeps, W, dev_info)
606608

607609
info = @allowscalar dev_info[1]
608610
chkargsok(BlasInt(info))

0 commit comments

Comments
 (0)