Skip to content
Snippets Groups Projects
Unverified Commit 97485f94 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

better benchmarking

parent a1e35fab
No related branches found
No related tags found
No related merge requests found
Pipeline #12821 passed
...@@ -10,6 +10,19 @@ module sim_d3q19_reg_bfl_f32 = mk_sim d3q19_reg_bfl_f32 ...@@ -10,6 +10,19 @@ module sim_d3q19_reg_bfl_f32 = mk_sim d3q19_reg_bfl_f32
entry main_d3q19_reg = sim_d3q19_reg_bfl_f32.run entry main_d3q19_reg = sim_d3q19_reg_bfl_f32.run
-- Test the sub1 function.
-- ==
-- input { 21i64 21i64 21i64 27i64 3i64 1.5f32 1000i64 }
-- auto output
let main (nx: i64) (ny: i64) (nz: i64) (q: i64) (d: i64) (omega: f32) (max_t: i64): [nx][ny][nz][q]f32 =
let fin = replicate nx (replicate ny (replicate nz (replicate q 0f32)))
let dist = replicate nx (replicate ny (replicate nz (replicate q (-1.0f32))))
let u = replicate nx (replicate ny (replicate nz (replicate d 0f32)))
in sim_d3q27_reg_bfl_f32.run fin u dist omega max_t
-- -- executes Lattice-Boltzmann it times and -- -- executes Lattice-Boltzmann it times and
-- let lattice_boltzmann [nx][ny][nz] (fin: [nx][ny][nz](lbm_model.vec_q real)) (vel: [nx][ny][nz](lbm_model.vec_d real)) (dists: [nx][ny][nz](lbm_model.vec_q real)) (omega: real) (max_t: i64): [nx][ny][nz](lbm_model.vec_q real) = -- let lattice_boltzmann [nx][ny][nz] (fin: [nx][ny][nz](lbm_model.vec_q real)) (vel: [nx][ny][nz](lbm_model.vec_d real)) (dists: [nx][ny][nz](lbm_model.vec_q real)) (omega: real) (max_t: i64): [nx][ny][nz](lbm_model.vec_q real) =
...@@ -41,13 +54,3 @@ entry main_d3q19_reg = sim_d3q19_reg_bfl_f32.run ...@@ -41,13 +54,3 @@ entry main_d3q19_reg = sim_d3q19_reg_bfl_f32.run
-- in (lbm_model.to_array_q f, rho, (lbm_model.to_array_d u)) -- in (lbm_model.to_array_q f, rho, (lbm_model.to_array_d u))
-- Testing main
-- ==
-- entry: test_main
-- compiled input { 213 123 0.8 1 }
-- auto output
-- entry test_main (nx: i64)(ny: i64)(tau: real)(it: i64): [9][]real =
-- let f_ini = init_f_in(nx)(ny)
-- let f = lattice_boltzmann(nx)(ny)(f_ini)(tau)(it)
-- in from_tuple_to_array(f)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment