@@ -505,13 +505,13 @@ function Xgeev!(jobvl::Char, jobvr::Char, A::StridedCuMatrix{T}) where {T <: Bla
505505end
506506
507507# XsyevBatched
508- function XsyevBatched! (jobz:: Char , uplo:: Char , A:: StridedCuArray{T,3} ) where {T <: BlasFloat }
508+ function XsyevBatched! (jobz:: Char , uplo:: Char , A:: StridedCuArray{T, 3} ) where {T <: BlasFloat }
509509 CUSOLVER. version () < v " 11.7.1" && throw (ErrorException (" This operation is not supported by the current CUDA version." ))
510510 chkuplo (uplo)
511511 n = checksquare (A)
512- batch_size = size (A,3 )
512+ batch_size = size (A, 3 )
513513 R = real (T)
514- lda = max (1 , stride (A,2 ))
514+ lda = max (1 , stride (A, 2 ))
515515 W = CuMatrix {R} (undef, n, batch_size)
516516 params = CuSolverParameters ()
517517 dh = dense_handle ()
@@ -520,18 +520,22 @@ function XsyevBatched!(jobz::Char, uplo::Char, A::StridedCuArray{T,3}) where {T
520520 function bufferSize ()
521521 out_cpu = Ref {Csize_t} (0 )
522522 out_gpu = Ref {Csize_t} (0 )
523- cusolverDnXsyevBatched_bufferSize (dh, params, jobz, uplo, n,
524- T, A, lda, R, W, T, out_gpu, out_cpu, batch_size)
525- out_gpu[], out_cpu[]
523+ cusolverDnXsyevBatched_bufferSize (
524+ dh, params, jobz, uplo, n,
525+ T, A, lda, R, W, T, out_gpu, out_cpu, batch_size
526+ )
527+ return out_gpu[], out_cpu[]
526528 end
527529 with_workspaces (dh. workspace_gpu, dh. workspace_cpu, bufferSize ()... ) do buffer_gpu, buffer_cpu
528- cusolverDnXsyevBatched (dh, params, jobz, uplo, n, T, A,
529- lda, R, W, T, buffer_gpu, sizeof (buffer_gpu),
530- buffer_cpu, sizeof (buffer_cpu), dh. info, batch_size)
530+ cusolverDnXsyevBatched (
531+ dh, params, jobz, uplo, n, T, A,
532+ lda, R, W, T, buffer_gpu, sizeof (buffer_gpu),
533+ buffer_cpu, sizeof (buffer_cpu), dh. info, batch_size
534+ )
531535 end
532536
533537 info = @allowscalar collect (dh. info)
534- for i = 1 : batch_size
538+ for i in 1 : batch_size
535539 chkargsok (info[i] |> BlasInt)
536540 end
537541
0 commit comments