mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
docs: Indent consistently in code examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170791 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12ae515945
commit
9baa6e4c36
@ -54,8 +54,8 @@ a scalar copy of the loop increases the code size.
|
||||
.. code-block:: c++
|
||||
|
||||
void bar(float *A, float* B, float K, int start, int end) {
|
||||
for (int i = start; i < end; ++i)
|
||||
A[i] *= B[i] + K;
|
||||
for (int i = start; i < end; ++i)
|
||||
A[i] *= B[i] + K;
|
||||
}
|
||||
|
||||
Runtime Checks of Pointers
|
||||
@ -75,8 +75,8 @@ of the loop is executed.
|
||||
.. code-block:: c++
|
||||
|
||||
void bar(float *A, float* B, float K, int n) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i] *= B[i] + K;
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i] *= B[i] + K;
|
||||
}
|
||||
|
||||
|
||||
@ -108,8 +108,8 @@ array. The Loop Vectorizer knows to vectorize induction variables.
|
||||
.. code-block:: c++
|
||||
|
||||
void bar(float *A, float* B, float K, int n) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i] = i;
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i] = i;
|
||||
}
|
||||
|
||||
If Conversion
|
||||
@ -165,8 +165,8 @@ memory accesses.
|
||||
.. code-block:: c++
|
||||
|
||||
int foo(int *A, int *B, int n, int k) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i*7] += B[i*k];
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i*7] += B[i*k];
|
||||
}
|
||||
|
||||
Vectorization of Mixed Types
|
||||
@ -179,8 +179,8 @@ vectorization is profitable.
|
||||
.. code-block:: c++
|
||||
|
||||
int foo(int *A, char *B, int n, int k) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i] += 4 * B[i];
|
||||
for (int i = 0; i < n; ++i)
|
||||
A[i] += 4 * B[i];
|
||||
}
|
||||
|
||||
Vectorization of function calls
|
||||
|
Loading…
x
Reference in New Issue
Block a user