Skip to content
Snippets Groups Projects

[Add] Possibility to create a GenericOperator from any Operator

Merged Olivier BICHLER requested to merge genericop_from_op into dev
2 unresolved threads
15 files
+ 237
53
Compare changes
  • Side-by-side
  • Inline
Files
15
@@ -20,6 +20,7 @@
#include "aidge/data/half.hpp"
#include "aidge/utils/Attributes.hpp"
#include "aidge/utils/ErrorHandling.hpp"
namespace Aidge {
enum class DataType {
@@ -91,7 +92,19 @@ DataFormatTranspose getDataFormatTranspose(const DataFormat& src, const DataForm
class Data {
public:
Data() = delete;
Data(Data&& other) = default;
Data(const Data& other) = default;
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 {
return mType;
}
Loading