Browse Source

removed commented solution lines in vectors exercise, added ??? into lines instead

bgthompson 9 months ago
parent
commit
75e5e53497
1 changed files with 2 additions and 4 deletions
  1. 2 4
      exercises/109_vectors.zig

+ 2 - 4
exercises/109_vectors.zig

@@ -121,10 +121,8 @@ fn calcMaxPairwiseDiffOld( list1 : [4] f32, list2 : [4] f32) f32 {
 
 
 const Vec4 = @Vector(4, f32);
 const Vec4 = @Vector(4, f32);
 fn calcMaxPairwiseDiffNew( a : Vec4, b : Vec4) f32 {
 fn calcMaxPairwiseDiffNew( a : Vec4, b : Vec4) f32 {
-//    const abs_diff_vec = ???;
-    const abs_diff_vec = @abs(a - b);
-//    const max_diff = @reduce(???, abs_diff_vec);
-    const max_diff = @reduce(.Max, abs_diff_vec);
+    const abs_diff_vec = ???;
+    const max_diff = @reduce(???, abs_diff_vec);
     return max_diff;
     return max_diff;
 }
 }