File tree 1 file changed +2
-10
lines changed 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,7 @@ if isdefined(LinearAlgebra, :copytrito!)
112
112
m,n = size (A)
113
113
m1,n1 = size (B)
114
114
if uplo == ' U'
115
- if n < m
116
- (m1 < n || n1 < n) && throw (DimensionMismatch (" B of size ($m1 ,$n1 ) should have at least size ($n ,$n )" ))
117
- else
118
- (m1 < m || n1 < n) && throw (DimensionMismatch (" B of size ($m1 ,$n1 ) should have at least size ($m ,$n )" ))
119
- end
115
+ LinearAlgebra. LAPACK. lacpy_size_check ((m1, n1), (n < m ? n : m, n))
120
116
@kernel function U_kernel! (_A, _B)
121
117
I = @index (Global, Cartesian)
122
118
i, j = Tuple (I)
@@ -126,11 +122,7 @@ if isdefined(LinearAlgebra, :copytrito!)
126
122
end
127
123
U_kernel! (get_backend (B))(A, B; ndrange = size (A))
128
124
else # uplo == 'L'
129
- if m < n
130
- (m1 < m || n1 < m) && throw (DimensionMismatch (" B of size ($m1 ,$n1 ) should have at least size ($m ,$m )" ))
131
- else
132
- (m1 < m || n1 < n) && throw (DimensionMismatch (" B of size ($m1 ,$n1 ) should have at least size ($m ,$n )" ))
133
- end
125
+ LinearAlgebra. LAPACK. lacpy_size_check ((m1, n1), (m, m < n ? m : n))
134
126
@kernel function L_kernel! (_A, _B)
135
127
I = @index (Global, Cartesian)
136
128
i, j = Tuple (I)
You can’t perform that action at this time.
0 commit comments