batmat 0.0.16
Batched linear algebra routines
Loading...
Searching...
No Matches
batmat::ops::detail Namespace Reference

Conditional negation of floating point numbers

template<class T>
cneg (T x, T signs)
 Conditionally negates the sign bit of x, depending on signs, which should contain only ±0 (i.e.
template<class T, class Abi>
cneg (T x, T signs)
 Conditionally negates the sign bit of x, depending on signs, which should contain only ±0 (i.e.
template<class T, class Abi>
datapar::simd< T, Abi > cneg (datapar::simd< T, Abi > x, datapar::simd< T, Abi > signs)
 Conditionally negates the sign bit of x, depending on signs, which should contain only ±0 (i.e.

Classes

struct  floating_point_to_int
struct  floating_point_to_int< float >
struct  floating_point_to_int< double >
struct  mask_type

Concepts

concept  same_size_but_different_ints

Typedefs

template<class T>
using floating_point_to_int_t = typename floating_point_to_int<T>::type
template<std::integral I>
using convert_int_t = decltype(convert_int(std::declval<I>()))
template<class T, class AbiT>
using mask_type_t = typename mask_type<T, AbiT>::type

Functions

template<class T, class AbiT, class I, class AbiI>
datapar::simd< T, AbiT > gather (datapar::simd< T, AbiT > src, typename datapar::simd< T, AbiT >::mask_type mask, datapar::simd< I, AbiI > vindex, const T *base_addr)
template<std::integral I>
auto convert_int (I i)
template<class T, class AbiT, class M>
mask_type_t< T, AbiT > convert_mask (M mask)
 Convert a SIMD mask to the appropriate intrinsic type.
template<class T, class Abi>
auto compare_ge_0 (datapar::simd< T, Abi > x)
template<class F, class Abi>
datapar::simd< F, Abi > rot (datapar::simd< F, Abi > x, int s)
 Rotate the elements of x to the right by s positions.
template<int S, class F, class Abi>
datapar::simd< F, Abi > rotl (datapar::simd< F, Abi > x)
template<int S, class F, class Abi>
datapar::simd< F, Abi > rotr (datapar::simd< F, Abi > x)
template<int S, class F, class Abi>
datapar::simd< F, Abi > shiftl (datapar::simd< F, Abi > x)
template<int S, class F, class Abi>
datapar::simd< F, Abi > shiftr (datapar::simd< F, Abi > x)
template<class T, class Abi>
datapar::simd< T, Abi > rsqrt_1 (datapar::simd< T, Abi > x)
 rsqrt_0 with a single Newton iteration of refinement.
template<class T, class Abi>
datapar::simd< T, Abi > rsqrt_2 (datapar::simd< T, Abi > x)
 rsqrt_0 with two Newton iterations of refinement.

Class Documentation

◆ batmat::ops::detail::floating_point_to_int

struct batmat::ops::detail::floating_point_to_int

◆ batmat::ops::detail::floating_point_to_int< float >

struct batmat::ops::detail::floating_point_to_int< float >
Class Members
typedef uint32_t type std::uint32_t

◆ batmat::ops::detail::floating_point_to_int< double >

struct batmat::ops::detail::floating_point_to_int< double >
Class Members
typedef uint64_t type std::uint64_t

◆ batmat::ops::detail::mask_type

struct batmat::ops::detail::mask_type
Class Members
typedef typename mask_type type typename datapar::simd<T, Abi>::mask_type

Typedef Documentation

◆ floating_point_to_int_t

template<class T>
using batmat::ops::detail::floating_point_to_int_t = typename floating_point_to_int<T>::type

Definition at line 30 of file cneg.hpp.

◆ convert_int_t

template<std::integral I>
using batmat::ops::detail::convert_int_t = decltype(convert_int(std::declval<I>()))

Definition at line 34 of file gather.hpp.

◆ mask_type_t

template<class T, class AbiT>
using batmat::ops::detail::mask_type_t = typename mask_type<T, AbiT>::type

Definition at line 14 of file mask.hpp.

Function Documentation

◆ gather()

template<class T, class AbiT, class I, class AbiI>
datapar::simd< T, AbiT > batmat::ops::detail::gather ( datapar::simd< T, AbiT > src,
typename datapar::simd< T, AbiT >::mask_type mask,
datapar::simd< I, AbiI > vindex,
const T * base_addr )
inline

Definition at line 12 of file gather.hpp.

◆ convert_int()

template<std::integral I>
auto batmat::ops::detail::convert_int ( I i)

Definition at line 22 of file gather.hpp.

◆ convert_mask()

template<class T, class AbiT, class M>
mask_type_t< T, AbiT > batmat::ops::detail::convert_mask ( M mask)
inline

Convert a SIMD mask to the appropriate intrinsic type.

If M is not a mask type, its values are compared to zero to create a mask.

Definition at line 21 of file mask.hpp.

◆ compare_ge_0()

template<class T, class Abi>
auto batmat::ops::detail::compare_ge_0 ( datapar::simd< T, Abi > x)
inline

Definition at line 34 of file mask.hpp.

◆ rot()

template<class F, class Abi>
datapar::simd< F, Abi > batmat::ops::detail::rot ( datapar::simd< F, Abi > x,
int s )
inline

Rotate the elements of x to the right by s positions.

For example, rotr<1>([x0, x1, x2, x3]) == [x3, x0, x1, x2] and rotr<-1>([x0, x1, x2, x3]) == [x1, x2, x3, x0].

Definition at line 18 of file rotate.hpp.

◆ rotl()

template<int S, class F, class Abi>
datapar::simd< F, Abi > batmat::ops::detail::rotl ( datapar::simd< F, Abi > x)
inline

Definition at line 26 of file rotate.hpp.

◆ rotr()

template<int S, class F, class Abi>
datapar::simd< F, Abi > batmat::ops::detail::rotr ( datapar::simd< F, Abi > x)
inline

Definition at line 33 of file rotate.hpp.

◆ shiftl()

template<int S, class F, class Abi>
datapar::simd< F, Abi > batmat::ops::detail::shiftl ( datapar::simd< F, Abi > x)
inline

Definition at line 40 of file rotate.hpp.

◆ shiftr()

template<int S, class F, class Abi>
datapar::simd< F, Abi > batmat::ops::detail::shiftr ( datapar::simd< F, Abi > x)
inline

Definition at line 47 of file rotate.hpp.

◆ rsqrt_1()

template<class T, class Abi>
datapar::simd< T, Abi > batmat::ops::detail::rsqrt_1 ( datapar::simd< T, Abi > x)

rsqrt_0 with a single Newton iteration of refinement.

Definition at line 64 of file rsqrt.hpp.

◆ rsqrt_2()

template<class T, class Abi>
datapar::simd< T, Abi > batmat::ops::detail::rsqrt_2 ( datapar::simd< T, Abi > x)

rsqrt_0 with two Newton iterations of refinement.

Definition at line 72 of file rsqrt.hpp.