[memorypool/test] Unittests for memory pool
authorParichay Kapoor <pk.kapoor@samsung.com>
Wed, 11 Aug 2021 09:09:17 +0000 (18:09 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 24 Sep 2021 10:56:07 +0000 (19:56 +0900)
commitff47fd426a7f4840fdfc97fef8ed8149a404ddba
tree9fb4b0dce30e8936690efabc2b4929b0d46a7ee8
parent6b7e51071aacaa31de100a6d3c2fc91d5e272e40
[memorypool/test] Unittests for memory pool

This patch adds unittests for memory pool for its public APIs.
Further, memory validation is added for the requested memories and
those tests will be added for each planner. This ensures that the
memories returned by each planner do not overlap, and remain valid while
usage.

Fixes corresponding to the unittests are also added.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
nntrainer/tensor/memory_pool.cpp
nntrainer/tensor/memory_pool.h
test/unittest/memory/memory_planner_validate.cpp
test/unittest/memory/memory_planner_validate.h
test/unittest/memory/meson.build
test/unittest/memory/unittest_memory_planner.cpp
test/unittest/memory/unittest_memory_pool.cpp [new file with mode: 0644]