Class FloatTensor

Inheritance Relationships

Base Type

Derived Type

Class Documentation

com::qualcomm::qti::snpe::FloatTensor : public com.qualcomm.qti.snpe.Tensor

Tensor class containing float elements.

Subclassed by com.qualcomm.qti.snpe.internal.NativeFloatTensor

Public Functions

abstract void write (float[] value, int offset, int length, int... position)

Writes the range of the provided input array into the tensor at the specified position.

Parameters
  • value – float values to write.

  • offset – start position to read from the input array.

  • length – number of floats to read from the input array.

  • position – the zero indexed position for each of the tensor dimensions to start writing to.

abstract void write (float value, int... position)

Writes a single float value to the specified position.

Parameters
  • value – float value.

  • position – the zero indexed position for each of the tensor dimensions to start writing to.

abstract int read (float[] value, int offset, int length, int... position)

Reads elements from the tensor into the specified array range starting at the specified tensor position.

Parameters
  • value – array to read values into.

  • offset – start offset to write into array.

  • length – number of elements to write into array.

  • position – the zero indexed position for each of the tensor dimensions to start reading from.

Returns

number of elements read.

abstract float read (int... position)

Reads a single value from the tensor.

Parameters

position – the zero indexed position for each of the tensor dimensions to start reading from.

Returns

the value at the specified position.

Protected Functions

inline  FloatTensor (final int ...shape)