blob: 24497c22495ad4a1a714db8a59d1ea1dcf0c4b9c [file] [log] [blame]
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <backendsCommon/IBackendContext.hpp>
#include <unordered_set>
#include <mutex>
namespace armnn
{
class ClBackendContext : public IBackendContext
{
public:
ClBackendContext(const IRuntime::CreationOptions& options);
bool BeforeLoadNetwork(NetworkId networkId) override;
bool AfterLoadNetwork(NetworkId networkId) override;
bool BeforeUnloadNetwork(NetworkId networkId) override;
bool AfterUnloadNetwork(NetworkId networkId) override;
~ClBackendContext() override;
private:
std::mutex m_Mutex;
struct ClContextControlWrapper;
std::unique_ptr<ClContextControlWrapper> m_ClContextControlWrapper;
std::unordered_set<NetworkId> m_NetworkIds;
};
} // namespace armnn