[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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 357c8031ff29299ad4b823074ff7fdda23654cc8
      https://github.com/llvm/llvm-project/commit/357c8031ff29299ad4b823074ff7fdda23654cc8
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M openmp/libomptarget/plugins/cuda/src/rtl.cpp

  Log Message:
  -----------
  [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 mailing list