class nbla::DlpackArray

class DlpackArray : public nbla::Array

Array with a borrwed memory pointer from other frameworks via DLPack.

Subclassed by nbla::CpuDlpackArray

Public Functions

DlpackArray(const Size_t size, dtypes dtype, const Context &ctx)

Constructor not to finish the construction of this class.

This special constructor is expected to be called from ArrayCreator::create in SyncedArray::get/cast. After the call, DlpackArray::borrow must be done to complete the construction.

virtual void copy_from(const Array *src_array)

Copy from Array.

virtual void zero()

Fill all element with zero.

virtual void fill(float value)

Fill all element with given value.