Eigen::internal::sparse_reserve_op< StorageIndex > Struct Template Reference

#include <SparseMatrix.h>

Public Member Functions

EIGEN_DEVICE_FUNC sparse_reserve_op (Index begin, Index end, Index size)
 
template<typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageIndex operator() (IndexType i) const
 

Public Attributes

StorageIndex m_val
 
StorageIndex m_remainder
 
Index m_begin
 
Index m_end
 

Constructor & Destructor Documentation

◆ sparse_reserve_op()

template<typename StorageIndex >
EIGEN_DEVICE_FUNC Eigen::internal::sparse_reserve_op< StorageIndex >::sparse_reserve_op ( Index  begin,
Index  end,
Index  size 
)
inline
95  {
96  Index range = numext::mini(end - begin, size);
97  m_begin = begin;
98  m_end = begin + range;
99  m_val = StorageIndex(size / range);
100  m_remainder = StorageIndex(size % range);
101  }
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
static constexpr lastp1_t end
Definition: IndexedViewHelper.h:79
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: MathFunctions.h:920
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
StorageIndex m_remainder
Definition: SparseMatrix.h:109
Index m_end
Definition: SparseMatrix.h:110
StorageIndex m_val
Definition: SparseMatrix.h:109
Index m_begin
Definition: SparseMatrix.h:110

References Eigen::placeholders::end, Eigen::internal::sparse_reserve_op< StorageIndex >::m_begin, Eigen::internal::sparse_reserve_op< StorageIndex >::m_end, Eigen::internal::sparse_reserve_op< StorageIndex >::m_remainder, Eigen::internal::sparse_reserve_op< StorageIndex >::m_val, Eigen::numext::mini(), and size.

Member Function Documentation

◆ operator()()

template<typename StorageIndex >
template<typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageIndex Eigen::internal::sparse_reserve_op< StorageIndex >::operator() ( IndexType  i) const
inline

Member Data Documentation

◆ m_begin

◆ m_end

◆ m_remainder

◆ m_val


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