This commit Enable setting the data type of made operand::Object.
Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
public:
const Shape &shape() const { return _shape; }
const TypeInfo &typeInfo() const { return _typeInfo; }
+ void type(const DataType &type) { _typeInfo.type(type); }
+
size_t total_size() const
{
const auto &dims = _shape.dims();
#include "Info.h"
#include "graph/operand/ParentInfo.h" // TODO Remove this dependency
#include "model/operation/IndexList.h"
+#include "model/operand/DataType.h"
namespace neurun
{
void removeDef(const operation::Index &idx);
public:
+ void type(const DataType &type) { _info.type(type); };
+
+public:
void data(std::unique_ptr<Data> &&data) { _data = std::move(data); }
const Data &data(void) const
{
graph::operand::ParentInfo *parent_info();
private:
- const Info _info;
+ Info _info;
std::unique_ptr<Data> _data;
Usage _usage;
float scale() const { return _scale; }
int32_t offset() const { return _offset; }
+public:
+ void type(const DataType &type) { _type = type; }
+
private:
DataType _type;
float _scale;