summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbgthompson <benjamin.btstudios@pm.me>2024-11-07 13:31:32 +1000
committerbgthompson <benjamin.btstudios@pm.me>2024-11-07 13:31:32 +1000
commit8cce587d3ba60d8073a38a87a71caa5bfaa859c6 (patch)
treed3862dd135d55fb8c64c0ec2f4576c6cf5216cd6
parent75e5e534979d95087709b0cccf4fdf64e74d43d3 (diff)
added patch file for 109_vectors
-rw-r--r--patches/patches/109_vectors.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/patches/109_vectors.patch b/patches/patches/109_vectors.patch
new file mode 100644
index 0000000..ec2189e
--- /dev/null
+++ b/patches/patches/109_vectors.patch
@@ -0,0 +1,13 @@
+--- exercises/109_vectors.zig 2024-11-03 11:17:00.928652000 +1000
++++ answers/109_vectors.zig 2024-11-07 13:11:23.838667200 +1000
+@@ -121,8 +121,8 @@
+
+ const Vec4 = @Vector(4, f32);
+ fn calcMaxPairwiseDiffNew( a : Vec4, b : Vec4) f32 {
+- const abs_diff_vec = ???;
+- const max_diff = @reduce(???, abs_diff_vec);
++ const abs_diff_vec = @abs(a - b);
++ const max_diff = @reduce(.Max, abs_diff_vec);
+ return max_diff;
+ }
+