Update the MemoryPool by defining the max pool size, and use it when adding a new entry to the pool (#44)

* Update the MemoryPool by defining the max pool size, and use it when adding a new entry to the pool

* Fix finding the gfx942_mi300x

[ROCm/rocjpeg commit: 6d7d72c6da]
This commit is contained in:
Aryan Salmanpour
2024-07-19 19:04:31 -04:00
zatwierdzone przez GitHub
rodzic 4eb157f81b
commit d1610bc687
2 zmienionych plików z 24 dodań i 23 usunięć
@@ -140,7 +140,7 @@ class RocJpegVaapiMemoryPool {
* @brief Sets the maximum size of the memory pool.
* @param max_pool_size The maximum size of the memory pool.
*/
void SetPoolSize(int32_t max_pool_size);
void SetPoolSize(uint32_t max_pool_size);
/**
* @brief Sets the VADisplay for the memory pool.
@@ -183,6 +183,7 @@ class RocJpegVaapiMemoryPool {
private:
VADisplay va_display_; // The VADisplay associated with the memory pool.
uint32_t max_pool_size_; // The maximum pool size of the memory pool (mem_pool_) per entry.
std::unordered_map<uint32_t, std::vector<RocJpegVaapiMemPoolEntry>> mem_pool_; // The memory pool.
};