Skip to content

Commit 226e8dd

Browse files
AntoinePrvtdegeus
authored andcommitted
Refer to xtensor lib in italic
1 parent 33cb757 commit 226e8dd

31 files changed

+132
-132
lines changed

docs/source/adaptor.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
Adapting 1-D containers
88
=======================
99

10-
`xtensor` can adapt one-dimensional containers in place, and provide them a tensor interface.
10+
*xtensor* can adapt one-dimensional containers in place, and provide them a tensor interface.
1111
Only random access containers can be adapted.
1212

1313
Adapting std::vector
1414
--------------------
1515

1616
The following example shows how to bring an ``std::vector`` into the expression system of
17-
`xtensor`:
17+
*xtensor*:
1818

1919
.. code::
2020
@@ -44,7 +44,7 @@ the corresponding value in ``v``:
4444
Adapting C-style arrays
4545
-----------------------
4646

47-
`xtensor` provides two ways for adapting a C-style array; the first one does not take the
47+
*xtensor* provides two ways for adapting a C-style array; the first one does not take the
4848
ownership of the array:
4949

5050
.. code::

docs/source/api/iterator_index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Iterators
88
=========
99

10-
In addition to the iterators defined in the different types of expressions, ``xtensor`` provides
10+
In addition to the iterators defined in the different types of expressions, *xtensor* provides
1111
classes that allow to iterate over slices of an expression along a specified axis.
1212

1313
.. toctree::

docs/source/build-options.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Build and configuration
1212
Configuration
1313
-------------
1414

15-
`xtensor` can be configured via macros which must be defined *before* including
15+
*xtensor* can be configured via macros which must be defined *before* including
1616
any of its headers. This can be achieved the following ways:
1717

1818
- either define them in the CMakeLists of your project, with ``target_compile_definitions``
1919
cmake command.
2020
- or create a header where you define all the macros you want and then include the headers you
21-
need. Then include this header whenever you need `xtensor` in your project.
21+
need. Then include this header whenever you need *xtensor* in your project.
2222

23-
The following macros are already defined in `xtensor` but can be overwritten:
23+
The following macros are already defined in *xtensor* but can be overwritten:
2424

2525
- ``XTENSOR_DEFAULT_DATA_CONTAINER(T, A)``: defines the type used as the default data container for tensors and arrays. ``T``
2626
is the ``value_type`` of the container and ``A`` its ``allocator_type``.
@@ -35,8 +35,8 @@ The following macros are already defined in `xtensor` but can be overwritten:
3535

3636
The following macros are helpers for debugging, they are not defined by default:
3737

38-
- ``XTENSOR_ENABLE_ASSERT``: enables assertions in `xtensor`, such as bound check.
39-
- ``XTENSOR_ENABLE_CHECK_DIMENSION``: enables the dimensions check in `xtensor`. Note that this option should not be turned
38+
- ``XTENSOR_ENABLE_ASSERT``: enables assertions in *xtensor*, such as bound check.
39+
- ``XTENSOR_ENABLE_CHECK_DIMENSION``: enables the dimensions check in *xtensor*. Note that this option should not be turned
4040
on if you expect ``operator()`` to perform broadcasting.
4141

4242
.. _external-dependencies:
@@ -47,14 +47,14 @@ External dependencies
4747
The last group of macros is for using external libraries to achieve maximum performance (see next section for additional
4848
requirements):
4949

50-
- ``XTENSOR_USE_XSIMD``: enables SIMD acceleration in `xtensor`. This requires that you have xsimd_ installed
50+
- ``XTENSOR_USE_XSIMD``: enables SIMD acceleration in *xtensor*. This requires that you have xsimd_ installed
5151
on your system.
5252
- ``XTENSOR_USE_TBB``: enables parallel assignment loop. This requires that you have tbb_ installed
5353
on your system.
5454
- ``XTENSOR_DISABLE_EXCEPTIONS``: disables c++ exceptions.
5555
- ``XTENSOR_USE_OPENMP``: enables parallel assignment loop using OpenMP. This requires that OpenMP is available on your system.
5656

