Skip to content

Commit d22a56c

Browse files
authored
add missing LinearAlgebra methods on GPU (#226)
1 parent 6d4ea42 commit d22a56c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/ComponentArraysGPUArraysExt.jl

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ function Base.fill!(A::GPUComponentArray{T}, x) where {T}
2121
end
2222

2323
LinearAlgebra.dot(x::GPUComponentArray, y::GPUComponentArray) = dot(getdata(x), getdata(y))
24+
LinearAlgebra.dot(x::GPUComponentArray, y::AbstractGPUArray) = dot(getdata(x), y)
25+
LinearAlgebra.dot(x::AbstractGPUArray, y::GPUComponentArray) = dot(x, getdata(y))
26+
2427
LinearAlgebra.norm(ca::GPUComponentArray, p::Real) = norm(getdata(ca), p)
2528
LinearAlgebra.rmul!(ca::GPUComponentArray, b::Number) = GPUArrays.generic_rmul!(ca, b)
2629

0 commit comments

Comments
 (0)