Skip to content
Snippets Groups Projects

version 0.1.0

Merged Maxence Naud requested to merge dev into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -9,7 +9,6 @@
*
********************************************************************************/
#include <cassert>
#include <opencv2/core.hpp> // cv::Mat, cv::split
#include <cstddef>
#include <cstdint>
@@ -23,6 +22,7 @@
#include "aidge/backend/cpu/data/TensorImpl.hpp"
#include "aidge/backend/opencv/data/TensorImpl.hpp"
#include "aidge/data/Data.hpp"
#include "aidge/utils/ErrorHandling.hpp"
#include "aidge/utils/Types.h" // DimSize_t
static Aidge::DataType CVtoAidge(const int matDepth) {
@@ -96,7 +96,7 @@ void Aidge::convert(const cv::Mat& mat, void* data, std::size_t offset)
std::shared_ptr<Aidge::Tensor> Aidge::convertCpu(std::shared_ptr<Aidge::Tensor> tensorOpencv){
// Assert the tensorOpencv is backend Opencv
assert(std::strcmp(tensorOpencv->getImpl()->backend().c_str(), "opencv") == 0 && "Cannot convert tensor backend from opencv to cpu : tensor is not backend opencv.");
AIDGE_ASSERT(tensorOpencv->getImpl()->backend() == "opencv", "Cannot convert tensor backend from opencv to cpu : tensor is not backend opencv.");
// Create a tensor backend cpu from the dimensions of the tensor backend opencv
std::shared_ptr<Aidge::Tensor> tensorCpu = std::make_shared<Aidge::Tensor>(tensorOpencv->dims());
Loading