summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/readability-simd-intrinsics.rst22
1 files changed, 12 insertions, 10 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-simd-intrinsics.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-simd-intrinsics.rst
index acae83f9302..49d442c6cd9 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-simd-intrinsics.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-simd-intrinsics.rst
@@ -3,7 +3,8 @@
readability-simd-intrinsics
===========================
-Finds SIMD intrinsics calls and suggests ``std::experimental::simd`` (`P0214`_) alternatives.
+Finds SIMD intrinsics calls and suggests ``std::experimental::simd`` (`P0214`_)
+alternatives.
If the option ``Suggest`` is set to non-zero, for
@@ -12,13 +13,11 @@ If the option ``Suggest`` is set to non-zero, for
_mm_add_epi32(a, b); // x86
vec_add(a, b); // Power
-the check suggests an alternative:
+the check suggests an alternative: ``operator+`` on ``std::experimental::simd``
+objects.
-.. code-block::
-
- operator+ on std::experimental::simd objects
-
-Otherwise, it just complains the intrinsics are non-portable (and there are `P0214`_ alternatives).
+Otherwise, it just complains the intrinsics are non-portable (and there are
+`P0214`_ alternatives).
Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX,
ARM NEON). It is common that SIMD code implementing the same algorithm, is
@@ -26,8 +25,9 @@ written in multiple target-dispatching pieces to optimize for different
architectures or micro-architectures.
The C++ standard proposal `P0214`_ and its extensions cover many common SIMD
-operations. By migrating from target-dependent intrinsics to `P0214` operations,
-the SIMD code can be simplified and pieces for different targets can be unified.
+operations. By migrating from target-dependent intrinsics to `P0214`_
+operations, the SIMD code can be simplified and pieces for different targets can
+be unified.
Refer to `P0214`_ for introduction and motivation for the data-parallel standard
library.
@@ -37,6 +37,8 @@ Options
.. option:: Suggest
- If this option is set to non-zero (default is `0`), the check will suggest P0214 alternatives, otherwise it only points out the intrinsic function is non-portable.
+ If this option is set to non-zero (default is `0`), the check will suggest
+ `P0214`_ alternatives, otherwise it only points out the intrinsic function is
+ non-portable.
.. _P0214: http://wg21.link/p0214
OpenPOWER on IntegriCloud