35 #ifndef _BLAZE_MATH_VIEWS_ELEMENTS_ELEMENTSDATA_H_ 36 #define _BLAZE_MATH_VIEWS_ELEMENTS_ELEMENTSDATA_H_ 69 template<
typename... CEAs >
94 class ElementsData< index_sequence<I,Is...> >
98 static constexpr
size_t N =
sizeof...( Is ) + 1UL;
108 static constexpr
bool compileTimeArgs =
true;
114 template<
typename... REAs >
115 explicit inline ElementsData( REAs... args ) noexcept;
117 ElementsData(
const ElementsData& ) =
default;
124 ~ElementsData() =
default;
131 ElementsData& operator=(
const ElementsData& ) =
delete;
138 static inline constexpr decltype(
auto) idces() noexcept;
139 static inline constexpr
size_t idx (
size_t i ) noexcept;
140 static inline constexpr
size_t size () noexcept;
146 using Indices = std::array<
size_t,N>;
152 static constexpr Indices indices_{ { I, Is... } };
166 constexpr
typename ElementsData< index_sequence<I,Is...> >::Indices
167 ElementsData< index_sequence<I,Is...> >::indices_;
181 template<
typename... REAs >
182 inline ElementsData< index_sequence<I,Is...> >::ElementsData( REAs... args ) noexcept
198 inline constexpr decltype(
auto) ElementsData< index_sequence<I,Is...> >::idces() noexcept
200 return index_sequence<I,Is...>();
215 inline constexpr
size_t ElementsData< index_sequence<I,Is...> >::idx(
size_t i ) noexcept
232 inline constexpr
size_t ElementsData< index_sequence<I,Is...> >
::size() noexcept
256 template<
typename P >
257 class ElementsData<P>
261 static constexpr
size_t N = 0UL;
271 static constexpr
bool compileTimeArgs =
false;
277 template<
typename... REAs >
278 explicit inline ElementsData( P p,
size_t n, REAs... args ) noexcept;
280 ElementsData(
const ElementsData& ) =
default;
281 ElementsData( ElementsData&& ) =
default;
288 ~ElementsData() =
default;
295 ElementsData& operator=(
const ElementsData& ) =
delete;
296 ElementsData& operator=( ElementsData&& ) =
delete;
303 inline decltype(
auto) idces() const noexcept;
304 inline
size_t idx (
size_t i ) const noexcept;
305 inline
size_t size () const noexcept;
330 template< typename P >
331 template< typename... REAs >
332 inline ElementsData<P>::ElementsData( P p,
size_t n, REAs... args ) noexcept
348 template<
typename P >
349 inline decltype(
auto) ElementsData<P>::idces() const noexcept
351 return std::make_pair( p_, n_ );
364 template<
typename P >
365 inline size_t ElementsData<P>::idx(
size_t i )
const noexcept
380 template<
typename P >
410 static constexpr
size_t N = 0UL;
420 static constexpr
bool compileTimeArgs =
false;
426 template<
typename T,
typename... REAs >
427 explicit inline ElementsData( T* indices,
size_t n, REAs... args );
429 ElementsData(
const ElementsData& ) =
default;
430 ElementsData( ElementsData&& ) =
default;
437 ~ElementsData() =
default;
444 ElementsData& operator=(
const ElementsData& ) =
delete;
451 inline decltype(
auto) idces() const noexcept;
452 inline
size_t idx (
size_t i ) const noexcept;
453 inline
size_t size () const noexcept;
459 using Indices = SmallArray<
size_t,8UL>;
483 inline ElementsData<>::ElementsData( T* indices,
size_t n, REAs... args )
484 : indices_( indices, indices+n )
498 inline decltype(
auto) ElementsData<>::idces() const noexcept
500 return const_cast<const Indices&>( indices_ );
515 inline size_t ElementsData<>::idx(
size_t i )
const noexcept
532 return indices_.size();
555 template<
typename... CEAs1,
typename... CEAs2 >
556 inline constexpr
bool 557 compareIndices(
const ElementsData<CEAs1...>& lhs,
const ElementsData<CEAs2...>& rhs ) noexcept
559 if( lhs.size() != rhs.size() )
562 for(
size_t i=0UL; i<lhs.size(); ++i ) {
563 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,...
Definition: Assert.h:117
Header file for basic type definitions.
Header file for the MAYBE_UNUSED function template.
Header file for the SmallArray implementation.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
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.
C++-standard-specific system settings.