Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- julia> function check_symv(n, Uplo = 'U')
- A = randn(n, 2n) |> X -> X * X';
- x = rand(n);
- gemv = A * x
- symv = Base.LinAlg.BLAS.symv(Uplo, A, x)
- correct = gemv .≈ symv
- correct_count = sum(correct)
- eight = min(8,n)
- correct_in_first_8 = sum(@view(correct[1:eight]))
- n, correct_count, n - correct_count, correct_in_first_8, eight - correct_in_first_8
- end
- check_symv (generic function with 2 methods)
- julia> check_symv.(1:20, 'L')
- 20-element Array{NTuple{5,Int64},1}:
- (1, 1, 0, 1, 0)
- (2, 2, 0, 2, 0)
- (3, 3, 0, 3, 0)
- (4, 4, 0, 4, 0)
- (5, 5, 0, 5, 0)
- (6, 6, 0, 6, 0)
- (7, 7, 0, 7, 0)
- (8, 8, 0, 8, 0)
- (9, 9, 0, 8, 0)
- (10, 10, 0, 8, 0)
- (11, 11, 0, 8, 0)
- (12, 12, 0, 8, 0)
- (13, 13, 0, 8, 0)
- (14, 14, 0, 8, 0)
- (15, 15, 0, 8, 0)
- (16, 16, 0, 8, 0)
- (17, 17, 0, 8, 0)
- (18, 18, 0, 8, 0)
- (19, 19, 0, 8, 0)
- (20, 20, 0, 8, 0)
- julia> check_symv.(149:172, 'L')
- 24-element Array{NTuple{5,Int64},1}:
- (149, 149, 0, 8, 0)
- (150, 150, 0, 8, 0)
- (151, 151, 0, 8, 0)
- (152, 152, 0, 8, 0)
- (153, 153, 0, 8, 0)
- (154, 154, 0, 8, 0)
- (155, 155, 0, 8, 0)
- (156, 156, 0, 8, 0)
- (157, 157, 0, 8, 0)
- (158, 158, 0, 8, 0)
- (159, 159, 0, 8, 0)
- (160, 160, 0, 8, 0)
- (161, 161, 0, 8, 0)
- (162, 162, 0, 8, 0)
- (163, 163, 0, 8, 0)
- (164, 164, 0, 8, 0)
- (165, 165, 0, 8, 0)
- (166, 166, 0, 8, 0)
- (167, 167, 0, 8, 0)
- (168, 168, 0, 8, 0)
- (169, 169, 0, 8, 0)
- (170, 170, 0, 8, 0)
- (171, 171, 0, 8, 0)
- (172, 172, 0, 8, 0)
- julia> versioninfo()
- Julia Version 0.7.0-DEV.2513
- Commit e36315577f* (2017-11-15 18:17 UTC)
- Platform Info:
- OS: Linux (x86_64-pc-linux-gnu)
- CPU: AMD Ryzen Threadripper 1920X 12-Core Processor
- WORD_SIZE: 64
- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Zen)
- LAPACK: libopenblas64_
- LIBM: libopenlibm
- LLVM: libLLVM-3.9.1 (ORCJIT, znver1)
- Environment:
Advertisement
Add Comment
Please, Sign In to add comment