Skip to content

Commit

Permalink
Merge pull request #914 from xtensor-stack/feature/rework-documentation
Browse files Browse the repository at this point in the history
Cleanup documentation
  • Loading branch information
JohanMabille committed Apr 6, 2023
2 parents 5878ffa + b141451 commit 2836e8c
Show file tree
Hide file tree
Showing 30 changed files with 381 additions and 260 deletions.
7 changes: 5 additions & 2 deletions docs/source/api/aligned_allocator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
The full license is in the file LICENSE, distributed with this software.
Alignment manipulation
======================

Aligned memory allocator
========================
------------------------

.. doxygenclass:: xsimd::aligned_allocator
:project: xsimd
:members:

Alignement checker
==================
------------------

.. doxygenfunction:: xsimd::is_aligned
:project: xsimd
54 changes: 54 additions & 0 deletions docs/source/api/arithmetic_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,60 @@
Arithmetic operators
====================

Binary operations:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`add` | per slot addition |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sub` | per slot subtraction |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`mul` | per slot multiply |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`div` | per slot division |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`mod` | per slot modulo |
+---------------------------------------+----------------------------------------------------+

Unary operations:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`neg` | per slot negate |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`pos` | per slot positive |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`reciprocal` | per slot reciprocal |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`decr` | per slot decrement |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`decr_if` | per slot decrement, based on a mask |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`incr` | per slot increment |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`incr_if` | per slot increment, based on a mask |
+---------------------------------------+----------------------------------------------------+

Saturated arithmetic:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sadd` | per slot saturated addition |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`ssub` | per slot saturated subtraction |
+---------------------------------------+----------------------------------------------------+

Fused operations:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fma` | fused multiply add |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fms` | fused multiply sub |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fnma` | fused negate multiply add |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fnms` | fused negate multiply sub |
+---------------------------------------+----------------------------------------------------+

----

.. doxygengroup:: batch_arithmetic
:project: xsimd
:content-only:
42 changes: 0 additions & 42 deletions docs/source/api/available_wrappers.rst

This file was deleted.

16 changes: 0 additions & 16 deletions docs/source/api/basic_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,51 @@
Basic functions
===============

.. _abs-function-reference:
.. doxygenfunction:: xsimd::abs(batch<T, A> const&)
:project: xsimd

.. _fabs-function-reference:
.. doxygenfunction:: fabs
:project: xsimd

.. _fmod-function-reference:
.. doxygenfunction:: fmod
:project: xsimd

.. _remainder-func-ref:
.. doxygenfunction:: remainder
:project: xsimd

.. _fma-function-reference:
.. doxygenfunction:: fma
:project: xsimd

.. _fms-function-reference:
.. doxygenfunction:: fms
:project: xsimd

.. _fnma-function-reference:
.. doxygenfunction:: fnma
:project: xsimd

.. _fnms-function-reference:
.. doxygenfunction:: fnms
:project: xsimd

.. _min-function-reference:
.. doxygenfunction:: min
:project: xsimd

.. _max-function-reference:
.. doxygenfunction:: max
:project: xsimd

.. _fmin-function-reference:
.. doxygenfunction:: fmin
:project: xsimd

.. _fmax-function-reference:
.. doxygenfunction:: fmax
:project: xsimd

.. _fdim-function-reference:
.. doxygenfunction:: fdim
:project: xsimd

.. _sadd-function-reference:
.. doxygenfunction:: sadd
:project: xsimd

.. _ssub-function-reference:
.. doxygenfunction:: ssub
:project: xsimd

.. _clip-function-reference:
.. doxygenfunction:: clip
:project: xsimd

2 changes: 1 addition & 1 deletion docs/source/api/batch_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Batch types
===========

.. toctree::
:maxdepth: 1

xsimd_batch
xsimd_batch_bool
xsimd_batch_complex
xsimd_batch_constant
available_wrappers
13 changes: 4 additions & 9 deletions docs/source/api/batch_manip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@
Conditional expression
======================

.. toctree::
+------------------------------+-------------------------------------------+
| :cpp:func:`select` | conditional selection with mask |
+------------------------------+-------------------------------------------+

+-------------------------------------------------+---------------------------------------------------+
| :ref:`select <select-function-reference-dyn>` | conditional selection with dynamic mask |
+-------------------------------------------------+---------------------------------------------------+
| :ref:`select <select-function-reference>` | conditional selection with constant mask |
+-------------------------------------------------+---------------------------------------------------+
----


.. _select-function-reference-dyn:
.. doxygenfunction:: select(batch_bool<T, A> const &cond, batch<T, A> const &true_br, batch<T, A> const &false_br) noexcept
:project: xsimd

.. _select-function-reference:
.. doxygenfunction:: select(batch_bool_constant<batch<T, A>, Values...> const &cond, batch<T, A> const &true_br, batch<T, A> const &false_br) noexcept
:project: xsimd

Expand Down
14 changes: 14 additions & 0 deletions docs/source/api/bitwise_operators_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@
Bitwise operators
=================

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`bitwise_not` | per slot bitwise not |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`bitwise_or` | per slot bitwise or |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`bitwise_xor` | per slot bitwise xor |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`bitwise_and` | per slot bitwise and |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`bitwise_andnot` | per slot bitwise and not |
+---------------------------------------+----------------------------------------------------+

----

.. doxygengroup:: batch_bitwise
:project: xsimd
:content-only:
Expand Down
24 changes: 22 additions & 2 deletions docs/source/api/cast_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,28 @@
</style>


Cast
====
Type conversion
===============

Cast:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`batch_cast` | ``static_cast`` on batch types |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`bitwise_cast` | ``reinterpret_cast`` on batch types |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`batch_bool_cast` | ``static_cast`` on batch predicate types |
+---------------------------------------+----------------------------------------------------+

Conversion:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`to_float` | per slot conversion to floating point |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`to_int` | per slot conversion to integer |
+---------------------------------------+----------------------------------------------------+

----

.. doxygengroup:: batch_conversion
:project: xsimd
Expand Down
21 changes: 0 additions & 21 deletions docs/source/api/classification_functions.rst

This file was deleted.

38 changes: 38 additions & 0 deletions docs/source/api/comparison_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,44 @@
Comparison operators
====================

Ordering:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`eq` | per slot equals to comparison |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`neq` | per slot different from comparison |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`gt` | per slot strictly greater than comparison |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`lt` | per slot strictly lower than comparison |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`ge` | per slot greater or equal to comparison |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`le` | per slot lower or equal to comparison |
+---------------------------------------+----------------------------------------------------+

Parity check:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`is_even` | per slot check for evenness |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`is_odd` | per slot check for oddness |
+---------------------------------------+----------------------------------------------------+

Floating point number check:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`isinf` | per slot check for infinity |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`isnan` | per slot check for NaN |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`isfinite` | per slot check for finite number |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`is_flint` | per slot check for float representing an integer |
+---------------------------------------+----------------------------------------------------+

----

.. doxygengroup:: batch_logical
:project: xsimd
:content-only:

0 comments on commit 2836e8c

Please sign in to comment.