My Project
Serialization.h
Go to the documentation of this file.
1 //===- Serialization.h - MLIR SPIR-V (De)serialization ----------*- C++ -*-===//
2 //
3 // Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the entry points for serialize and deserialize SPIR-V
10 // binary modules.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_DIALECT_SPIRV_SERIALIZATION_H_
15 #define MLIR_DIALECT_SPIRV_SERIALIZATION_H_
16 
17 #include "mlir/Support/LLVM.h"
18 
19 namespace mlir {
20 struct LogicalResult;
21 class MLIRContext;
22 
23 namespace spirv {
24 class ModuleOp;
25 
29 LogicalResult serialize(ModuleOp module, SmallVectorImpl<uint32_t> &binary);
30 
35 Optional<ModuleOp> deserialize(ArrayRef<uint32_t> binary, MLIRContext *context);
36 
37 } // end namespace spirv
38 } // end namespace mlir
39 
40 #endif // MLIR_DIALECT_SPIRV_SERIALIZATION_H_
Definition: InferTypeOpInterface.cpp:20
LogicalResult serialize(ModuleOp module, SmallVectorImpl< uint32_t > &binary)
Optional< ModuleOp > deserialize(ArrayRef< uint32_t > binary, MLIRContext *context)
Definition: Deserializer.cpp:2415