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
#include <mlir/Support/LogicalResult.h>
18
19
#if LLZK_WITH_PCL
20
21
#include "
llzk-c/Target/PCL.h
"
22
23
#include <pcl/Target/PCL.h>
24
25
#include <mlir/CAPI/Support.h>
26
#include <mlir/CAPI/Utils.h>
27
28
MlirLogicalResult
29
llzkTranslateModuleToPCL
(MlirOperation module, MlirStringCallback callback,
void
*userData) {
30
mlir::detail::CallbackOstream stream(callback, userData);
31
auto
op =
mlir::unwrap_cast<mlir::ModuleOp>
(module);
32
return
wrap(pcl::moduleToPcl(op, stream));
33
}
34
35
#else
36
37
MlirLogicalResult
mlirTranslateModuleToPCL
(MlirOperation, MlirStringCallback) {
38
return
wrap(mlir::failure());
39
}
40
41
#endif
// LLZK_WITH_PCL
Config.h
mlirTranslateModuleToPCL
MlirLogicalResult mlirTranslateModuleToPCL(MlirOperation, MlirStringCallback)
Definition
PCL.cpp:37
PCL.h
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:51
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.