Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some spelling fixes. #2

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _posts/2021-07-13-Java Explicit Vectorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ becomes `37 * 0.4 = 14.8` seconds.

###### What's my name?

This phenomenon, is called Vectorization. The term stems from Vector Processors (see wikipedia), which operate on
This phenomenon, is called Vectorization. The term stems from Vector Processors (see Wikipedia), which operate on
Mathematical Vectors. And if you remember your linear algebra, a Vector is basically something like `[1 2 3 0]`, which
I'm sure your Java laden eyes mistook this for an Array. Fear not, it basically is an array, only on a much lower level.

Expand Down Expand Up @@ -344,7 +344,7 @@ So by dividing `128 / 32 = 4`, meaning we can do operations on 4 ints at a time.
final vector.VectorSpecies<Integer> species=vector.IntVector.SPECIES_128;
```

Sweet, but do I need to do all these tedious calculations everytime I want to do me some vectors?
Sweet, but do I need to do all these tedious calculations every time I want to do me some vectors?

Luckily, no. The API contains a couple of convenience constants that do this for you.

Expand All @@ -357,7 +357,7 @@ final vector.VectorSpecies<Integer> species = vector.IntVector.SPECIES_PREFERRED
So next, we have to transform our plain old `int[]` into the Vector version. Or, in other words, move the data into the
special SIMD registers.

The funny thing about this part though, is that it seems very counterintuitive from the performance point of view. I
The funny thing about this part though, is that it seems very counter-intuitive from the performance point of view. I
mean, we are literally copying the data into smaller chunks, instead of iterating over an array?? At the very least you
use double the memory size.

Expand Down Expand Up @@ -690,7 +690,7 @@ code, and myself to pretend that I write my shopping lists in assembly.
####### Elephant in the room

A keen observer might have...observed, that we use a `FloatVector.SPECIES_256`, meaning we can read/write/operate
on `8 floats` simultaneously, and yet we increment our loop by `6` at a time. This ofcourse is due to the fact that the
on `8 floats` simultaneously, and yet we increment our loop by `6` at a time. This of course is due to the fact that the
floats are arranged in a sequence of `xyzxyzxyz...`, meaning reading 8 floats would read `xyzxyzxy` and the following
iteration `zxyzxyzx`, and so on.

Expand Down