Files
rk35xx-android14/external/armnn/include/armnnTestUtils/PredicateResult.hpp
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

48 lines
849 B
C++

//
// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <sstream>
namespace armnn
{
class PredicateResult
{
public:
explicit PredicateResult(bool result)
: m_Result(result)
{}
PredicateResult(const PredicateResult& predicateResult)
: m_Result(predicateResult.m_Result)
, m_Message(predicateResult.m_Message.str())
{}
void SetResult(bool newResult)
{
m_Result = newResult;
}
std::stringstream& Message()
{
return m_Message;
}
bool operator!() const
{
return !m_Result;
}
void operator=(PredicateResult otherPredicateResult)
{
otherPredicateResult.m_Result = m_Result;
}
bool m_Result;
std::stringstream m_Message;
};
} // namespace armnn