publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b
This commit is contained in:
@@ -40,7 +40,7 @@ public:
|
||||
/**
|
||||
* @brief A default constructor
|
||||
*/
|
||||
CNNNetReader(): actual(shared_from_irelease(InferenceEngine::CreateCNNNetReader())) {
|
||||
CNNNetReader(): actual(InferenceEngine::CreateCNNNetReaderPtr()) {
|
||||
if (actual == nullptr) {
|
||||
THROW_IE_EXCEPTION << "CNNNetReader was not initialized.";
|
||||
}
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<ICNNNetReader> actual;
|
||||
CNNNetReaderPtr actual;
|
||||
std::shared_ptr<CNNNetwork> network;
|
||||
};
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
|
||||
@@ -66,8 +66,11 @@ public:
|
||||
* @param reader Pointer to the ICNNNetReader object
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
explicit CNNNetwork(std::shared_ptr<ICNNNetReader> reader): reader(reader), actual(reader->getNetwork(nullptr)) {
|
||||
if (actual == nullptr) {
|
||||
explicit CNNNetwork(CNNNetReaderPtr reader_): reader(reader_) {
|
||||
if (reader == nullptr) {
|
||||
THROW_IE_EXCEPTION << "ICNNNetReader was not initialized.";
|
||||
}
|
||||
if ((actual = reader->getNetwork(nullptr)) == nullptr) {
|
||||
THROW_IE_EXCEPTION << "CNNNetwork was not initialized.";
|
||||
}
|
||||
}
|
||||
@@ -160,6 +163,15 @@ public:
|
||||
return actual->getBatchSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief An overloaded operator cast to get pointer on current network
|
||||
*
|
||||
* @return A shared pointer of the current network
|
||||
*/
|
||||
operator std::shared_ptr<ICNNNetwork>() {
|
||||
return network;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief An overloaded operator & to get current network
|
||||
*
|
||||
@@ -178,6 +190,15 @@ public:
|
||||
return *actual;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns constant nGraph function
|
||||
*
|
||||
* @return constant nGraph function
|
||||
*/
|
||||
std::shared_ptr<ngraph::Function> getFunction() noexcept {
|
||||
return actual->getFunction();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns constant nGraph function
|
||||
*
|
||||
@@ -297,7 +318,7 @@ protected:
|
||||
* @brief Reader extra reference, might be nullptr
|
||||
*/
|
||||
IE_SUPPRESS_DEPRECATED_START
|
||||
std::shared_ptr<ICNNNetReader> reader;
|
||||
CNNNetReaderPtr reader;
|
||||
IE_SUPPRESS_DEPRECATED_END
|
||||
/**
|
||||
* @brief Network extra interface, might be nullptr
|
||||
|
||||
Reference in New Issue
Block a user