sim: Generalize the arrayParamOut and arrayParamIn functions.
authorGabe Black <gabe.black@gmail.com>
Wed, 21 Oct 2020 04:11:53 +0000 (21:11 -0700)
committerGabe Black <gabe.black@gmail.com>
Thu, 22 Oct 2020 22:00:38 +0000 (22:00 +0000)
commitedccff8f23e2d5e5f04cb548c296b399ff06c6f8
tree3d206611c58929fe0d636d2c42bad9b785dc0c2e
parentefabe5ec1badfec6534e6f6cefd86a633a43314a
sim: Generalize the arrayParamOut and arrayParamIn functions.

These had been written specifically for the vector, list, set, and C
style array types. This change reworks them to share an implementation,
and to work with more general types. The arrayParamOut method requires
std::begin() and std::end() to accept that type, and the arrayParamIn
method requires either insert or push_back, or the type to be an array.

Also fix up a couple of files which accidentally depended on includes in
the serialize headers which are no longer necessary.

Change-Id: I6ec4fe3bb900603bbb4e35c4efa620c249942452
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36277
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/fd_array.hh
src/sim/serialize.cc
src/sim/serialize.hh
src/sim/system.hh