|
| Vector< ValueType, Shape::total_size > | toVector () const |
| | convert tensor to z vector
|
| |
| Tensor< ValueType, Dims... > | operator+ (const Tensor< ValueType, Dims... > &other) const |
| | operator +, used to add two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator+ (const ValueType &other) const |
| | operator +, used to add a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator+= (const Tensor< ValueType, Dims... > &other) |
| | operator +=, used to add two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator+= (const ValueType &other) |
| | operator +=, used to add a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator- (const Tensor< ValueType, Dims... > &other) const |
| | operator -, used to subtract two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator- (const ValueType &other) const |
| | operator -, used to subtract a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator-= (const Tensor< ValueType, Dims... > &other) |
| | operator -=, used to subtract two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator-= (const ValueType &other) |
| | operator -=, used to subtract a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator* (const Tensor< ValueType, Dims... > &other) const |
| | operator *, used to multiply two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator* (const ValueType &other) const |
| | operator *, used to multiply a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator*= (const Tensor< ValueType, Dims... > &other) |
| | operator *=, used to multiply two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator*= (const ValueType &other) |
| | operator *=, used to multiply a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator/ (const Tensor< ValueType, Dims... > &other) const |
| | operator /, used to divide two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator/ (const ValueType &other) const |
| | operator /, used to divide a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator/= (const Tensor< ValueType, Dims... > &other) |
| | operator /=, used to divide two tensors or a tensor and a value
|
| |
| Tensor< ValueType, Dims... > & | operator/= (const ValueType &other) |
| | operator /=, used to divide a tensor and a value
|
| |
| Tensor< ValueType, Dims... > | operator+ () const |
| | operator +, used to return the tensor itself
|
| |
| Tensor< ValueType, Dims... > | operator- () const |
| | operator -, used to return the negative of the tensor
|
| |
| Tensor< bool, Dims... > | operator> (const Tensor< ValueType, Dims... > &other) const |
| | operator >, used to compare two tensors or a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator> (const ValueType &other) const |
| | operator >, used to compare a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator>= (const Tensor< ValueType, Dims... > &other) const |
| | operator >=, used to compare two tensors or a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator>= (const ValueType &other) const |
| | operator >=, used to compare a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator< (const Tensor< ValueType, Dims... > &other) const |
| | operator <, used to compare two tensors or a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator< (const ValueType &other) const |
| | operator <, used to compare a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator<= (const Tensor< ValueType, Dims... > &other) const |
| | operator <=, used to compare two tensors or a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator<= (const ValueType &other) const |
| | operator <=, used to compare a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator== (const Tensor< ValueType, Dims... > &other) const |
| | operator ==, used to compare two tensors or a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator== (const ValueType &other) const |
| | operator ==, used to compare a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator!= (const Tensor< ValueType, Dims... > &other) const |
| | operator !=, used to compare two tensors or a tensor and a value
|
| |
| Tensor< bool, Dims... > | operator!= (const ValueType &other) const |
| | operator !=, used to compare a tensor and a value
|
| |
| TensorBase< T, Dims... > | clone () const |
| | clone function, used to deepcopy a tensor
|
| |
| void | clone (TensorBase< T, Dims... > &other) |
| | deep copy from other tensor without change data_ptr address, this is useful when the original tensor's data ptr is already registerd in somewhere else. (e.g. warped in onnx runtime)
|
| |
| TensorBase< T, Dims... > | DeepCopy () const |
| | DeepCopy function, used to deepcopy a tensor
|
| |
| void | DeepCopy (TensorBase< T, Dims... > &other) |
| | deep copy from other tensor without change data_ptr address, this is useful when the original tensor's data ptr is already registerd in somewhere else. (e.g. warped in onnx runtime)
|
| |
|
| TensorBase () |
| | Construct a new Tensor Base object with all elements set to default value
|
| |
|
| TensorBase (const T &val) |
| | Construct a new Tensor Base object with all elements set to given value
|
| |
| | TensorBase (const std::array< ValueType, Shape::total_size > &data) |
| | Construct a new Tensor Base object, copy from std::array
|
| |
| | TensorBase (std::array< ValueType, Shape::total_size > &&data) |
| | Construct a new Tensor Base object, move from std::array
|
| |
| | TensorBase (const TensorBase &other) noexcept |
| | Construct a new Tensor Base object, copy from another tensor
|
| |
| | TensorBase (TensorBase &&other) noexcept |
| | Construct a new Tensor Base object, move from another tensor
|
| |
| TensorBase< T, Dims... > & | operator= (const TensorBase &other) noexcept |
| | assignment operator, copy from another tensor
|
| |
| TensorBase< T, Dims... > & | operator= (TensorBase &&other) noexcept |
| | assignment operator, move from another tensor
|
| |
| TensorBase< T, Dims... > | clone () const |
| | clone function, used to deepcopy a tensor
|
| |
| TensorBase< T, Dims... > | DeepCopy () const |
| | DeepCopy function, used to deepcopy a tensor
|
| |
| void | DeepCopy (TensorBase< T, Dims... > &other) |
| | deep copy from other tensor without change data_ptr address, this is useful when the original tensor's data ptr is already registerd in somewhere else. (e.g. warped in onnx runtime)
|
| |
| void | clone (TensorBase< T, Dims... > &other) |
| | deep copy from other tensor without change data_ptr address, this is useful when the original tensor's data ptr is already registerd in somewhere else. (e.g. warped in onnx runtime)
|
| |
| bool | same (const TensorBase &other) const |
| | compare two tensors, used to check if the given two tensors are the same tensor.
|
| |
| bool | equal (const TensorBase &other) const |
| | compare two tensors, used to check if the given two tensors are the same tensor.
|
| |
| std::array< ValueType, Shape::total_size > & | Array () |
| | convert to std::array
|
| |
|
const std::array< ValueType, Shape::total_size > & | Array () const |
| |
| ValueType * | data () |
| | get data pointer
|
| |
| T & | operator[] (size_t index) |
| | get data according to index, this function will ignore the shape of tensor, the index is the offset in the memory.
|
| |
| const T & | operator[] (size_t index) const |
| | this function is a overload of operator[], it will return the data according to the index.
|
| |
| T & | operator() (Indices... indices) |
| | get data according to indices, this function will calculate the offset according to the shape of tensor. for example, a tensor with shape {2, 3, 4}, the index (1, 2, 3) will be calculated as 1*3*4 + 2*4 + 3 = 35.
|
| |
| const T & | operator() (Indices... indices) const |
| | this function is a overload of operator(), it will return the data according to the indices.
|
| |
| T & | at (Indices... indices) |
| | get data according to indices, this function will calculate the offset according to the shape of tensor. for example, a tensor with shape {2, 3, 4}, the index (1, 2, 3) will be calculated as 1*3*4 + 2*4 + 3 = 35.
|
| |
| const T & | at (Indices... indices) const |
| | this function is a overload of at, it will return the data according to the indices.
|
| |
|
| TensorBase () |
| | Construct a new Tensor Base object with all elements set to default value
|
| |
|
| TensorBase (const T &val) |
| | Construct a new Tensor Base object with all elements set to given value
|
| |
| | TensorBase (const std::array< ValueType, Shape::total_size > &data) |
| | Construct a new Tensor Base object, copy from std::array
|
| |
| | TensorBase (std::array< ValueType, Shape::total_size > &&data) |
| | Construct a new Tensor Base object, move from std::array
|
| |
| | TensorBase (const TensorBase &other) noexcept |
| | Construct a new Tensor Base object, copy from another tensor
|
| |
| | TensorBase (TensorBase &&other) noexcept |
| | Construct a new Tensor Base object, move from another tensor
|
| |
| TensorBase< T, Dims... > & | operator= (const TensorBase &other) noexcept |
| | assignment operator, copy from another tensor
|
| |
| TensorBase< T, Dims... > & | operator= (TensorBase &&other) noexcept |
| | assignment operator, move from another tensor
|
| |
| TensorBase< T, Dims... > | clone () const |
| | clone function, used to deepcopy a tensor
|
| |
| void | clone (TensorBase< T, Dims... > &other) |
| | deep copy from other tensor without change data_ptr address, this is useful when the original tensor's data ptr is already registerd in somewhere else. (e.g. warped in onnx runtime)
|
| |
| TensorBase< T, Dims... > | DeepCopy () const |
| | DeepCopy function, used to deepcopy a tensor
|
| |
| void | DeepCopy (TensorBase< T, Dims... > &other) |
| | deep copy from other tensor without change data_ptr address, this is useful when the original tensor's data ptr is already registerd in somewhere else. (e.g. warped in onnx runtime)
|
| |
| bool | same (const TensorBase &other) const |
| | compare two tensors, used to check if the given two tensors are the same tensor.
|
| |
| bool | equal (const TensorBase &other) const |
| | compare two tensors, used to check if the given two tensors are the same tensor.
|
| |
| std::array< ValueType, Shape::total_size > & | Array () |
| | convert to std::array
|
| |
|
const std::array< ValueType, Shape::total_size > & | Array () const |
| |
| ValueType * | data () |
| | get data pointer
|
| |
| T & | operator[] (size_t index) |
| | get data according to index, this function will ignore the shape of tensor, the index is the offset in the memory.
|
| |
| const T & | operator[] (size_t index) const |
| | this function is a overload of operator[], it will return the data according to the index.
|
| |
| T & | operator() (Indices... indices) |
| | get data according to indices, this function will calculate the offset according to the shape of tensor. for example, a tensor with shape {2, 3, 4}, the index (1, 2, 3) will be calculated as 1*3*4 + 2*4 + 3 = 35.
|
| |
| const T & | operator() (Indices... indices) const |
| | this function is a overload of operator(), it will return the data according to the indices.
|
| |
| T & | at (Indices... indices) |
| | get data according to indices, this function will calculate the offset according to the shape of tensor. for example, a tensor with shape {2, 3, 4}, the index (1, 2, 3) will be calculated as 1*3*4 + 2*4 + 3 = 35.
|
| |
| const T & | at (Indices... indices) const |
| | this function is a overload of at, it will return the data according to the indices.
|
| |