From: Brandon Potter Date: Wed, 22 Apr 2015 14:51:27 +0000 (-0700) Subject: base: add new ChunkGenerator method to identify last chunk X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ad29ba6df5b1705747f9292b4bcf9e0c91090a4;p=gem5.git base: add new ChunkGenerator method to identify last chunk --- 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 @@ -122,6 +122,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