Skip to content

Commit 892d5ef

Browse files
committed
Minor fix in bandwidth_bytes_per_cell_device()
1 parent 58ca271 commit 892d5ef

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

DOCUMENTATION.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@
9191
- Download the [Termux `.apk`](https://github.com/termux/termux-app/releases) and install it.
9292
- In the Termux app, run:
9393
```bash
94-
apt update
95-
apt upgrade -y
94+
apt update && apt upgrade -y
9695
apt install -y clang git make
9796
```
9897

src/lbm.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ uint bandwidth_bytes_per_cell_device() { // returns the bandwidth in Bytes per c
5252
uint bandwidth_bytes_per_cell = velocity_set*2u*sizeof(fpxx)+1u; // lattice.set()*2*fi, flags
5353
#ifdef UPDATE_FIELDS
5454
bandwidth_bytes_per_cell += 16u; // rho, u
55+
#ifdef TEMPERATURE
56+
bandwidth_bytes_per_cell += 4u; // T
57+
#endif // TEMPERATURE
5558
#endif // UPDATE_FIELDS
5659
#ifdef FORCE_FIELD
5760
bandwidth_bytes_per_cell += 12u; // F
@@ -63,7 +66,7 @@ uint bandwidth_bytes_per_cell_device() { // returns the bandwidth in Bytes per c
6366
bandwidth_bytes_per_cell += (1u+(2u*velocity_set-1u)*sizeof(fpxx)+8u+(velocity_set-1u)*4u) + 1u + 1u + (4u+velocity_set+4u+4u+4u); // surface_0 (flags, fi, mass, massex), surface_1 (flags), surface_2 (flags), surface_3 (rho, flags, mass, massex, phi)
6467
#endif // SURFACE
6568
#ifdef TEMPERATURE
66-
bandwidth_bytes_per_cell += 7u*2u*sizeof(fpxx)+4u; // 2*gi, T
69+
bandwidth_bytes_per_cell += 7u*2u*sizeof(fpxx); // 2*gi
6770
#endif // TEMPERATURE
6871
return bandwidth_bytes_per_cell;
6972
}

0 commit comments

Comments
 (0)