[Docs] Fix incorrect return type for example code

This commit is contained in:
Jim Lin
2021-06-10 11:30:31 +08:00
parent e952eb5d5d
commit be0091c05e

View File

@@ -267,7 +267,7 @@ that scatter/gathers memory.
.. code-block:: c++
int foo(int * A, int * B, int n) {
void foo(int * A, int * B, int n) {
for (intptr_t i = 0; i < n; ++i)
A[i] += B[i * 4];
}
@@ -284,7 +284,7 @@ vectorization is profitable.
.. code-block:: c++
int foo(int *A, char *B, int n) {
void foo(int *A, char *B, int n) {
for (int i = 0; i < n; ++i)
A[i] += 4 * B[i];
}
@@ -303,7 +303,7 @@ ignored (as other compilers do) are still being left un-vectorized.
struct { int A[100], K, B[100]; } Foo;
int foo() {
void foo() {
for (int i = 0; i < 100; ++i)
Foo.A[i] = Foo.B[i] + 100;
}