Conclusion

This lesson provides a brief summary of what we have covered so far in this chapter.

We’ve seen three forms of code vectorization through these examples:

  • Uniform vectorization where elements share the same computation unconditionally and for the same duration.
  • Temporal vectorization where elements share the same computation but necessitate a different number of iterations.
  • Spatial vectorization where elements share the same computation but on dynamic spatial arguments.

And there are probably many more forms of such direct code vectorization. As explained before, this kind of vectorization is one of the most simple even though we’ve seen it can be really tricky to implement and requires some experience, some help or both. For example, the solution to the boids exercise was provided by Divakar on stack overflow after having explained my problem.

Get hands-on with 1200+ tech skills courses.