ONE - On-device Neural Engine
|
Non-quantized (plain) Weight Data Accessor. More...
#include <PlainWeightContext.h>
Public Member Functions | |
virtual | ~PlainWeightContext ()=default |
virtual Span< T > | allocate (const Bag *)=0 |
Allocate a weight space for a given blob. | |
virtual Span< T > | weight (const Bag *)=0 |
Return a pointer to the underlying storage. | |
virtual std::unique_ptr< nncc::core::ADT::kernel::Accessor< T > > | access (const KernelObject *)=0 |
virtual std::unique_ptr< nncc::core::ADT::kernel::Reader< T > > | read (const KernelObject *) const =0 |
Non-quantized (plain) Weight Data Accessor.
Definition at line 36 of file PlainWeightContext.h.
|
virtualdefault |
|
pure virtual |
|
pure virtual |
Allocate a weight space for a given blob.
@require the following code SHOULD work for any bag "b": PlainWeightContext<T> ctx;
auto span = ctx.allocate(b); assert(span.data() != nullptr); assert(span.size() == bag->size());
|
pure virtual |
|
pure virtual |
Return a pointer to the underlying storage.