35 #ifndef _BLAZE_MATH_VIEWS_ELEMENTS_ELEMENTSDATA_H_ 36 #define _BLAZE_MATH_VIEWS_ELEMENTS_ELEMENTSDATA_H_ 69 template<
typename... CEAs >
94 struct ElementsData< index_sequence<I,Is...> >
98 static constexpr
size_t N =
sizeof...( Is ) + 1UL;
105 template<
typename... REAs >
106 explicit inline ElementsData( REAs... args ) noexcept;
108 ElementsData(
const ElementsData& ) =
default;
115 ~ElementsData() =
default;
122 ElementsData& operator=(
const ElementsData& ) =
delete;
129 static inline constexpr decltype(
auto) idces() noexcept;
130 static inline constexpr
size_t idx (
size_t i ) noexcept;
131 static inline constexpr
size_t size () noexcept;
137 using Indices =
std::array<
size_t,N>;
143 static constexpr Indices indices_{ { I, Is... } };
157 constexpr
typename ElementsData< index_sequence<I,Is...> >::Indices
158 ElementsData< index_sequence<I,Is...> >::indices_;
172 template<
typename... REAs >
173 inline ElementsData< index_sequence<I,Is...> >::ElementsData( REAs... args ) noexcept
189 inline constexpr decltype(
auto) ElementsData< index_sequence<I,Is...> >::idces() noexcept
191 return index_sequence<I,Is...>();
206 inline constexpr
size_t ElementsData< index_sequence<I,Is...> >::idx(
size_t i ) noexcept
223 inline constexpr
size_t ElementsData< index_sequence<I,Is...> >
::size() noexcept
247 template<
typename P >
248 struct ElementsData<P>
252 static constexpr
size_t N = 0UL;
259 template<
typename... REAs >
260 explicit inline ElementsData( P p,
size_t n, REAs... args ) noexcept;
262 ElementsData(
const ElementsData& ) =
default;
263 ElementsData( ElementsData&& ) =
default;
270 ~ElementsData() =
default;
277 ElementsData& operator=(
const ElementsData& ) =
delete;
278 ElementsData& operator=( ElementsData&& ) =
delete;
285 inline decltype(
auto) idces() const noexcept;
286 inline
size_t idx (
size_t i ) const noexcept;
287 inline
size_t size () const noexcept;
312 template< typename P >
313 template< typename... REAs >
314 inline ElementsData<P>::ElementsData( P p,
size_t n, REAs... args ) noexcept
330 template<
typename P >
331 inline decltype(
auto) ElementsData<P>::idces() const noexcept
333 return std::make_pair( p_,
n_ );
346 template<
typename P >
347 inline size_t ElementsData<P>::idx(
size_t i )
const noexcept
362 template<
typename P >
388 struct ElementsData<>
392 static constexpr
size_t N = 0UL;
399 template<
typename T,
typename... REAs >
400 explicit inline ElementsData(
const T* indices,
size_t n, REAs... args );
402 ElementsData(
const ElementsData& ) =
default;
403 ElementsData( ElementsData&& ) =
default;
410 ~ElementsData() =
default;
417 ElementsData& operator=(
const ElementsData& ) =
delete;
424 inline decltype(
auto) idces() const noexcept;
425 inline
size_t idx (
size_t i ) const noexcept;
426 inline
size_t size () const noexcept;
432 using Indices = SmallArray<
size_t,8UL>;
456 inline ElementsData<>::ElementsData( const T* indices,
size_t n, REAs... args )
457 : indices_( indices, indices+n )
471 inline decltype(
auto) ElementsData<>::idces() const noexcept
473 return const_cast<const Indices&
>( indices_ );
488 inline size_t ElementsData<>::idx(
size_t i )
const noexcept
505 return indices_.size();
528 template<
typename... CEAs1,
typename... CEAs2 >
529 inline constexpr
bool 530 compareIndices(
const ElementsData<CEAs1...>& lhs,
const ElementsData<CEAs2...>& rhs ) noexcept
532 if( lhs.size() != rhs.size() )
535 for(
size_t i=0UL; i<lhs.size(); ++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.
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Header file for the integer_sequence and index_sequence aliases.
size_t n_
The current number of columns of the compressed matrix.
Definition: CompressedMatrix.h:3290
C++-standard-specific system settings.