Skip to content

Commit

Permalink
Simplify kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomercurio committed Dec 16, 2024
1 parent 5bdfbed commit fc94e65
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/host/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,7 @@ function LinearAlgebra.kron!(z::AbstractGPUVector{T1}, x::AbstractGPUVector{T2},
@kernel function kron_kernel!(z, @Const(x), @Const(y))
i, j = @index(Global, NTuple)

ly = length(y)

@inbounds z[(i - 1) * ly + j] = x[i] * y[j]
@inbounds z[(i - 1) * length(y) + j] = x[i] * y[j]
end

backend = KernelAbstractions.get_backend(z)
Expand Down

0 comments on commit fc94e65

Please sign in to comment.