[all-commits] [llvm/llvm-project] 357c80: [OpenMP][Plugin] Minor adjustments to ResourcePool
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Dec 28 13:11:16 PST 2021
Author: Shilei Tian <i at tianshilei.me>
Date: 2021-12-28 (Tue, 28 Dec 2021)
[OpenMP][Plugin] Minor adjustments to ResourcePool
This patch makes some minor adjustments to `ResourcePool`:
- Don't initialize the resources if `Size` is 0 which can avoid assertion.
- Add a new interface function `clear` to release all hold resources.
- If initial size is 0, resize to 1 when the first request is encountered.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D116340
More information about the All-commits