TDLS 0.2.0
Tiny Device-callable Linear Solvers
Loading...
Searching...
No Matches
tdls::detail::pivot_access< PivotType, N > Struct Template Reference

Pivot argument unwrapping: accepts a raw int pointer/array (treated as contiguous caller-local storage) or any int object with storage_traits, vector-like and of the system dimension when both are fixed-size. More...

#include <adaptors.hpp>

Static Public Member Functions

TDLS_HOST_DEVICE static TDLS_FORCEINLINE constexpr int * pointer (const PivotType &p) noexcept
 
TDLS_HOST_DEVICE static TDLS_FORCEINLINE constexpr int stride (const PivotType &p) noexcept
 

Static Public Attributes

static constexpr bool is_raw
 true for a raw int pointer or int array
 
static constexpr bool is_dense = has_storage_traits<std::remove_cv_t<PivotType>>::value
 true for an object with storage_traits
 
static constexpr bool has_matching_shape
 true when the pivot is vector-like, of the system dimension when both are fixed-size
 
static constexpr bool is_mutable
 true when the pivot argument may be written (non-const object, non-const pointee for raw pointers)
 
static constexpr bool is_internal
 true when the pivot storage is compile-time contiguous
 

Detailed Description

template<typename PivotType, int N>
struct tdls::detail::pivot_access< PivotType, N >

Pivot argument unwrapping: accepts a raw int pointer/array (treated as contiguous caller-local storage) or any int object with storage_traits, vector-like and of the system dimension when both are fixed-size.

Template Parameters
PivotTypepivot argument type (without references)
Nsystem dimension (0 on the runtime path)

Member Function Documentation

◆ pointer()

template<typename PivotType , int N>
TDLS_HOST_DEVICE static TDLS_FORCEINLINE constexpr int * tdls::detail::pivot_access< PivotType, N >::pointer ( const PivotType & p)
inlinestaticconstexprnoexcept
Returns
the pivot element pointer
Parameters
[in]ppivot argument

◆ stride()

template<typename PivotType , int N>
TDLS_HOST_DEVICE static TDLS_FORCEINLINE constexpr int tdls::detail::pivot_access< PivotType, N >::stride ( const PivotType & p)
inlinestaticconstexprnoexcept
Returns
the pivot element stride
Parameters
[in]ppivot argument

Member Data Documentation

◆ has_matching_shape

template<typename PivotType , int N>
bool tdls::detail::pivot_access< PivotType, N >::has_matching_shape
staticconstexpr
Initial value:
= [] {
if constexpr (is_raw) {
return true;
} else {
return pt::arity == 1 && (N == 0 || pt::has_runtime_extents || pt::extent0 == N);
}
}()
static constexpr bool is_raw
true for a raw int pointer or int array
Definition adaptors.hpp:546
Storage description of a dense object: element type, extents, element pointer and element stride.
Definition adaptors.hpp:181

true when the pivot is vector-like, of the system dimension when both are fixed-size

◆ is_internal

template<typename PivotType , int N>
bool tdls::detail::pivot_access< PivotType, N >::is_internal
staticconstexpr
Initial value:
= [] {
if constexpr (is_raw) {
return true;
} else {
}
}()
static constexpr bool is_internal
true when the pivot storage is compile-time contiguous
Definition adaptors.hpp:579

true when the pivot storage is compile-time contiguous

◆ is_mutable

template<typename PivotType , int N>
bool tdls::detail::pivot_access< PivotType, N >::is_mutable
staticconstexpr
Initial value:
= [] {
if constexpr (is_raw) {
return !std::is_const_v<std::remove_pointer_t<std::decay_t<PivotType>>>;
} else {
return !std::is_const_v<PivotType> &&
}
}()
static constexpr bool is_mutable
true when the pivot argument may be written (non-const object, non-const pointee for raw pointers)
Definition adaptors.hpp:569

true when the pivot argument may be written (non-const object, non-const pointee for raw pointers)

◆ is_raw

template<typename PivotType , int N>
bool tdls::detail::pivot_access< PivotType, N >::is_raw
staticconstexpr
Initial value:
=
std::is_pointer_v<std::decay_t<PivotType>> &&
std::is_same_v<std::remove_cv_t<std::remove_pointer_t<std::decay_t<PivotType>>>, int>

true for a raw int pointer or int array


The documentation for this struct was generated from the following file: