-
Notifications
You must be signed in to change notification settings - Fork 2
Add functions to serialize to and deserialize from memory buffers #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ffe721c
00a46f8
ac73aba
e11e44a
10c0ef4
fb3be2d
384c299
faba205
ba5bbf2
10e262d
dfa736a
781a8e5
bdb05bb
d278969
5164e51
b3b67c2
f1fc8b9
dcc5fd7
4c3bd9c
78eb342
40f8692
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt | ||
| --- a/c++/src/CMakeLists.txt | ||
| +++ b/c++/src/CMakeLists.txt | ||
| @@ -1,5 +1,8 @@ | ||
|
|
||
| +# Disable vendored Cap'n Proto tests when consumed through FetchContent. | ||
| +set(BUILD_TESTING OFF) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's just a matter of the flag, can we not set it from our side?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately not. The project itself calls Mid- to long-term, one could contribute an upstream fix for this that scopes the testing to the project. |
||
| + | ||
| # Tests ======================================================================== | ||
|
|
||
| if(BUILD_TESTING) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,24 @@ | ||
| #pragma once | ||
|
|
||
| #include <llvm/ADT/StringRef.h> | ||
| #include <capnp/common.h> | ||
| #include <mlir/IR/BuiltinOps.h> | ||
| #include <mlir/IR/MLIRContext.h> | ||
| #include <mlir/IR/OwningOpRef.h> | ||
|
|
||
| /** | ||
| * @brief Deserialize a memory buffer containing a serialized .jeff module into an MLIR module. | ||
| * @param context The MLIR context to use for the deserialization. | ||
| * @param buffer A memory buffer containing the serialized jeff module. | ||
| * @return An owning reference to the deserialized MLIR module. | ||
| */ | ||
| mlir::OwningOpRef<mlir::ModuleOp> deserialize(mlir::MLIRContext* context, | ||
| kj::ArrayPtr<capnp::word> buffer); | ||
|
|
||
| /** | ||
| * @brief Deserialize a .jeff file into an MLIR module. | ||
| * @param context The MLIR context to use for the deserialization. | ||
| * @param path The path to the .jeff file. | ||
| * @return An owning reference to the deserialized MLIR module. | ||
| */ | ||
| mlir::OwningOpRef<mlir::ModuleOp> deserialize(mlir::MLIRContext* context, llvm::StringRef path); | ||
| mlir::OwningOpRef<mlir::ModuleOp> deserializeFromFile(mlir::MLIRContext* context, | ||
| llvm::StringRef path); |
Uh oh!
There was an error while loading. Please reload this page.