Skip to content
Snippets Groups Projects

[Fix] Producer clone and Tensor copy

Merged Maxence Naud requested to merge fix_207-producer-clone into dev
1 unresolved thread
Files
10
@@ -20,6 +20,7 @@
@@ -20,6 +20,7 @@
#include "aidge/data/half.hpp"
#include "aidge/data/half.hpp"
#include "aidge/utils/Attributes.hpp"
#include "aidge/utils/Attributes.hpp"
 
#include "aidge/utils/ErrorHandling.hpp"
namespace Aidge {
namespace Aidge {
enum class DataType {
enum class DataType {
@@ -91,7 +92,19 @@ DataFormatTranspose getDataFormatTranspose(const DataFormat& src, const DataForm
@@ -91,7 +92,19 @@ DataFormatTranspose getDataFormatTranspose(const DataFormat& src, const DataForm
class Data {
class Data {
public:
public:
 
Data() = delete;
 
Data(Data&& other) = default;
 
Data(const Data& other) = default;
Data(const std::string& type): mType(type) {};
Data(const std::string& type): mType(type) {};
 
 
Data& operator=(const Data& other) {
 
AIDGE_ASSERT(other.mType == mType, "Cannot copy a different type fo Data object.");
 
return *this;
 
};
 
Data& operator=(Data&& other) {
 
AIDGE_ASSERT(other.mType == mType, "Cannot copy a different type fo Data object.");
 
return *this;
 
};
constexpr const std::string& type() const {
constexpr const std::string& type() const {
return mType;
return mType;
}
}
Loading