Commit: 9aee9d89a0dde0a6b8603322c28887484468d02b
Parent: 577e02951b5f9b0ec9028d2b8dcf5a642cf07a84
Author: Randy Palamar
Date: Thu, 4 Apr 2024 18:13:28 -0600
fix typos and mention Windows support in README
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
@@ -2,7 +2,8 @@
This code simulates an obliquely incident photon source (pencil
beam) on a scattering medium. It can simulate one incident point
-source or many.
+source or many. The program has been tested on and is known to
+work on Linux and Windows 10.
![Diffuse Reflectance](example.png)
@@ -10,9 +11,8 @@ source or many.
Configuration is changed by copying `config.def.h` to `config.h`
and editing it. This configuration is then baked into the compiled
-binary. This helps the compiler optimize for the binary for a
-faster runtime and keeps the types of configuration variables
-clear.
+binary. This helps the compiler optimize the binary for a faster
+runtime and keeps the types of configuration variables clear.
## Building
@@ -23,6 +23,9 @@ compiled by running:
./build.sh
```
+On Linux the only dependency is libc, on Windows winpthreads is
+also required.
+
## Running
The compiled program can be run as:
diff --git a/mc.c b/mc.c
@@ -42,7 +42,7 @@ typedef ptrdiff_t size;
typedef struct { u8 *data; size len; } s8;
#define s8(s) (s8){(u8 *)s, (LEN(s) - 1)}
-typedef struct { f64 x, y ,z; } Vec3;
+typedef struct { f64 x, y, z; } Vec3;
typedef struct { f64 r, theta, z; } Vec3Pol;
typedef struct { f64 top, bot, left, right; } Rect;
typedef struct { u32 Nx, Ny; f64 *b; } Mat2;
@@ -531,7 +531,7 @@ main(int argc, char *argv[])
pthread_mutex_init(&completed_photons.lock, NULL);
- /* TODO: split up photons instead if are only a few lines */
+ /* TODO: split up photons instead if there are only a few lines */
u32 thread_count = MIN(os_get_core_count(), gctx.N_lines);
WorkerCtx *threads = calloc(thread_count, sizeof(WorkerCtx));
if (!threads)