From 5813471fcbb66b9791dba62b103313f741322fa0 Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Tue, 3 Sep 2024 13:08:43 -1000 Subject: [PATCH] Remove unused size array --- src/solvers/dg_1d.jl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/solvers/dg_1d.jl b/src/solvers/dg_1d.jl index daa994f..1938552 100644 --- a/src/solvers/dg_1d.jl +++ b/src/solvers/dg_1d.jl @@ -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, @@ -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 @@ -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