Skip to content
Snippets Groups Projects
Commit 001284f0 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

corrected streaming bug and updated makefile

parent c5e7d59c
No related tags found
No related merge requests found
......@@ -142,17 +142,14 @@ let collision [n] (f_in: [9][n]f64)(tau: f64): [9][n]f64 =
-- )
-- propagation phase
let propagation [n] (f_out: [9][n]f64)(nx: i32)(ny: i32): [9][n]f64 =
let propagation [n] (f_out: [9][n]f64)(nx: i32)(ny: i32): *[9][n]f64 =
unsafe
tabulate_2d 9 n (\i ind->
let y = ind / nx
let x = ind - nx * y
unflatten(9)(n) (flatten_3d (tabulate_3d 9 nx ny (\i x y ->
let next_x = (x-(i32.f64 c[i].1) + nx) % nx
let next_y = (y-(i32.f64 c[i].2) + ny) % ny
in f_out[i, (next_x + nx * next_y)]
)
in f_out[i, (next_y + ny * next_x)]
)))
-- executes one iteration of Lattice-Boltzmann
-- which means it takes an f_in and updates it
......
CUDA=false
OPENCL=true
SDL=false
TARGET=c
SDL=true
ifeq ($(CUDA),true)
ifeq ($(TARGET),cuda)
CUDALIBS=-lcudart -lcuda -lnvrtc
TARGET=cuda
endif
ifeq ($(OPENCL),true)
else ifeq ($(TARGET),opencl)
OPENCLIBS=-lOpenCL
TARGET=opencl
endif
ifeq ($(SDL),true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment