MLIR 22.0.0git
ConvertNativeFuncPattern< Op > Struct Template Referencefinal

Convert math ops marked with fast (afn) to native OpenCL intrinsics. More...

Inheritance diagram for ConvertNativeFuncPattern< Op >:

Public Member Functions

 ConvertNativeFuncPattern (MLIRContext *context, StringRef nativeFunc, PatternBenefit benefit=1)
LogicalResult matchAndRewrite (Op op, typename Op::Adaptor adaptor, ConversionPatternRewriter &rewriter) const override
bool isSPIRVCompatibleFloatOrVec (Type type) const
std::string getMangledNativeFuncName (const ArrayRef< Type > operandTypes) const

Public Attributes

const StringRef nativeFunc

Detailed Description

template<typename Op>
struct ConvertNativeFuncPattern< Op >

Convert math ops marked with fast (afn) to native OpenCL intrinsics.

Definition at line 29 of file MathToXeVM.cpp.

Constructor & Destructor Documentation

◆ ConvertNativeFuncPattern()

template<typename Op>
ConvertNativeFuncPattern< Op >::ConvertNativeFuncPattern ( MLIRContext * context,
StringRef nativeFunc,
PatternBenefit benefit = 1 )
inline

Definition at line 31 of file MathToXeVM.cpp.

References nativeFunc.

Member Function Documentation

◆ getMangledNativeFuncName()

template<typename Op>
std::string ConvertNativeFuncPattern< Op >::getMangledNativeFuncName ( const ArrayRef< Type > operandTypes) const
inline

Definition at line 95 of file MathToXeVM.cpp.

References nativeFunc.

Referenced by matchAndRewrite().

◆ isSPIRVCompatibleFloatOrVec()

template<typename Op>
bool ConvertNativeFuncPattern< Op >::isSPIRVCompatibleFloatOrVec ( Type type) const
inline

Definition at line 75 of file MathToXeVM.cpp.

References mlir::Type::isFloat().

Referenced by matchAndRewrite().

◆ matchAndRewrite()

template<typename Op>
LogicalResult ConvertNativeFuncPattern< Op >::matchAndRewrite ( Op op,
typename Op::Adaptor adaptor,
ConversionPatternRewriter & rewriter ) const
inlineoverride

Member Data Documentation

◆ nativeFunc

template<typename Op>
const StringRef ConvertNativeFuncPattern< Op >::nativeFunc

Definition at line 119 of file MathToXeVM.cpp.

Referenced by ConvertNativeFuncPattern(), and getMangledNativeFuncName().


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