/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// Verifies an encoding attribute for a tensor. class VerifiableTensorEncoding; } // namespace mlir namespace mlir { /// Verifies an encoding attribute for a tensor. namespace detail { struct VerifiableTensorEncodingInterfaceTraits { struct Concept { /// The methods defined by the interface. ::llvm::LogicalResult (*verifyEncoding)(const Concept *impl, ::mlir::Attribute , ::mlir::ArrayRef, ::mlir::Type, ::llvm::function_ref<::mlir::InFlightDiagnostic()>); }; template class Model : public Concept { public: using Interface = ::mlir::VerifiableTensorEncoding; Model() : Concept{verifyEncoding} {} static inline ::llvm::LogicalResult verifyEncoding(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::ArrayRef shape, ::mlir::Type elementType, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::VerifiableTensorEncoding; FallbackModel() : Concept{verifyEncoding} {} static inline ::llvm::LogicalResult verifyEncoding(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::ArrayRef shape, ::mlir::Type elementType, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; }; }; template struct VerifiableTensorEncodingTrait; } // namespace detail class VerifiableTensorEncoding : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::VerifiableTensorEncodingTrait {}; /// Verifies the encoding is valid for a tensor type with the /// given shape and element type. Generates a diagnostic using /// the supplied callback on failure. ::llvm::LogicalResult verifyEncoding(::mlir::ArrayRef shape, ::mlir::Type elementType, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; }; } // namespace mlir namespace mlir::detail { template struct VerifiableTensorEncodingTrait : public ::mlir::AttributeInterface::Trait { }; } // namespace mlir::detail namespace mlir { template ::llvm::LogicalResult detail::VerifiableTensorEncodingInterfaceTraits::Model::verifyEncoding(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::ArrayRef shape, ::mlir::Type elementType, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) { return (::llvm::cast(tablegen_opaque_val)).verifyEncoding(shape, elementType, emitError); } template ::llvm::LogicalResult detail::VerifiableTensorEncodingInterfaceTraits::FallbackModel::verifyEncoding(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::ArrayRef shape, ::mlir::Type elementType, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) { return static_cast(impl)->verifyEncoding(tablegen_opaque_val, shape, elementType, emitError); } } // namespace mlir