[Mlir-commits] [mlir] [mlir][polynomial] python bindings (PR #93109)
Jacques Pienaar
llvmlistbot at llvm.org
Sat Jun 1 06:43:46 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
----------------
jpienaar wrote:
We define and undef in all usages at the moment. Given the complexity it would seem better to avoid relying on macro def across headers.
https://github.com/llvm/llvm-project/pull/93109
More information about the Mlir-commits
mailing list