35#ifndef _BLAZE_MATH_VIEWS_ELEMENTS_ELEMENTSDATA_H_
36#define _BLAZE_MATH_VIEWS_ELEMENTS_ELEMENTSDATA_H_
71template<
typename... CEAs >
100 static constexpr size_t N =
sizeof...( Is ) + 1UL;
110 static constexpr bool compileTimeArgs =
true;
116 template<
typename... REAs >
117 explicit inline ElementsData( REAs... args )
noexcept;
119 ElementsData(
const ElementsData& ) =
default;
126 ~ElementsData() =
default;
133 ElementsData& operator=(
const ElementsData& ) =
delete;
140 static constexpr decltype(
auto) idces()
noexcept;
141 static constexpr size_t idx (
size_t i )
noexcept;
142 static constexpr size_t size () noexcept;
148 using Indices = std::array<
size_t,N>;
154 static constexpr Indices indices_{ { I, Is... } };
168constexpr typename ElementsData<
index_sequence<I,Is...> >::Indices
183template<
typename... REAs >
184inline ElementsData<
index_sequence<I,Is...> >::ElementsData( REAs... args )
noexcept
217constexpr size_t ElementsData<
index_sequence<I,Is...> >::idx(
size_t i )
noexcept
258template<
typename P >
263 static constexpr size_t N = 0UL;
273 static constexpr bool compileTimeArgs =
false;
279 template<
typename... REAs >
280 inline ElementsData( P p,
size_t n, REAs... args )
noexcept;
282 ElementsData(
const ElementsData& ) =
default;
283 ElementsData( ElementsData&& ) =
default;
290 ~ElementsData() =
default;
297 ElementsData& operator=(
const ElementsData& ) =
delete;
298 ElementsData& operator=( ElementsData&& ) =
delete;
305 inline decltype(
auto) idces()
const noexcept;
306 inline size_t idx (
size_t i )
const noexcept;
307 inline size_t size () const noexcept;
332template< typename P >
333template< typename... REAs >
334inline ElementsData<P>::ElementsData( P p,
size_t n, REAs... args ) noexcept
350template<
typename P >
351inline decltype(
auto) ElementsData<P>::idces()
const noexcept
353 return std::make_pair( p_, n_ );
366template<
typename P >
367inline size_t ElementsData<P>::idx(
size_t i )
const noexcept
382template<
typename P >
412 static constexpr size_t N = 0UL;
422 static constexpr bool compileTimeArgs =
false;
428 template<
typename T,
typename... REAs >
429 inline ElementsData( T* indices,
size_t n, REAs... args );
431 ElementsData(
const ElementsData& ) =
default;
432 ElementsData( ElementsData&& ) =
default;
439 ~ElementsData() =
default;
446 ElementsData& operator=(
const ElementsData& ) =
delete;
453 inline decltype(
auto) idces()
const noexcept;
454 inline size_t idx (
size_t i )
const noexcept;
455 inline size_t size () const noexcept;
461 using Indices = SmallArray<
size_t,8UL>;
485inline ElementsData<>::ElementsData( T* indices,
size_t n, REAs... args )
486 : indices_( indices, indices+n )
500inline decltype(
auto) ElementsData<>::idces()
const noexcept
517inline size_t ElementsData<>::idx(
size_t i )
const noexcept
534 return indices_.size();
557template<
typename... CEAs1,
typename... CEAs2 >
559 compareIndices(
const ElementsData<CEAs1...>& lhs,
const ElementsData<CEAs2...>& rhs )
noexcept
561 if( lhs.size() != rhs.size() )
564 for(
size_t i=0UL; i<lhs.size(); ++i ) {
565 if( lhs.idx(i) != rhs.idx(i) )
Header file for the as_const function template.
Header file for run time assertion macros.
Header file for the integer_sequence and index_sequence aliases.
Header file for the MAYBE_UNUSED function template.
Header file for the SmallArray implementation.
C++-standard-specific system settings.
Index sequence type of the Blaze library.
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:676
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
constexpr AddConst_t< T > & as_const(T &v) noexcept
Adding 'const' to the given lvalue.
Definition: AsConst.h:64
Header file for basic type definitions.