ArmNN
 24.08
ClContextSerializer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <arm_compute/core/CL/CLCompileContext.h>
9 
10 #include <flatbuffers/flatbuffers.h>
11 
12 namespace armnn
13 {
14 
16 {
17 public:
18  ClContextSerializer() = default;
19  ~ClContextSerializer() = default;
20 
21  /// Serializes the CLCompileContext built-in programs
22  /// @param [in] clCompileContext The CLCompileContext to be serialized.
23  void Serialize(const arm_compute::CLCompileContext& clCompileContext);
24 
25  /// Serializes the ClContext to the stream.
26  /// @param [stream] the stream to save to
27  /// @return true if ClContext is Serialized to the Stream, false otherwise
28  bool SaveSerializedToStream(std::ostream& stream);
29 
30 private:
31  /// FlatBufferBuilder to create the CLContext FlatBuffers.
32  flatbuffers::FlatBufferBuilder m_FlatBufferBuilder;
33 };
34 
35 } // namespace armnn
armnn::ClContextSerializer::Serialize
void Serialize(const arm_compute::CLCompileContext &clCompileContext)
Serializes the CLCompileContext built-in programs.
Definition: ClContextSerializer.cpp:23
armnn::ClContextSerializer::ClContextSerializer
ClContextSerializer()=default
armnn::ClContextSerializer::~ClContextSerializer
~ClContextSerializer()=default
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ClContextSerializer::SaveSerializedToStream
bool SaveSerializedToStream(std::ostream &stream)
Serializes the ClContext to the stream.
Definition: ClContextSerializer.cpp:49
armnn::ClContextSerializer
Definition: ClContextSerializer.hpp:15