[Mlir-commits] [mlir] [mlir][polynomial] python bindings (PR #93109)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri May 31 05:30:00 PDT 2024


================
@@ -0,0 +1,47 @@
+//===-- mlir-c/Dialect/Polynomial.h - C API for Polynomial --------*- C -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
+// Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_C_DIALECT_POLYNOMIAL_H
+#define MLIR_C_DIALECT_POLYNOMIAL_H
+
+#include "mlir/CAPI/Wrap.h"
+#include "mlir/Dialect/Polynomial/IR/Polynomial.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Polynomial, polynomial);
+
+#define DEFINE_C_API_STRUCT(name, storage)                                     \
+  struct name {                                                                \
+    storage *ptr;                                                              \
+  };                                                                           \
+  typedef struct name name
----------------
ftynse wrote:

Including `mlir-c/IR.h` should bring this macro. Normally we don't have it redefined in dialects.

https://github.com/llvm/llvm-project/pull/93109


More information about the Mlir-commits mailing list