Skip to content

Commit

Permalink
Documentation glow up for A->C
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlap authored Jun 25, 2024
1 parent 4eccfaa commit 7011bac
Show file tree
Hide file tree
Showing 60 changed files with 611 additions and 628 deletions.
22 changes: 15 additions & 7 deletions include/eve/module/combinatorial/regular/bernouilli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ namespace eve
//! @addtogroup combinatorial
//! @{
//! @var bernouilli
//! @brief Computes the nth Bernouilli number \f$b_n\f$ as a double.
//! @brief `elementwise_callable` object computing the nth Bernouilli number \f$b_n\f$ as a double.
//!
//! **Defined in header**
//! @groupheader{Header file}
//!
//! @code
//! #include <eve/module/combinatorial.hpp>
Expand All @@ -42,19 +42,27 @@ namespace eve
//! @code
//! namespace eve
//! {
//! template< eve::unsigned_value N >
//! constexpr eve::as_wide_as<double, N> bernouilli(N n) noexcept;
//! // Regular overload
//! constexpr auto bernouilli(unsigned_value auto x) noexcept; // 1
//!
//! // Lanes masking
//! constexpr auto bernouilli[conditional_expr auto c](floating_value auto x) noexcept; // 2
//! constexpr auto bernouilli[logical_value auto m](floating_value auto x) noexcept; // 2
//! }
//! @endcode
//!
//! **Parameters**
//!
//! * `n` : unsigned argument.
//! * `n`: unsigned argument.
//! * `c`: [Conditional expression](@ref conditional_expr) masking the operation.
//! * `m`: [Logical value](@ref logical) masking the operation.
//!
//! **Return value**
//! The result's element type is `double` to avoid overflow as possible and
//! its cardinal is the same as `n`.
//!
//! The value of the nth Bernouilli number is returned.
//! The result's element type is double to avoid overflow and its cardinal is the same as 'n'.
//! 1. The value of the nth Bernouilli number is returned.
//! 2. [The operation is performed conditionnaly](@ref conditional).
//!
//! @groupheader{Example}
//!
Expand Down
5 changes: 2 additions & 3 deletions include/eve/module/core/regular/abs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ namespace eve
//! constexpr auto abs(value auto x) noexcept; // 1
//!
//! // Lanes masking
//! constexpr auto abs[conditional_expr auto c](value auto x) noexcept; // 2.1
//! constexpr auto abs[logical_value auto m](value auto x) noexcept; // 2.2
//! constexpr auto abs[conditional_expr auto c](value auto x) noexcept; // 2
//! constexpr auto abs[logical_value auto m](value auto x) noexcept; // 2
//!
//! // Semantic options
//! constexpr auto abs[saturated](value auto x) noexcept; // 3
Expand All @@ -58,7 +58,6 @@ namespace eve
//! * `c`: [Conditional expression](@ref conditional_expr) masking the operation.
//! * `m`: [Logical value](@ref logical) masking the operation.
//!
//!
//! **Return value**
//!
//! 1. The absolute value of `x` if it is representable.
Expand Down
14 changes: 7 additions & 7 deletions include/eve/module/core/regular/absmax.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ namespace eve
//! namespace eve
//! {
//! // Regular overloads
//! constexpr auto absmax(eve::value auto x, eve::value auto ... xs) noexcept; // 1
//! constexpr auto absmax(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//! constexpr auto absmax(eve::value auto x, eve::value auto ... xs) noexcept; // 1
//! constexpr auto absmax(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//!
//! // Lanes masking
//! constexpr auto absmax[conditional auto c](/* any of the above overloads */) noexcept; // 3
//! constexpr auto absmax[logical_value auto m](/* any of the above overloads */) noexcept; // 3
//! constexpr auto absmax[conditional_expr auto c](/* any of the above overloads */) noexcept; // 3
//! constexpr auto absmax[logical_value auto m](/* any of the above overloads */) noexcept; // 3
//!
//! // Semantic option
//! constexpr auto absmax[saturated](/* any of the above overloads */) noexcept; // 4
//! constexpr auto absmax[saturated](/* any of the above overloads */) noexcept; // 4
//!
//! // Exclusive Semantic options - Only one of those can be set at once
//! constexpr auto absmax[pedantic](/* any of the above overloads */) noexcept; // 5.1
//! constexpr auto absmax[numeric ](/* any of the above overloads */) noexcept; // 5.2
//! constexpr auto absmax[pedantic](/* any of the above overloads */) noexcept; // 5.1
//! constexpr auto absmax[numeric ](/* any of the above overloads */) noexcept; // 5.2
//! }
//! @endcode
//!
Expand Down
14 changes: 7 additions & 7 deletions include/eve/module/core/regular/absmin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ namespace eve
//! namespace eve
//! {
//! // Regular overloads
//! constexpr auto absmin(eve::value auto x, eve::value auto ... xs) noexcept; // 1
//! constexpr auto absmin(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//! constexpr auto absmin(eve::value auto x, eve::value auto ... xs) noexcept; // 1
//! constexpr auto absmin(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//!
//! // Lanes masking
//! constexpr auto absmin[conditional auto c](/* any of the above overloads */) noexcept; // 3
//! constexpr auto absmin[logical_value auto m](/* any of the above overloads */) noexcept; // 3
//! constexpr auto absmin[conditional_expr auto c](/* any of the above overloads */) noexcept; // 3
//! constexpr auto absmin[logical_value auto m](/* any of the above overloads */) noexcept; // 3
//!
//! // Semantic options
//! constexpr auto absmin[saturated](/* any of the above overloads */) noexcept; // 4
//! constexpr auto absmin[saturated](/* any of the above overloads */) noexcept; // 4
//!
//! // Exclusive Semantic options - Only one of those can be set at once
//! constexpr auto absmin[pedantic](/* any of the above overloads */) noexcept; // 5.1
//! constexpr auto absmin[numeric ](/* any of the above overloads */) noexcept; // 5.2
//! constexpr auto absmin[pedantic](/* any of the above overloads */) noexcept; // 5.1
//! constexpr auto absmin[numeric ](/* any of the above overloads */) noexcept; // 5.2
//! }
//! @endcode
//!
Expand Down
6 changes: 3 additions & 3 deletions include/eve/module/core/regular/add.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ namespace eve
//! constexpr auto absmin(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//!
//! // Lanes masking
//! constexpr auto add[conditional_expr auto c](value auto x, value auto ... xs) noexcept; // 3
//! constexpr auto add[logical_value auto m](value auto x, value auto ... xs) noexcept; // 3
//! constexpr auto add[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
//! constexpr auto add[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
//!
//! // Semantic options
//! constexpr auto add[saturated](value auto x, value auto ... xs) noexcept; // 4
//! constexpr auto add[saturated](/*any of the above overloads*/) noexcept; // 4
//! }
//! @endcode
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/average.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace eve
//! constexpr auto average(kumi::non_empty_product_type auto const& tup) noexcept; // 3
//!
//! // Lanes masking
//! constexpr auto average[conditional auto c](/* any of the above overloads */) noexcept; // 4
//! constexpr auto average[conditional_expr auto c](/* any of the above overloads */) noexcept; // 4
//! constexpr auto average[logical_value auto m](/* any of the above overloads */) noexcept; // 4
//!
//! // Semantic options
Expand Down
41 changes: 21 additions & 20 deletions include/eve/module/core/regular/bit_and.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ namespace eve
//! @addtogroup core_bitops
//! @{
//! @var bit_and
//! @brief Computes the bitwise AND of its arguments.
//! @brief `strict_tuple_callable` object computing the bitwise AND of its arguments.
//!
//! **Defined in Header**
//! @groupheader{Header file}
//!
//! @code
//! #include <eve/module/core.hpp>
Expand All @@ -58,39 +58,40 @@ namespace eve
//! @code
//! namespace eve
//! {
//! template< eve::value T, eve::value Ts... >
//! bit_value<T, Ts...> bit_and(T x, Ts... xs) noexcept;
//! // Regular overloads
//! constexpr auto bit_and(value auto x, value auto ... xs) noexcept; // 1
//! constexpr auto bit_and(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//!
//! // Lanes masking
//! constexpr auto bit_and[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
//! constexpr auto bit_and[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
//! }
//! @endcode
//!
//! **Parameters**
//!
//! * `x`: first [argument](@ref eve::value).
//! * `xs...` : other [arguments](@ref eve::value).
//! * `x`: first [argument](@ref eve::value).
//! * `xs...`: other [arguments](@ref eve::value).
//! * `tup`: [non empty tuple](@ref kumi::non_empty_product_type) of arguments.
//! * `c`: [Conditional expression](@ref conditional_expr) masking the operation.
//! * `m`: [Logical value](@ref logical) masking the operation.
//!
//! **Return value**
//! **Return value**
//!
//! The value of the bitwise AND of its arguments converted to the bit_value<T, Ts...>
//! type is returned.
//! 1. The value of the bitwise AND of its arguments converted to the common `bit_value` of the arguments
//! 2. equivalent to the call on the elements of the tuple.
//! 3. [The operation is performed conditionnaly](@ref conditional).
//!
//! @note
//!
//! Although the infix notation with `&` is supported for two parameters, the `&` operator on
//! standard scalar types is the original one and so can lead to automatic promotion.
//! Moreover, and due to C++ limitations is not available for floating point scalar entries.
//!
//! @groupheader{Example}
//! @groupheader{External reference}
//! * [Wikipedia](https://en.wikipedia.org/wiki/Bitwise_operation)
//!
//! @groupheader{Example}
//! @godbolt{doc/core/bit_and.cpp}
//!
//! @groupheader{Semantic Modifiers}
//!
//! * Masked Call
//!
//! The call `eve::bit_and[mask](x, ...)` provides a masked
//! version of `bit_and` which is
//! equivalent to `if_else(mask, bit_and(x, ...), x)`
//!
//! @}
//================================================================================================
inline constexpr auto bit_and = functor<bit_and_t>;
Expand Down
45 changes: 24 additions & 21 deletions include/eve/module/core/regular/bit_andnot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ namespace eve
//! @addtogroup core_bitops
//! @{
//! @var bit_andnot
//! @brief Computes the bitwise ANDNOT of its arguments.
//! @brief `strict_tuple_callable` object computing the bitwise ANDNOT of its arguments.
//!
//! **Defined in Header**
//! @groupheader{Header file}
//!
//! @code
//! #include <eve/module/core.hpp>
Expand All @@ -51,37 +51,40 @@ namespace eve
//! @code
//! namespace eve
//! {
//! template< eve::value T, eve::value Ts... >
//! bit_value<T, Ts...> bit_andnot(T x, Ts... xs) noexcept;
//! // Regular overloads
//! constexpr auto bit_andnot(value auto x, value auto ... xs) noexcept; // 1
//! constexpr auto bit_andnot(kumi::non_empty_product_type auto const& tup) noexcept; // 2
//!
//! // Lanes masking
//! constexpr auto bit_andnot[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
//! constexpr auto bit_andnot[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
//! }
//! @endcode
//!
//! **Parameters**
//!
//! * `x`: first [argument](@ref eve::value).
//! * `xs...` : other [arguments](@ref eve::value).
//!
//! **Return value**
//! * `x`: first [argument](@ref eve::value).
//! * `xs...`: other [arguments](@ref eve::value).
//! * `tup`: [non empty tuple](@ref kumi::non_empty_product_type) of arguments.
//! * `c`: [Conditional expression](@ref conditional_expr) masking the operation.
//! * `m`: [Logical value](@ref logical) masking the operation.
//!
//! * The return value type is bit_value<T, Ts...> Each parameter is converted
//! to this type and then:
//! **Return value**
//! 1. The return value type is to the common `bit_value` of the parameters. Each parameter
//! is converted to this type and then:
//! - For two parameters it computes the bitwise ANDNOT of the two parameters
//! - For more than two parameters the call is semantically equivalent to
//! `bit_andnot(a0, bit_and(xs...))`
//! 2. equivalent to the call on the elements of the tuple.
//! 3. [The operation is performed conditionnaly](@ref conditional).
//!
//! * For two parameters it computes the bitwise ANDNOT of the two parameters
//! * For more than two parameters the call is semantically equivalent to to `bit_andnot(a0,
//! bit_and(xs...))`
//! @groupheader{External references
//! * [Wikipedia](https://en.wikipedia.org/wiki/Bitwise_operation)
//!
//! @groupheader{Example}
//!
//! @godbolt{doc/core/bit_andnot.cpp}
//!
//! @groupheader{Semantic Modifiers}
//!
//! * Masked Call
//!
//! The call `eve::bit_andnot[mask](x, ...)` provides a masked
//! version of `bit_andnot` which is
//! equivalent to `if_else(mask, bit_andnot(x, ...), x)`
//!
//! @}
//================================================================================================
inline constexpr auto bit_andnot = functor<bit_andnot_t>;
Expand Down
12 changes: 6 additions & 6 deletions include/eve/module/core/regular/bit_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace eve
//! @addtogroup core_bitops
//! @{
//! @var bit_cast
//! @brief Computes a a bitwise reinterpretation of an object.
//! @brief Computes a bitwise reinterpretation of an object.
//!
//! **Defined in Header**
//! @groupheader{Header file}
//!
//! @code
//! #include <eve/module/core.hpp>
Expand All @@ -28,8 +28,7 @@ namespace eve
//! @code
//! namespace eve
//! {
//! { template<value From, scalar_value To>
//! To bit_cast operator()(From x, as<To> t) noexcept;
//! template<value From, scalar_value To> To bit_cast operator()(From x, as<To> t) noexcept;
//! }
//! @endcode
//!
Expand All @@ -55,10 +54,11 @@ namespace eve
//! representation produced, the behavior is undefined. If there are multiple
//! such values, which value is produced is unspecified.
//!
//! @groupheader{Example}
//! @groupheader{External reference}
//! * [C++ standard reference](https://en.cppreference.com/w/cpp/numeric/bit_cast)
//!
//! @groupheader{Example}
//! @godbolt{doc/core/bit_cast.cpp}
//!
//! @}
//================================================================================================
inline constexpr auto bit_cast = functor<bit_cast_t>;
Expand Down
35 changes: 16 additions & 19 deletions include/eve/module/core/regular/bit_ceil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ namespace eve
//! @addtogroup core_bitops
//! @{
//! @var bit_ceil
//! @brief Computes the smallest integral power of two that is not smaller than `x`.
//! @brief `elementwise_callable` object computing the smallest integral power
//! of two that is not smaller than `x`.
//!
//! **Defined in Header**
//! @groupheader{Header file}
//!
//! @code
//! #include <eve/module/core.hpp>
Expand All @@ -48,34 +49,30 @@ namespace eve
//! @code
//! namespace eve
//! {
//! template< eve::value T >
//! T bit_ceil(T x) noexcept;
//! // Regular overloads
//! constexpr auto bit_ceil(value auto x) noexcept; // 1
//!
//! // Lanes masking
//! constexpr auto bit_ceil[conditional_expr auto c](value auto x) noexcept; // 2
//! constexpr auto bit_ceil[logical_value auto m](value auto x) noexcept; // 2
//! }
//! @endcode
//!
//! **Parameters**
//!
//! * `x` : [argument](@ref eve::value).
//! * `x`: [argument](@ref eve::value).
//! * `c`: [Conditional expression](@ref conditional_expr) masking the operation.
//! * `m`: [Logical value](@ref logical) masking the operation.
//!
//! **Return value**
//!
//! The value of the smallest integral power of two that is not smaller than `x`
//! is returned.
//!
//! If that value is not representable in `T`, the behavior is undefined.
//! 1. The value of the smallest integral power of two that is not smaller than `x`
//! is returned. If that value is not representable in the input type,
//! the behavior is undefined.
//! 2. [The operation is performed conditionnaly](@ref conditional).
//!
//! @groupheader{Example}
//!
//! @godbolt{doc/core/bit_ceil.cpp}
//!
//! @groupheader{Semantic Modifiers}
//!
//! * Masked Call
//!
//! The call `eve::bit_ceil[mask](x, ...)` provides a masked
//! version of `bit_ceil` which is
//! equivalent to `if_else(mask, bit_ceil(x, ...), x)`
//!
//! @}
//================================================================================================
inline constexpr auto bit_ceil = functor<bit_ceil_t>;
Expand Down
Loading

0 comments on commit 7011bac

Please sign in to comment.