@@ -89,9 +89,9 @@ struct DeferredFromShape : public Deferred
8989 }
9090};
9191
92- tensor_i::future_type Creator::create_from_shape (CreatorId op, const shape_type & shape, DTypeId dtype)
92+ ddptensor * Creator::create_from_shape (CreatorId op, const shape_type & shape, DTypeId dtype)
9393{
94- return defer<DeferredFromShape>(op, shape, dtype);
94+ return new ddptensor ( defer<DeferredFromShape>(op, shape, dtype) );
9595}
9696
9797struct DeferredFull : public Deferred
@@ -125,10 +125,10 @@ struct DeferredFull : public Deferred
125125 }
126126};
127127
128- tensor_i::future_type Creator::full (const shape_type & shape, const py::object & val, DTypeId dtype)
128+ ddptensor * Creator::full (const shape_type & shape, const py::object & val, DTypeId dtype)
129129{
130130 auto v = mk_scalar (val, dtype);
131- return defer<DeferredFull>(shape, v, dtype);
131+ return new ddptensor ( defer<DeferredFull>(shape, v, dtype) );
132132}
133133
134134struct DeferredArange : public Deferred
@@ -161,15 +161,15 @@ struct DeferredArange : public Deferred
161161 }
162162};
163163
164- tensor_i::future_type Creator::arange (uint64_t start, uint64_t end, uint64_t step, DTypeId dtype)
164+ ddptensor * Creator::arange (uint64_t start, uint64_t end, uint64_t step, DTypeId dtype)
165165{
166- return defer<DeferredArange>(start, end, step, dtype);
166+ return new ddptensor ( defer<DeferredArange>(start, end, step, dtype) );
167167}
168168
169- tensor_i::future_type Creator::mk_future (const py::object & b)
169+ ddptensor * Creator::mk_future (const py::object & b)
170170{
171- if (py::isinstance<tensor_i::future_type >(b)) {
172- return b.cast <tensor_i::future_type >();
171+ if (py::isinstance<ddptensor >(b)) {
172+ return b.cast <ddptensor* >();
173173 } else if (py::isinstance<py::float_>(b)) {
174174 return Creator::full ({1 }, b, FLOAT64);
175175 } else if (py::isinstance<py::int_>(b)) {
0 commit comments