57-
Defining these macros in the CMakeLists of your project before searching for `xtensor` will trigger automatic finding
57+
Defining these macros in the CMakeLists of your project before searching for *xtensor* will trigger automatic finding
5858
of dependencies, so you don't have to include the ``find_package(xsimd)`` and ``find_package(TBB)`` commands in your
5959
CMakeLists:
6060

docs/source/builder.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
Expression builders
88
===================
99

10-
`xtensor` provides functions to ease the build of common N-dimensional expressions. The expressions
11-
returned by these functions implement the laziness of `xtensor`, that is, they don't hold any value.
10+
*xtensor* provides functions to ease the build of common N-dimensional expressions. The expressions
11+
returned by these functions implement the laziness of *xtensor*, that is, they don't hold any value.
1212
Values are computed upon request.
1313

1414
Ones and zeros

docs/source/changelog.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ Other changes
544544
`#1888 <https://github.com/xtensor-stack/xtensor/pull/1888>`_
545545
- Fixed ``reshape`` return
546546
`#1886 <https://github.com/xtensor-stack/xtensor/pull/1886>`_
547-
- Enabled ``add_subdirectory`` for ``xsimd``
547+
- Enabled ``add_subdirectory`` for *xsimd*
548548
`#1889 <https://github.com/xtensor-stack/xtensor/pull/1889>`_
549549
- Support ``ddof`` argument for ``xt::variance``
550550
`#1893 <https://github.com/xtensor-stack/xtensor/pull/1893>`_
@@ -827,7 +827,7 @@ Other changes
827827
`#1556 <https://github.com/xtensor-stack/xtensor/pull/1556>`_
828828
- Fixed ``real``, ``imag``, and ``functor_view``
829829
`#1554 <https://github.com/xtensor-stack/xtensor/pull/1554>`_
830-
- Allows to include ``xsimd`` without defining ``XTENSOR_USE_XSIMD``
830+
- Allows to include *xsimd* without defining ``XTENSOR_USE_XSIMD``
831831
`#1548 <https://github.com/xtensor-stack/xtensor/pull/1548>`_
832832
- Fixed ``argsort`` in column major
833833
`#1547 <https://github.com/xtensor-stack/xtensor/pull/1547>`_
@@ -863,7 +863,7 @@ Other changes
863863
`#1497 <https://github.com/xtensor-stack/xtensor/pull/1497>`_
864864
- Removed unused capture
865865
`#1499 <https://github.com/xtensor-stack/xtensor/pull/1499>`_
866-
- Upgraded to ``xtl`` 0.6.2
866+
- Upgraded to *xtl* 0.6.2
867867
`#1502 <https://github.com/xtensor-stack/xtensor/pull/1502>`_
868868
- Added missing methods in ``xshared_expression``
869869
`#1503 <https://github.com/xtensor-stack/xtensor/pull/1503>`_
@@ -908,7 +908,7 @@ Breaking changes
908908
`#1389 <https://github.com/xtensor-stack/xtensor/pull/1389>`_
909909
- Removed deprecated type ``slice_vector``
910910
`#1459 <https://github.com/xtensor-stack/xtensor/pull/1459>`_
911-
- Upgraded to ``xtl`` 0.6.1
911+
- Upgraded to *xtl* 0.6.1
912912
`#1468 <https://github.com/xtensor-stack/xtensor/pull/1465>`_
913913
- Added ``keep_dims`` option to reducers
914914
`#1474 <https://github.com/xtensor-stack/xtensor/pull/1474>`_
@@ -1080,7 +1080,7 @@ Other changes
10801080
`#1339 <https://github.com/xtensor-stack/xtensor/pull/1339>`_.
10811081
- Prevent embiguity with `xsimd::reduce`
10821082
`#1343 <https://github.com/xtensor-stack/xtensor/pull/1343>`_.
1083-
- Require `xtl` 0.5.3
1083+
- Require *xtl* 0.5.3
10841084
`#1346 <https://github.com/xtensor-stack/xtensor/pull/1346>`_.
10851085
- Use concepts instead of SFINAE
10861086
`#1347 <https://github.com/xtensor-stack/xtensor/pull/1347>`_.
@@ -1330,7 +1330,7 @@ Other changes
13301330
`#1074 <https://github.com/xtensor-stack/xtensor/pull/1074>`_.
13311331
- Clean documentation for views
13321332
`#1131 <https://github.com/xtensor-stack/xtensor/pull/1131>`_.
1333-
- Build with ``xsimd`` on Windows fixed
1333+
- Build with *xsimd* on Windows fixed
13341334
`#1127 <https://github.com/xtensor-stack/xtensor/pull/1127>`_.
13351335
- Implement ``mime_bundle_repr`` for ``xmasked_view``
13361336
`#1132 <https://github.com/xtensor-stack/xtensor/pull/1132>`_.
@@ -2013,7 +2013,7 @@ Breaking changes
20132013
`#482 <https://github.com/xtensor-stack/xtensor/pull/482>`_.
20142014
- Change ``edge_items`` print option to ``edgeitems`` for better numpy consistency
20152015
`#489 <https://github.com/xtensor-stack/xtensor/pull/489>`_.
2016-
- xtensor now depends on ``xtl`` version `~0.3.3`
2016+
- *xtensor* now depends on *xtl* version `~0.3.3`
20172017
`#508 <https://github.com/xtensor-stack/xtensor/pull/508>`_.
20182018

