numerics 0.1.0
Loading...
Searching...
No Matches
num::kernel::reduce Namespace Reference

Functions

real l1_norm (const Vector &x, seq_t) noexcept
 Sequential: calls raw::l1_norm (routes to cblas_dasum when BLAS available; otherwise auto-vectorizable seq loop).
 
real l1_norm (const Vector &x, par_t)
 Parallel: OMP reduction(+) over abs values; falls back to seq_t when NUMERICS_HAS_OMP is not defined.
 
real l1_norm (const Vector &x)
 Default policy.
 
real linf_norm (const Vector &x, seq_t) noexcept
 Sequential: calls raw::linf_norm (routes to cblas_idamax when BLAS available; otherwise plain max loop).
 
real linf_norm (const Vector &x, par_t)
 Parallel: OMP reduction(max) over abs values; falls back to seq_t when NUMERICS_HAS_OMP is not defined.
 
real linf_norm (const Vector &x)
 Default policy.
 
real sum (const Vector &x, seq_t) noexcept
 Sequential: auto-vectorizable summation loop (no BLAS equivalent).
 
real sum (const Vector &x, par_t)
 Parallel: OMP reduction(+) over x[i]; falls back to seq_t when NUMERICS_HAS_OMP is not defined.
 
real sum (const Vector &x)
 Default policy.
 

Function Documentation

◆ l1_norm() [1/3]

real num::kernel::reduce::l1_norm ( const Vector x)
inline

Default policy.

Definition at line 37 of file reduce.hpp.

References l1_norm().

◆ l1_norm() [2/3]

real num::kernel::reduce::l1_norm ( const Vector x,
par_t   
)

Parallel: OMP reduction(+) over abs values; falls back to seq_t when NUMERICS_HAS_OMP is not defined.

Definition at line 24 of file reduce.cpp.

References num::BasicVector< T >::data(), l1_norm(), and num::BasicVector< T >::size().

◆ l1_norm() [3/3]

real num::kernel::reduce::l1_norm ( const Vector x,
seq_t   
)
noexcept

Sequential: calls raw::l1_norm (routes to cblas_dasum when BLAS available; otherwise auto-vectorizable seq loop).

Definition at line 20 of file reduce.cpp.

References num::kernel::raw::l1_norm().

Referenced by l1_norm(), and l1_norm().

◆ linf_norm() [1/3]

real num::kernel::reduce::linf_norm ( const Vector x)
inline

Default policy.

Definition at line 54 of file reduce.hpp.

References linf_norm().

◆ linf_norm() [2/3]

real num::kernel::reduce::linf_norm ( const Vector x,
par_t   
)

Parallel: OMP reduction(max) over abs values; falls back to seq_t when NUMERICS_HAS_OMP is not defined.

Definition at line 47 of file reduce.cpp.

References num::BasicVector< T >::data(), linf_norm(), and num::BasicVector< T >::size().

◆ linf_norm() [3/3]

real num::kernel::reduce::linf_norm ( const Vector x,
seq_t   
)
noexcept

Sequential: calls raw::linf_norm (routes to cblas_idamax when BLAS available; otherwise plain max loop).

Definition at line 43 of file reduce.cpp.

References num::kernel::raw::linf_norm().

Referenced by linf_norm(), and linf_norm().

◆ sum() [1/3]

real num::kernel::reduce::sum ( const Vector x)
inline

Default policy.

Definition at line 70 of file reduce.hpp.

References sum().

◆ sum() [2/3]

real num::kernel::reduce::sum ( const Vector x,
par_t   
)

Parallel: OMP reduction(+) over x[i]; falls back to seq_t when NUMERICS_HAS_OMP is not defined.

Definition at line 73 of file reduce.cpp.

References num::BasicVector< T >::data(), num::BasicVector< T >::size(), and sum().

◆ sum() [3/3]

real num::kernel::reduce::sum ( const Vector x,
seq_t   
)
noexcept

Sequential: auto-vectorizable summation loop (no BLAS equivalent).

Definition at line 69 of file reduce.cpp.

References num::kernel::raw::sum().

Referenced by sum(), and sum().