5#include "../Defines.hpp"
24 template <
typename index_T = index>
44 return __p_indices[j];
50 return __p_indices[j];
54 operator std::vector<index>() const
56 return {__p_indices, __p_indices + __Row_size};
63 std::copy(
r.begin(),
r.end(), __p_indices);
70 std::copy(
r.cbegin(),
r.cend(), __p_indices);
#define DNDS_DEVICE_CALLABLE
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
Non-owning span (pointer, size) into an ArrayAdjacency row.
DNDS_DEVICE_CALLABLE index_T operator[](rowsize j) const
DNDS_DEVICE_CALLABLE index_T * cbegin() const
DNDS_DEVICE_CALLABLE AdjacencyRow(index_T *ptr, rowsize siz)
Construct a span from raw pointer and size.
DNDS_DEVICE_CALLABLE index_T * cend() const
DNDS_DEVICE_CALLABLE index_T & operator[](rowsize j)
Bounds-checked (debug) element access.
DNDS_DEVICE_CALLABLE index_T * end()
void operator=(const std::vector< index > &r)
Overwrite the row from a vector of the same size.
DNDS_DEVICE_CALLABLE AdjacencyRow()=default
the copy is not trivial!
DNDS_DEVICE_CALLABLE AdjacencyRow(const AdjacencyRow &)=default
DNDS_DEVICE_CALLABLE ~AdjacencyRow()=default
DNDS_DEVICE_CALLABLE void operator=(const AdjacencyRow &r)
Copy contents of another span (same size required).
DNDS_DEVICE_CALLABLE index_T * begin()
DNDS_DEVICE_CALLABLE rowsize size() const
Row width in number of index_T elements.
the host side operators are provided as implemented
int32_t rowsize
Row-width / per-row element-count type (signed 32-bit).