20192019
New features
@@ -2063,13 +2063,13 @@ Other changes
20632063
Breaking changes
20642064
~~~~~~~~~~~~~~~~
20652065

2066-
- ``xtensor`` now depends on ``xtl`` version `0.2.x`
2066+
- *xtensor* now depends on *xtl* version `0.2.x`
20672067
`#421 <https://github.com/xtensor-stack/xtensor/pull/421>`_.
20682068

20692069
New features
20702070
~~~~~~~~~~~~
20712071

2072-
- ``xtensor`` has an optional dependency on ``xsimd`` for enabling simd acceleration
2072+
- *xtensor* has an optional dependency on *xsimd* for enabling simd acceleration
20732073
`#426 <https://github.com/xtensor-stack/xtensor/pull/426>`_.
20742074

20752075
- All expressions have an additional safe access function (``at``)
@@ -2082,7 +2082,7 @@ New features
20822082
correctly defined
20832083
`#446 <https://github.com/xtensor-stack/xtensor/pull/446>`_.
20842084

2085-
- expressions tags added so ``xtensor`` expression system can be extended
2085+
- expressions tags added so *xtensor* expression system can be extended
20862086
`#447 <https://github.com/xtensor-stack/xtensor/pull/447>`_.
20872087

20882088
Other changes

docs/source/closure-semantics.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Closure semantics
1010
=================
1111

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.
1313

1414
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
1515
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
1919
copies of the members ``x`` and ``y``, depending on how arguments were passed to ``operator+``. The actual types held by the expressions
2020
are the **closure types**.
2121

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.
2323

2424
Basic rules for determining closure types
2525
-----------------------------------------
@@ -78,7 +78,7 @@ Using this mechanism, we were able to
7878
Closure types and scalar wrappers
7979
---------------------------------
8080

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,
8282
scalar values are wrapped into the ``xscalar`` wrapper, which is a cheap 0-D tensor expression holding a single
8383
scalar value.
8484

@@ -209,7 +209,7 @@ utility to achieve this:
209209
}
210210
211211
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.
213213

214214
As the data flow through the lambda is entirely transparent to the compiler, using this construct
215215
is generally faster than using ``xshared_expressions``. The usage of ``xshared_expression`` also

docs/source/container.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Arrays and tensors
1010
Internal memory layout
1111
----------------------
1212

13-
A multi-dimensional array of `xtensor` consists of a contiguous one-dimensional buffer combined with an indexing scheme that maps
13+
A multi-dimensional array of *xtensor* consists of a contiguous one-dimensional buffer combined with an indexing scheme that maps
1414
unsigned integers to the location of an element in the buffer. The range in which the indices can vary is specified by the
1515
`shape` of the array.
1616

@@ -21,7 +21,7 @@ The scheme used to map indices into a location in the buffer is a strided indexi
2121
- the row-major layout (or C layout) is a strided index scheme where the strides grow from right to left
2222
- the column-major layout (or Fortran layout) is a strided index scheme where the strides grow from left to right
2323

