ArmNN
 24.08
ClContextDeserializer.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 namespace armnn
11 {
12 
14 {
15 public:
16  ClContextDeserializer() = default;
17  ~ClContextDeserializer() = default;
18 
19  /// Deserializes the CLCompileContext built-in programs from a binary file
20  /// @param [in] clCompileContext The CLCompileContext to be serialized
21  /// @param [in] context The CL Kernel context built-in program will be created from
22  /// @param [in] device The CL Kernel device built-in program will be created from
23  /// @param [in] filePath The serialized file
24  void Deserialize(arm_compute::CLCompileContext& clCompileContext,
25  cl::Context& context,
26  cl::Device& device,
27  const std::string& filePath);
28 
29  /// Deserializes the CLCompileContext built-in programs from binary file contents
30  /// @param [in] clCompileContext The CLCompileContext to be serialized
31  /// @param [in] context The CL Kernel context built-in program will be created from
32  /// @param [in] device The CL Kernel device built-in program will be created from
33  /// @param [in] filePath The serialized file
34  void DeserializeFromBinary(arm_compute::CLCompileContext& clCompileContext,
35  cl::Context& context,
36  cl::Device& device,
37  const std::vector<uint8_t>& binaryContent);
38 
39 };
40 
41 } // namespace armnn
armnn::ClContextDeserializer::~ClContextDeserializer
~ClContextDeserializer()=default
armnn::ClContextDeserializer::DeserializeFromBinary
void DeserializeFromBinary(arm_compute::CLCompileContext &clCompileContext, cl::Context &context, cl::Device &device, const std::vector< uint8_t > &binaryContent)
Deserializes the CLCompileContext built-in programs from binary file contents.
Definition: ClContextDeserializer.cpp:81
armnn::ClContextDeserializer::ClContextDeserializer
ClContextDeserializer()=default
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ClContextDeserializer::Deserialize
void Deserialize(arm_compute::CLCompileContext &clCompileContext, cl::Context &context, cl::Device &device, const std::string &filePath)
Deserializes the CLCompileContext built-in programs from a binary file.
Definition: ClContextDeserializer.cpp:36
armnn::ClContextDeserializer
Definition: ClContextDeserializer.hpp:13