[PATCH] D82034: [docs] Clarify semantics of ordered fadd/fmul reductions.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 09:13:56 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG84167a8d58e8: [docs] Clarify semantics of ordered fadd/fmul reductions. (authored by aemerson).
Changed prior to commit:
https://reviews.llvm.org/D82034?vs=271501&id=271743#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82034/new/
https://reviews.llvm.org/D82034
Files:
llvm/docs/LangRef.rst
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -15131,7 +15131,17 @@
If the intrinsic call has the 'reassoc' or 'fast' flags set, then the
reduction will not preserve the associativity of an equivalent scalarized
counterpart. Otherwise the reduction will be *ordered*, thus implying that
-the operation respects the associativity of a scalarized reduction.
+the operation respects the associativity of a scalarized reduction. That is, the
+reduction begins with the start value and performs an fadd operation with consecutively
+increasing vector element indices. See the following pseudocode:
+
+::
+
+ float ordered_fadd(start_value, input_vector)
+ result = start_value
+ for i = 0 to length(input_vector)
+ result = result + input_vector[i]
+ return result
Arguments:
@@ -15192,7 +15202,17 @@
If the intrinsic call has the 'reassoc' or 'fast' flags set, then the
reduction will not preserve the associativity of an equivalent scalarized
counterpart. Otherwise the reduction will be *ordered*, thus implying that
-the operation respects the associativity of a scalarized reduction.
+the operation respects the associativity of a scalarized reduction. That is, the
+reduction begins with the start value and performs an fmul operation with consecutively
+increasing vector element indices. See the following pseudocode:
+
+::
+
+ float ordered_fmul(start_value, input_vector)
+ result = start_value
+ for i = 0 to length(input_vector)
+ result = result * input_vector[i]
+ return result
Arguments:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82034.271743.patch
Type: text/x-patch
Size: 1671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200618/c5d21d1c/attachment.bin>
More information about the llvm-commits
mailing list