24-
`xtensor` provides a :cpp:enum:`xt::layout_type` enum that helps to specify the layout used by multidimensional arrays.
24+
*xtensor* provides a :cpp:enum:`xt::layout_type` enum that helps to specify the layout used by multidimensional arrays.
2525
This enum can be used in two ways:
2626

2727
- at compile time, as a template argument. The value :cpp:enumerator:`xt::layout_type::dynamic` allows specifying any
@@ -174,11 +174,11 @@ Instead, it has to be assigned to a temporary variable before being copied into
174174
A typical case where this happens is when the destination container is involved in the expression and has to be resized.
175175
This phenomenon is known as *aliasing*.
176176

177-
To prevent this, `xtensor` assigns the expression to a temporary variable before copying it.
177+
To prevent this, *xtensor* assigns the expression to a temporary variable before copying it.
178178
In the case of :cpp:type:`xt::xarray`, this results in an extra dynamic memory allocation and copy.
179179

180180
However, if the left-hand side is not involved in the expression being assigned, no temporary variable should be required.
181-
`xtensor` cannot detect such cases automatically and applies the "temporary variable rule" by default.
181+
*xtensor* cannot detect such cases automatically and applies the "temporary variable rule" by default.
182182
A mechanism is provided to forcibly prevent usage of a temporary variable:
183183

184184
.. code::

docs/source/dev-build-options.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Build and configuration
1010
Build
1111
-----
1212

13-
``xtensor`` build supports the following options:
13+
*xtensor* build supports the following options:
1414

1515
- ``BUILD_TESTS``: enables the ``xtest`` and ``xbenchmark`` targets (see below).
1616
- ``DOWNLOAD_GTEST``: downloads ``gtest`` and builds it locally instead of using a binary installation.
1717
- ``GTEST_SRC_DIR``: indicates where to find the ``gtest`` sources instead of downloading them.
18-
- ``XTENSOR_ENABLE_ASSERT``: activates the assertions in ``xtensor``.
19-
- ``XTENSOR_CHECK_DIMENSION``: turns on ``XTENSOR_ENABLE_ASSERT`` and activates dimension checks in ``xtensor``.
18+
- ``XTENSOR_ENABLE_ASSERT``: activates the assertions in *xtensor*.
19+
- ``XTENSOR_CHECK_DIMENSION``: turns on ``XTENSOR_ENABLE_ASSERT`` and activates dimension checks in *xtensor*.
2020
Note that the dimensions check should not be activated if you expect ``operator()`` to perform broadcasting.
21-
- ``XTENSOR_USE_XSIMD``: enables simd acceleration in ``xtensor``. This requires that you have xsimd_ installed
21+
- ``XTENSOR_USE_XSIMD``: enables simd acceleration in *xtensor*. This requires that you have xsimd_ installed
2222
on your system.
2323
- ``XTENSOR_USE_TBB``: enables parallel assignment loop. This requires that you have you have tbb_ installed
2424
on your system.
@@ -35,7 +35,7 @@ If the ``BUILD_TESTS`` option is enabled, the following targets are available:
3535
- xtest: builds an run the test suite.
3636
- xbenchmark: builds and runs the benchmarks.
3737

38-
For instance, building the test suite of ``xtensor`` with assertions enabled:
38+
For instance, building the test suite of *xtensor* with assertions enabled:
3939

4040
.. code::
4141
@@ -44,7 +44,7 @@ For instance, building the test suite of ``xtensor`` with assertions enabled:
4444
cmake -DBUILD_TESTS=ON -DXTENSOR_ENABLE_ASSERT=ON ../
4545
make xtest
4646
47-
Building the test suite of ``xtensor`` where the sources of ``gtest`` are
47+
Building the test suite of *xtensor* where the sources of ``gtest`` are
4848
located in e.g. ``/usr/share/gtest``:
4949

5050
.. code::
@@ -59,13 +59,13 @@ located in e.g. ``/usr/share/gtest``:
5959
Configuration
6060
-------------
6161

62-
``xtensor`` can be configured via macros, which must be defined *before*
62+
*xtensor* can be configured via macros, which must be defined *before*
6363
including any of its header. Here is a list of available macros:
6464

