File: gt_smoothing_variant3_computation.hpp

package info (click to toggle)
gridtools 2.3.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,480 kB
  • sloc: cpp: 228,792; python: 17,561; javascript: 9,164; ansic: 4,101; sh: 850; makefile: 231; f90: 201
file content (15 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
auto phi = make_storage();
auto phi_new = make_storage();

halo_descriptor boundary_i(halo, halo, halo, Ni - halo - 1, Ni);
halo_descriptor boundary_j(halo, halo, halo, Nj - halo - 1, Nj);
auto grid = make_grid(boundary_i, boundary_j, axis_t{kmax, Nk - kmax});

auto const spec = [](auto phi, auto phi_new) {
    GT_DECLARE_TMP(double, lap);
    return execute_parallel()                              //
        .stage(lap_function(), phi, lap)                   //
        .stage(smoothing_function_3(), phi, lap, phi_new); //
};

run(spec, stencil_backend_t(), grid, phi, phi_new);