Skip to content

Commit eef9e3b

Browse files
committed
Some whitespace fixes.
[skip ci]
1 parent 5057e50 commit eef9e3b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

lib/cublas/linalg.jl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ function LinearAlgebra.generic_matmatmul!(C::CuVecOrMat, tA, tB, A::StridedCuVec
324324
return hemm!('R', tB == 'H' ? 'U' : 'L', alpha, B, A, beta, C)
325325
end
326326
end
327+
327328
GPUArrays.generic_matmatmul!(C, wrap(A, tA), wrap(B, tB), alpha, beta)
328329
end
329330

@@ -691,13 +692,13 @@ function LinearAlgebra.kron!(C::CuMatrix{TC}, A::CuMatrix{TA}, B::CuMatrix{TB})
691692
function _kron_mat_kernelA!(C, A, B, m, n, p, q)
692693
index_i = (blockIdx().x - 1) * blockDim().x + threadIdx().x
693694
index_j = (blockIdx().y - 1) * blockDim().y + threadIdx().y
694-
695+
695696
stride_i = blockDim().x * gridDim().x
696697
stride_j = blockDim().y * gridDim().y
697-
698+
698699
index_i > m && return
699700
index_j > n && return
700-
701+
701702
for i in index_i:stride_i:m
702703
for j in index_j:stride_j:n
703704
for k in 1:p
@@ -713,13 +714,13 @@ function LinearAlgebra.kron!(C::CuMatrix{TC}, A::CuMatrix{TA}, B::CuMatrix{TB})
713714
function _kron_mat_kernelB!(C, A, B, m, n, p, q)
714715
index_p = (blockIdx().x - 1) * blockDim().x + threadIdx().x
715716
index_q = (blockIdx().y - 1) * blockDim().y + threadIdx().y
716-
717+
717718
stride_p = blockDim().x * gridDim().x
718719
stride_q = blockDim().y * gridDim().y
719-
720+
720721
index_p > p && return
721722
index_q > q && return
722-
723+
723724
for i in 1:m
724725
for j in 1:n
725726
for k in index_p:stride_p:p
@@ -737,7 +738,7 @@ function LinearAlgebra.kron!(C::CuMatrix{TC}, A::CuMatrix{TA}, B::CuMatrix{TB})
737738

738739
# Use different kernels depending on the size of the matrices
739740
# choosing to parallelize the matrix with the largest number of elements
740-
m*n >= p*q ? (kernel = @cuda launch=false _kron_mat_kernelA!(C, A, B, m, n, p, q)) :
741+
m*n >= p*q ? (kernel = @cuda launch=false _kron_mat_kernelA!(C, A, B, m, n, p, q)) :
741742
(kernel = @cuda launch=false _kron_mat_kernelB!(C, A, B, m, n, p, q))
742743

743744
m*n >= p*q ? (sizes = (m, n)) : (sizes = (p, q))
@@ -764,9 +765,9 @@ end
764765
function LinearAlgebra.kron(A::CuMatrix{TA}, B::CuMatrix{TB}) where {TA,TB}
765766
m, n = size(A)
766767
p, q = size(B)
767-
768+
768769
T = promote_type(TA, TB)
769770
C = similar(A, T, m*p, n*q)
770771

771772
kron!(C, A, B)
772-
end
773+
end

0 commit comments

Comments
 (0)