Skip to content

Commit 080f12e

Browse files
authored
Merge pull request algorithmica-org#60 from lunastorm/patch-1
Fix typo in branchless
2 parents d1bc0ba + 6b248ea commit 080f12e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎content/english/hpc/pipelining/branchless.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ So the code above is actually closer to using a ternary operator like this:
6363

6464
```c++
6565
for (int i = 0; i < N; i++)
66-
s += (a[i] < 50 : a[i] : 0);
66+
s += (a[i] < 50 ? a[i] : 0);
6767
```
6868

6969
Both variants are optimized by the compiler and produce the following assembly:

0 commit comments

Comments
 (0)