|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Subrange of a resource, corresponding to one of a fixed number of chunks that the resource has been divded into. More...
#include <GREM/execution/Chunk.hpp>
Public Types | |
| using | resource_type = std::remove_const_t<Resource> |
| using | iterator = decltype(std::begin(std::invoke(Projection, std::declval<Resource&>()))) |
| using | size_type = decltype(std::size(std::invoke(Projection, std::declval<Resource&>()))) |
| using | difference_type = iter_difference_t<iterator> |
Public Member Functions | |
| constexpr | Chunk (Resource &resource, size_t chunkIndex, size_t chunkCount) |
| Construct a resource chunk. | |
| constexpr iterator | begin () const noexcept |
| constexpr iterator | end () const noexcept |
| constexpr bool | empty () const noexcept |
| constexpr size_type | size () const noexcept |
| constexpr auto | data () const |
| constexpr decltype(auto) | front () const |
| constexpr decltype(auto) | back () const |
| constexpr decltype(auto) | operator[] (size_type pos) const |
Subrange of a resource, corresponding to one of a fixed number of chunks that the resource has been divded into.
| Resource | resource type that the chunk is a subrange of, potentially const-qualified to indicate read-only access. |
| Projection | function object that gets the full range of elements from the resource that is to be chunked. The default projection assumes that the range is the resource itself. |
| using grem::execution::Chunk< Resource, Projection >::resource_type = std::remove_const_t<Resource> |
| using grem::execution::Chunk< Resource, Projection >::iterator = decltype(std::begin(std::invoke(Projection, std::declval<Resource&>()))) |
| using grem::execution::Chunk< Resource, Projection >::size_type = decltype(std::size(std::invoke(Projection, std::declval<Resource&>()))) |
| using grem::execution::Chunk< Resource, Projection >::difference_type = iter_difference_t<iterator> |
|
inlineconstexpr |
Construct a resource chunk.
| resource | reference to the resource to chunk. Must outlive the chunk's use. |
| chunkIndex | index of the specific chunk that this subrange references. Must be less than chunkCount. |
| chunkCount | number of chunks that the resource has been divided into. Must be positive, and greater than chunkIndex. |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |