From 9baa6e4c36565855bbdc4548ca16105f10aaf8ac Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Thu, 20 Dec 2012 22:47:41 +0000 Subject: [PATCH] docs: Indent consistently in code examples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170791 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/Vectorizers.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/Vectorizers.rst b/docs/Vectorizers.rst index d5bc90b0a4e..fbafe6b081f 100644 --- a/docs/Vectorizers.rst +++ b/docs/Vectorizers.rst @@ -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 -- 2.34.1