Chapter 1 / 3
โฆ 0 XP
Chapter 1 / 3
Drill in formation
New here? Read the 60-sec briefing โOne core, one reading is wasteful, each core can drill a whole lane-group at once. Load W readings, double them, and store W back in a single vectorized instruction.
SIMD vectorization: one thread processes W elements per instruction using wide load/store, instead of one at a time. This is the single biggest elementwise speedup and the basis of Mojo's functional `vectorize`.
YOUR TASK
- 1Load a width-W vector at i, double it, store the width-W result.
- 2Use the wide load/store form so the whole lane-group moves at once.
๐ก Move a whole lane-group: out.store[W](i, inp.load[W](i) * 2.0).
drill/vectorize.mojo
PUZZLE 23 ยท VECTORIZEClear all 3 chapters to forge๐ Drill Core Shard