LLVM 22.0.0git
llvm::OpenMPIRBuilder::ReductionInfo Struct Reference

Information about an OpenMP reduction. More...

#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"

Public Member Functions

 ReductionInfo (Type *ElementType, Value *Variable, Value *PrivateVariable, EvalKind EvaluationKind, ReductionGenCBTy ReductionGen, ReductionGenClangCBTy ReductionGenClang, ReductionGenAtomicCBTy AtomicReductionGen, ReductionGenDataPtrPtrCBTy DataPtrPtrGen, Type *ByRefAllocatedType=nullptr, Type *ByRefElementType=nullptr)
 ReductionInfo (Value *PrivateVariable)

Public Attributes

TypeElementType
 Reduction element type, must match pointee type of variable.
ValueVariable
 Reduction variable of pointer type.
ValuePrivateVariable
 Thread-private partial reduction variable.
EvalKind EvaluationKind
 Reduction evaluation kind - scalar, complex or aggregate.
ReductionGenCBTy ReductionGen
 Callback for generating the reduction body.
ReductionGenClangCBTy ReductionGenClang
 Clang callback for generating the reduction body.
ReductionGenAtomicCBTy AtomicReductionGen
 Callback for generating the atomic reduction body, may be null.
ReductionGenDataPtrPtrCBTy DataPtrPtrGen
TypeByRefAllocatedType
 For by-ref reductions, we need to keep track of 2 extra types that are potentially different:
TypeByRefElementType

Detailed Description

Information about an OpenMP reduction.

Definition at line 1588 of file OMPIRBuilder.h.

Constructor & Destructor Documentation

◆ ReductionInfo() [1/2]

llvm::OpenMPIRBuilder::ReductionInfo::ReductionInfo ( Type * ElementType,
Value * Variable,
Value * PrivateVariable,
EvalKind EvaluationKind,
ReductionGenCBTy ReductionGen,
ReductionGenClangCBTy ReductionGenClang,
ReductionGenAtomicCBTy AtomicReductionGen,
ReductionGenDataPtrPtrCBTy DataPtrPtrGen,
Type * ByRefAllocatedType = nullptr,
Type * ByRefElementType = nullptr )
inline

◆ ReductionInfo() [2/2]

llvm::OpenMPIRBuilder::ReductionInfo::ReductionInfo ( Value * PrivateVariable)
inline

Member Data Documentation

◆ AtomicReductionGen

ReductionGenAtomicCBTy llvm::OpenMPIRBuilder::ReductionInfo::AtomicReductionGen

Callback for generating the atomic reduction body, may be null.

The IR produced by this will be used to atomically combine two values during reduction. If null, the implementation will use the non-atomic version along with the appropriate synchronization mechanisms.

Definition at line 1636 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::createReductions(), ReductionInfo(), and ReductionInfo().

◆ ByRefAllocatedType

Type* llvm::OpenMPIRBuilder::ReductionInfo::ByRefAllocatedType

For by-ref reductions, we need to keep track of 2 extra types that are potentially different:

  • The allocated type is the type of the storage allocated by the reduction op's alloc region. For example, for allocatables and arrays, this type would be the descriptor/box struct.

Definition at line 1645 of file OMPIRBuilder.h.

Referenced by ReductionInfo().

◆ ByRefElementType

Type* llvm::OpenMPIRBuilder::ReductionInfo::ByRefElementType
  • The by-ref element type is the type of the actual storage needed for the data of the allocatable or array. For example, an float allocatable of would need some float storage to store intermediate reduction results.

Definition at line 1651 of file OMPIRBuilder.h.

Referenced by ReductionInfo().

◆ DataPtrPtrGen

ReductionGenDataPtrPtrCBTy llvm::OpenMPIRBuilder::ReductionInfo::DataPtrPtrGen

Definition at line 1638 of file OMPIRBuilder.h.

Referenced by ReductionInfo(), and ReductionInfo().

◆ ElementType

Type* llvm::OpenMPIRBuilder::ReductionInfo::ElementType

Reduction element type, must match pointee type of variable.

For by-ref reductions, this would be just an opaque ptr.

Definition at line 1611 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), populateReductionFunction(), ReductionInfo(), and ReductionInfo().

◆ EvaluationKind

EvalKind llvm::OpenMPIRBuilder::ReductionInfo::EvaluationKind

Reduction evaluation kind - scalar, complex or aggregate.

Definition at line 1620 of file OMPIRBuilder.h.

Referenced by ReductionInfo(), and ReductionInfo().

◆ PrivateVariable

Value* llvm::OpenMPIRBuilder::ReductionInfo::PrivateVariable

◆ ReductionGen

ReductionGenCBTy llvm::OpenMPIRBuilder::ReductionInfo::ReductionGen

Callback for generating the reduction body.

The IR produced by this will be used to combine two values in a thread-safe context, e.g., under lock or within the same thread, and therefore need not be atomic.

Definition at line 1625 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), populateReductionFunction(), ReductionInfo(), and ReductionInfo().

◆ ReductionGenClang

ReductionGenClangCBTy llvm::OpenMPIRBuilder::ReductionInfo::ReductionGenClang

Clang callback for generating the reduction body.

The IR produced by this will be used to combine two values in a thread-safe context, e.g., under lock or within the same thread, and therefore need not be atomic.

Definition at line 1630 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::createReductionsGPU(), ReductionInfo(), and ReductionInfo().

◆ Variable

Value* llvm::OpenMPIRBuilder::ReductionInfo::Variable

The documentation for this struct was generated from the following file: