You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/closure-semantics.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
Closure semantics
10
10
=================
11
11
12
-
The ``xtensor`` library is a tensor expression library implementing numpy-style broadcasting and universal functions but in a lazy fashion.
12
+
The *xtensor* library is a tensor expression library implementing numpy-style broadcasting and universal functions but in a lazy fashion.
13
13
14
14
If ``x`` and ``y`` are two tensor expressions with compatible shapes, the result of ``x + y`` is not a tensor but an expression that does
15
15
not hold any value. Values of ``x + y`` are computed upon access or when the result is assigned to a container such as :cpp:type:`xt::xtensor` or
@@ -19,7 +19,7 @@ In order to be able to perform the differed computation of ``x + y``, the return
19
19
copies of the members ``x`` and ``y``, depending on how arguments were passed to ``operator+``. The actual types held by the expressions
20
20
are the **closure types**.
21
21
22
-
The concept of closure type is key in the implementation of ``xtensor`` and appears in all the expressions defined in xtensor, and the utility functions and metafunctions complement the tools of the standard library for the move semantics.
22
+
The concept of closure type is key in the implementation of *xtensor* and appears in all the expressions defined in xtensor, and the utility functions and metafunctions complement the tools of the standard library for the move semantics.
23
23
24
24
Basic rules for determining closure types
25
25
-----------------------------------------
@@ -78,7 +78,7 @@ Using this mechanism, we were able to
78
78
Closure types and scalar wrappers
79
79
---------------------------------
80
80
81
-
A requirement for ``xtensor`` is the ability to mix scalars and tensors in tensor expressions. In order to do so,
81
+
A requirement for *xtensor* is the ability to mix scalars and tensors in tensor expressions. In order to do so,
82
82
scalar values are wrapped into the ``xscalar`` wrapper, which is a cheap 0-D tensor expression holding a single
83
83
scalar value.
84
84
@@ -209,7 +209,7 @@ utility to achieve this:
209
209
}
210
210
211
211
Note: writing a lambda is just sugar for writing a functor.
212
-
Also, using `auto x` as the function argument enables automatic `xsimd` acceleration.
212
+
Also, using ``auto x`` as the function argument enables automatic *xsimd* acceleration.
213
213
214
214
As the data flow through the lambda is entirely transparent to the compiler, using this construct
215
215
is generally faster than using ``xshared_expressions``. The usage of ``xshared_expression`` also
0 commit comments