6565
- ``XTENSOR_ENABLE_ASSERT``: enables assertions in xtensor, such as bound check.
66-
- ``XTENSOR_ENABLE_CHECK_DIMENSION``: enables the dimensions check in ``xtensor``. Note that this option should not be turned
66+
- ``XTENSOR_ENABLE_CHECK_DIMENSION``: enables the dimensions check in *xtensor*. Note that this option should not be turned
6767
on if you expect ``operator()`` to perform broadcasting.
68-
- ``XTENSOR_USE_XSIMD``: enables SIMD acceleration in ``xtensor``. This requires that you have xsimd_ installed
68+
- ``XTENSOR_USE_XSIMD``: enables SIMD acceleration in *xtensor*. This requires that you have xsimd_ installed
6969
on your system.
7070
- ``XTENSOR_USE_TBB``: enables parallel assignment loop. This requires that you have you have tbb_ installed
7171
on your system.

docs/source/developer/assignment.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Assignment
1010
==========
1111

1212
In this section, we consider the class :cpp:type:`xt::xarray` and its semantic bases (``xcontainer_semantic`` and
13-
``xsemantic_base``) to illustrate how the assignment works. `xtensor` provides different mechanics of
13+
``xsemantic_base``) to illustrate how the assignment works. *xtensor* provides different mechanics of
1414
assignment depending on the type of expression.
1515

1616
Extended copy semantic
@@ -159,7 +159,7 @@ tag:
159159
// ...
160160
};
161161
162-
`xtensor` provides specializations for ``xtensor_expression_tag`` and ``xoptional_expression_tag``.
162+
*xtensor* provides specializations for ``xtensor_expression_tag`` and ``xoptional_expression_tag``.
163163
When implementing a new function type whose API is unrelated to the one of ``xfunction_base``,
164164
the ``xexpression_assigner`` should be specialized so that the assignment relies on this specific API.
165165

@@ -172,10 +172,10 @@ during the resize phase, is the nature of the assignment: trivial or not. The as
172172
trivial when the memory layout of the lhs and rhs are such that assignment can be done by iterating over
173173
a 1-D sequence on both sides. In that case, two options are possible:
174174

175-
- if ``xtensor`` is compiled with the optional ``xsimd`` dependency, and if the layout and the
175+
- if *xtensor* is compiled with the optional *xsimd* dependency, and if the layout and the
176176
``value_type`` of each expression allows it, the assignment is a vectorized index-based loop
177177
operating on the expression buffers.
178-
- if the ``xsimd`` assignment is not possible (for any reason), an iterator-based loop operating
178+
- if the *xsimd* assignment is not possible (for any reason), an iterator-based loop operating
179179
on the expresion buffers is used instead.
180180

181181
These methods are implemented in specializations of the ``trivial_assigner`` class.

docs/source/developer/concepts.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Concepts
1010
========
1111

12-
`xtensor`'s core is built upon key concepts captured in interfaces that are put together in derived
12+
*xtensor*'s core is built upon key concepts captured in interfaces that are put together in derived
1313
classes through CRTP (`Curiously Recurring Template Pattern
1414
<https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern>`_) and multiple inheritance.
1515
Interfaces and classes that model expressions implement *value semantic*. CRTP and value semantic
@@ -89,13 +89,13 @@ you to iterate over a N-dimensional expression in row-major order or column-majo
8989
const_reverse_iterator crend() const noexcept;
9090
9191
This template parameter is defaulted to ``XTENSOR_DEFAULT_TRAVERSAL`` (see :ref:`configuration-label`), so
92-
that `xtensor` expressions can be used in generic code such as:
92+
that *xtensor* expressions can be used in generic code such as:
9393

9494
.. code::
9595
9696
std::copy(a.cbegin(), a.cend(), b.begin());
9797
98-
where ``a`` and ``b`` can be arbitrary types (from `xtensor`, the STL or any external library)
98+
where ``a`` and ``b`` can be arbitrary types (from *xtensor*, the STL or any external library)
9999
supporting standard iteration.
100100

101101
``xiterable`` inherits from ``xconst_iterable`` and provides non-const counterpart of methods

0 commit comments

Comments
 (0)