13#ifndef MLIR_DIALECT_OPENACC_OPENACCUTILSREDUCTION_H_
14#define MLIR_DIALECT_OPENACC_OPENACCUTILSREDUCTION_H_
21#include "llvm/ADT/SmallVector.h"
32SmallVector<GPUParallelDimAttr>
39SmallVector<GPUParallelDimAttr>
48std::optional<arith::AtomicRMWKind>
56 arith::AtomicRMWKind kind,
57 bool useOnlyFiniteValue =
true);
61 arith::AtomicRMWKind kind);
SmallVector< GPUParallelDimAttr > getReductionCombineParDims(ReductionCombineOp op)
Returns the parallel dimensions that participate in op's combine step.
std::optional< arith::AtomicRMWKind > translateACCReductionOperator(ReductionOperator redOp, Type type)
Maps an acc reduction operator to the arith atomic RMW kind for type.
ReductionOperator translateAtomicRMWKind(arith::AtomicRMWKind kind)
Maps an arith atomic RMW kind to the corresponding acc reduction operator.
Value createIdentityValue(OpBuilder &b, Location loc, Type type, arith::AtomicRMWKind kind, bool useOnlyFiniteValue=true)
Creates the identity (neutral) value for a reduction of type and kind.
Value generateReductionOp(OpBuilder &b, Location loc, Value lhs, Value rhs, arith::AtomicRMWKind kind)
Combines two reduction partial values using the operator for kind.
Include the generated interface declarations.