File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,35 @@ k = 1
315
315
end
316
316
end
317
317
318
+ @testset " geev!" begin
319
+ A = rand (elty,m,m)
320
+ d_A = CuArray (A)
321
+ local d_W, d_V
322
+ d_W, d_V = CUSOLVER. Xgeev! (' N' ,' V' , d_A)
323
+ d_W_b, d_V_b = LAPACK. geev! (' N' ,' V' , CuArray (A))
324
+ @test d_W ≈ d_W_b
325
+ @test d_V ≈ d_V_b
326
+ h_W = collect (d_W)
327
+ h_V = collect (d_V)
328
+ h_V⁻¹ = inv (h_V)
329
+ Eig = eigen (A)
330
+ @test Eig. values ≈ h_W
331
+ @test abs .(Eig. vectors* h_V⁻¹) ≈ I
332
+ d_A = CuArray (A)
333
+ d_W = CUSOLVER. Xgeev! (' N' ,' N' , d_A)
334
+ h_W = collect (d_W)
335
+ @test Eig. values ≈ h_W
336
+
337
+ A = rand (elty,m,m)
338
+ d_A = CuArray (A)
339
+ Eig = eigen (A)
340
+ d_eig = eigen (d_A)
341
+ @test Eig. values ≈ collect (d_eig. values)
342
+ h_V = collect (d_eig. vectors)
343
+ h_V⁻¹ = inv (h_V)
344
+ @test abs .(Eig. vectors* h_V⁻¹) ≈ I
345
+ end
346
+
318
347
@testset " syevd!" begin
319
348
A = rand (elty,m,m)
320
349
A += A'
You can’t perform that action at this time.
0 commit comments