35 #ifndef _BLAZE_MATH_VIEWS_ROWS_ROWSDATA_H_ 36 #define _BLAZE_MATH_VIEWS_ROWS_ROWSDATA_H_ 69 template<
typename... CRAs >
94 struct RowsData< index_sequence<I,Is...> >
98 static constexpr
size_t N =
sizeof...( Is ) + 1UL;
105 template<
typename... RRAs >
106 explicit inline RowsData( RRAs... args ) noexcept;
108 RowsData(
const RowsData& ) =
default;
115 ~RowsData() =
default;
122 RowsData& operator=(
const RowsData& ) =
delete;
129 inline static constexpr decltype(
auto) idces() noexcept;
130 inline static constexpr
size_t idx (
size_t i ) noexcept;
131 inline static constexpr
size_t rows () noexcept;
137 using Indices =
std::array<
size_t,N>;
143 static constexpr Indices indices_{ { I, Is... } };
157 constexpr
typename RowsData< index_sequence<I,Is...> >::Indices
158 RowsData< index_sequence<I,Is...> >::indices_;
172 template<
typename... RRAs >
173 inline RowsData< index_sequence<I,Is...> >::RowsData( RRAs... args ) noexcept
189 inline constexpr decltype(
auto) RowsData< index_sequence<I,Is...> >::idces() noexcept
191 return index_sequence<I,Is...>();
206 inline constexpr
size_t RowsData< index_sequence<I,Is...> >::idx(
size_t i ) noexcept
223 inline constexpr
size_t RowsData< index_sequence<I,Is...> >
::rows() noexcept
247 template<
typename P >
252 static constexpr
size_t N = 0UL;
259 template<
typename... RRAs >
260 explicit inline RowsData( P p,
size_t n, RRAs... args ) noexcept;
262 RowsData(
const RowsData& ) =
default;
263 RowsData( RowsData&& ) =
default;
270 ~RowsData() =
default;
277 RowsData& operator=(
const RowsData& ) =
delete;
278 RowsData& operator=( RowsData&& ) =
delete;
285 inline decltype(
auto) idces() const noexcept;
286 inline
size_t idx (
size_t i ) const noexcept;
287 inline
size_t rows () const noexcept;
312 template< typename P >
313 template< typename... RRAs >
314 inline RowsData<P>::RowsData( P p,
size_t n, RRAs... args ) noexcept
330 template<
typename P >
331 inline decltype(
auto) RowsData<P>::idces() const noexcept
333 return std::make_pair( p_,
n_ );
346 template<
typename P >
347 inline size_t RowsData<P>::idx(
size_t i )
const noexcept
362 template<
typename P >
392 static constexpr
size_t N = 0UL;
399 template<
typename T,
typename... RRAs >
400 explicit inline RowsData(
const T* indices,
size_t n, RRAs... args );
402 RowsData(
const RowsData& ) =
default;
403 RowsData( RowsData&& ) =
default;
410 ~RowsData() =
default;
417 RowsData& operator=(
const RowsData& ) =
delete;
424 inline decltype(
auto) idces() const noexcept;
425 inline
size_t idx (
size_t i ) const noexcept;
426 inline
size_t rows () const noexcept;
432 using Indices = SmallArray<
size_t,8UL>;
456 inline RowsData<>::RowsData( const T* indices,
size_t n, RRAs... args )
457 : indices_( indices, indices+n )
471 inline decltype(
auto) RowsData<>::idces() const noexcept
473 return const_cast<const Indices&
>( indices_ );
488 inline size_t RowsData<>::idx(
size_t i )
const noexcept
505 return indices_.size();
528 template<
typename... CRAs1,
typename... CRAs2 >
529 inline constexpr
bool 530 compareIndices(
const RowsData<CRAs1...>& lhs,
const RowsData<CRAs2...>& rhs ) noexcept
532 if( lhs.rows() != rhs.rows() )
535 for(
size_t i=0UL; i<lhs.rows(); ++i ) {
536 if( lhs.idx(i) != rhs.idx(i) )
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the SmallArray implementation.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for run time assertion macros.
Header file for the integer_sequence and index_sequence aliases.
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
size_t n_
The current number of columns of the compressed matrix.
Definition: CompressedMatrix.h:3290
C++-standard-specific system settings.