diff options
author | Brandon Potter <brandon.potter@amd.com> | 2015-04-22 07:51:27 -0700 |
---|---|---|
committer | Brandon Potter <brandon.potter@amd.com> | 2015-04-22 07:51:27 -0700 |
commit | 6ad29ba6df5b1705747f9292b4bcf9e0c91090a4 (patch) | |
tree | 43a2ff5e3b0685104892836bb30ad32f0966a11c /src/base | |
parent | 93c4527128591f9337b9700a0898b229dc49c61d (diff) | |
download | gem5-6ad29ba6df5b1705747f9292b4bcf9e0c91090a4.tar.xz |
base: add new ChunkGenerator method to identify last chunk
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/chunk_generator.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base/chunk_generator.hh b/src/base/chunk_generator.hh index cf303f693..a11bd73e6 100644 --- a/src/base/chunk_generator.hh +++ b/src/base/chunk_generator.hh @@ -123,6 +123,12 @@ class ChunkGenerator bool done() const { return (curSize == 0); } /** + * Is this the last chunk? + * @return True if yes, false if more to go. + */ + bool last() const { return (sizeLeft == 0); } + + /** * Advance generator to next chunk. * @return True if successful, false if unsuccessful * (because we were at the last chunk). |