24.02.1
|
Go to the documentation of this file.
31 : _id(id), _desc(std::move(desc)), _handle(nullptr), _accessor(nullptr), _bound_edges()
52 _handle = std::move(backend_tensor);
67 return _accessor.get();
72 return std::move(_accessor);
78 if (!_accessor || !_handle)
83 const bool access_data = _accessor->access_tensor_data();
91 if (_handle->tensor().buffer() ==
nullptr)
98 bool retval = _accessor->access_tensor(_handle->tensor());
111 _bound_edges.insert(eid);
116 _bound_edges.erase(eid);
std::set< EdgeID > bound_edges() const
Accessor the edges that are bound with the tensor.
ITensorAccessor * accessor()
Backend tensor accessor.
void set_handle(std::unique_ptr< ITensorHandle > backend_tensor)
Sets the backend tensor.
void set_accessor(std::unique_ptr< ITensorAccessor > accessor)
Sets the backend tensor accessor.
TensorDescriptor & desc()
TensorInfo metadata accessor.
ITensorHandle * handle()
Backend tensor handle accessor.
void bind_edge(EdgeID eid)
Binds the tensor with an edge.
void unbind_edge(EdgeID eid)
Unbinds an edge from a tensor.
Tensor accessor interface.
TensorID id() const
Tensor ID accessor.
Copyright (c) 2017-2024 Arm Limited.
std::unique_ptr< ITensorAccessor > extract_accessor()
Extracts accessor from the tensor.
Tensor(TensorID id, TensorDescriptor desc)
Default constructor.
bool call_accessor()
Calls accessor on tensor.
Tensor handle interface object.