LLZK
3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Toggle main menu visibility
Loading...
Searching...
No Matches
PCL.cpp
Go to the documentation of this file.
1
//===-- PCL.cpp - C API for Picus PCL Target --------------------*- C++ -*-===//
2
//
3
// Part of the LLZK Project, under the Apache License v2.0.
4
// See LICENSE.txt for license information.
5
// Copyright 2025 Veridise Inc.
6
// SPDX-License-Identifier: Apache-2.0
7
//
8
//===----------------------------------------------------------------------===//
9
10
#include "
llzk/CAPI/Support.h
"
11
#include "
llzk/Config/Config.h
"
12
13
#include <mlir-c/IR.h>
14
#include <mlir-c/Support.h>
15
16
#include <mlir/CAPI/Support.h>
17
18
#if LLZK_WITH_PCL
19
20
#include "
llzk-c/Target/PCL.h
"
21
22
#include <pcl/Target/PCL.h>
23
24
#include <mlir/CAPI/Support.h>
25
#include <mlir/CAPI/Utils.h>
26
27
MlirLogicalResult
28
llzkTranslateModuleToPCL
(MlirOperation module, MlirStringCallback callback,
void
*userData) {
29
mlir::detail::CallbackOstream stream(callback, userData);
30
auto
op =
mlir::unwrap_cast<mlir::ModuleOp>
(module);
31
return
wrap(pcl::moduleToPcl(op, stream));
32
}
33
34
#else
35
36
MlirLogicalResult
mlirTranslateModuleToPCL
(MlirOperation, MlirStringCallback) {
37
return
wrap(mlir::failure());
38
}
39
40
#endif
// LLZK_WITH_PCL
Config.h
mlirTranslateModuleToPCL
MlirLogicalResult mlirTranslateModuleToPCL(MlirOperation, MlirStringCallback)
Definition
PCL.cpp:36
PCL.h
Declares the C interface for Picus PCL conversion, transformation, and translation.
llzkTranslateModuleToPCL
MLIR_CAPI_EXPORTED MlirLogicalResult llzkTranslateModuleToPCL(MlirOperation module, MlirStringCallback callback, void *userData)
Translate an operation that satisfies the PCL dialect (i.e.
Support.h
mlir::unwrap_cast
auto unwrap_cast(auto &from)
Definition
Support.h:47
lib
CAPI
Target
PCL.cpp
Generated by
1.17.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.