Class TensorAllocator

Class Documentation

class TensorAllocator

Public Functions

TensorAllocator(Ptr<Backend> backend)
TensorAllocator(Ptr<Backend> backend, Ptr<Device> device)
~TensorAllocator()
void throwAtReallocation(bool throwRealloc)
void reserve(size_t bytes = 0)
void reserveExact(const std::vector<size_t> &bytes)
void reserveExact(size_t bytes = 0)
void clear()
size_t capacity(Shape shape, Type type = Type::float32)
void allocate(Tensor &t, Shape shape, Type type = Type::float32)
void free(const Tensor &t)
Tensor asTensor(Type type = Type::float32)
size_t size(Type type = Type::float32)
Ptr<Allocator> allocator()