Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

[NFC} Update description of OMPGridValues enums #118

Open
wants to merge 1 commit into
base: amd-stg-openmp
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions llvm/include/llvm/Frontend/OpenMP/OMPGridValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,30 @@ namespace omp {
/// use the new array name.
///
/// Example usage in clang:
/// const unsigned slot_size = ctx.GetTargetInfo().getGridValue(GV_Warp_Size);
/// const unsigned slot_size =
/// ctx.GetTargetInfo().getGridValue(llvm::omp::GVIDX::GV_Warp_Size);
///
/// Example usage in libomptarget/deviceRTLs:
/// #include "OMPGridValues.h"
/// #include "llvm/Frontend/OpenMP/OMPGridValues.h"
/// #ifdef __AMDGPU__
/// #define GRIDVAL AMDGPUGpuGridValues
/// #else
/// #define GRIDVAL NVPTXGpuGridValues
/// #endif
/// ... Then use this reference for GV_Warp_Size in the deviceRTL source.
/// GRIDVAL[GV_Warp_Size]
/// llvm::omp::GRIDVAL[llvm::omp::GVIDX::GV_Warp_Size]
///
/// Example usage in libomptarget hsa plugin:
/// #include "OMPGridValues.h"
/// #include "llvm/Frontend/OpenMP/OMPGridValues.h"
/// #define GRIDVAL AMDGPUGpuGridValues
/// ... Then use this reference to access GV_Warp_Size in the hsa plugin.
/// GRIDVAL[GV_Warp_Size]
/// llvm::omp::GRIDVAL[llvm::omp::GVIDX::GV_Warp_Size]
///
/// Example usage in libomptarget cuda plugin:
/// #include "OMPGridValues.h"
/// #define GRIDVAL NVPTXGpuGridValues
/// ... Then use this reference to access GV_Warp_Size in the cuda plugin.
/// GRIDVAL[GV_Warp_Size]
/// ... Then use this reference to access GV_Warp_Size in the cuda plugin.
/// llvm::omp::GRIDVAL[llvm::omp::GVIDX::GV_Warp_Size]
///
enum GVIDX {
/// The maximum number of workers in a kernel.
Expand Down