blob: f9bd90aafbb7ab233bf1446052ced3cded42771d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright (C) 2018 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <string>
namespace InferenceEngine {
/**
* @brief c++ exception based error reporting wrapper of API class IMemoryState
*/
class MemoryState {
IMemoryState::Ptr actual = nullptr;
public:
explicit MemoryState(IMemoryState::Ptr pState) : actual(pState) {}
/**
* @brief Wraps original method
* IMemoryState::Reset
*/
void Reset() {
CALL_STATUS_FNC_NO_ARGS(Reset);
}
/**
* @brief Wraps original method
* IMemoryState::GetName
*/
std::string GetName() const {
char name[256];
CALL_STATUS_FNC(GetName, name, sizeof(name));
return name;
}
/**
* @brief Wraps original method
* IMemoryState::GetLastState
*/
Blob::CPtr GetLastState() const {
Blob::CPtr stateBlob;
CALL_STATUS_FNC(GetLastState, stateBlob);
return stateBlob;
}
/**
* @brief Wraps original method
* IMemoryState::SetState
*/
void SetState(Blob::Ptr state) {
CALL_STATUS_FNC(SetState, state);
}
};
} // namespace InferenceEngine
|