compute-runtime/shared
Maciej Bielski c7a971a28f feature: add optional onChunkFree callback to AbstractBuffersPool
Instances returned by `getAllocationsVector()` in some cases cannot be
freed (in the `malloc/new` sense) until the `drain()` function invokes
`allocInUse()` on them. Plus, the `chunksToFree` container operates on
pairs `{offset, size}`, not pointers, so such pair cannot be used to
release allocations either.

Provide an optional callback, which can be implemented by the custom
pool derived from `AbstractBuffersPool`. This callback can be used, for
example, to perform actual release of an allocation related to the
currently processed chunk.

Additionally, provide the `drain()` and `tryFreeFromPoolBuffer()`
functions with pool-independent versions and keep the previous versions
as defaults (for allocators with a single pool). The new versions allow
reusing the code for cases when allocator has multiple pools.

In both cases, there was no such needs so far but it arose when working
on `IsaBuffersAllocator`. The latter is coming with future commits, but
the shared code modifications are extracted as an independent step.

Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2023-07-13 17:26:51 +02:00
..
generate_cpp_array fix: Compile built-ins per release 2023-07-11 16:02:36 +02:00
offline_compiler fix: encode options in elf file 2023-07-11 16:31:52 +02:00
source feature: add optional onChunkFree callback to AbstractBuffersPool 2023-07-13 17:26:51 +02:00
test feature: add optional onChunkFree callback to AbstractBuffersPool 2023-07-13 17:26:51 +02:00
wsl_compute_helper fix: obtain hw ip version from kmd in wsl mode 2023-06-07 15:20:13 +02:00
CMakeLists.txt CMake: don't include shared/test/unit_test when shared tests are skipped 2022-08-25 10:48:37 +02:00