Skip to content

Commit

Permalink
Remove unused size array
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyuxie committed Sep 3, 2024
1 parent fe188bb commit 5813471
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/solvers/dg_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@ function cuda_boundary_flux!(t, mesh::TreeMesh{1}, boundary_conditions::NamedTup
indices_arr = CuArray{Int64}([firsts[1], firsts[2]])
boundary_conditions_callable = replace_boundary_conditions(boundary_conditions)

size_arr = CuArray{Float64}(undef, length(boundary_arr))

boundary_flux_kernel = @cuda launch=false boundary_flux_kernel!(surface_flux_values,
boundaries_u, node_coordinates,
t, boundary_arr, indices_arr,
Expand All @@ -587,7 +585,7 @@ function cuda_boundary_flux!(t, mesh::TreeMesh{1}, boundary_conditions::NamedTup
boundary_flux_kernel(surface_flux_values, boundaries_u, node_coordinates, t, boundary_arr,
indices_arr, neighbor_ids, neighbor_sides, orientations,
boundary_conditions_callable, equations, surface_flux;
configurator_1d(boundary_flux_kernel, size_arr)...)
configurator_1d(boundary_flux_kernel, boundary_arr)...)

cache.elements.surface_flux_values = surface_flux_values # copy back to host automatically

Expand All @@ -602,13 +600,11 @@ function cuda_surface_integral!(du, mesh::TreeMesh{1}, equations, dg::DGSEM, cac
])
surface_flux_values = CuArray{Float64}(cache.elements.surface_flux_values)

size_arr = CuArray{Float64}(undef, size(du, 1), size(du, 2), size(du, 3))

surface_integral_kernel = @cuda launch=false surface_integral_kernel!(du, factor_arr,
surface_flux_values,
equations)
surface_integral_kernel(du, factor_arr, surface_flux_values, equations;
configurator_3d(surface_integral_kernel, size_arr)...)
configurator_3d(surface_integral_kernel, du)...)

return nothing
end
Expand Down

0 comments on commit 5813471

Please sign in to comment.