LibraryLink Utilities  3.0.1
Modern C++ wrapper over LibraryLink and WSTP
LLU::TensorInterface Struct Referenceabstract

Description

Abstract class that defines a basic set of operations on a tensor.

+ Inheritance diagram for LLU::TensorInterface:

#include <Interfaces.h>

Public Member Functions

virtual mint getRank () const =0
 Get rank. More...
 
virtual mint const * getDimensions () const =0
 Get dimensions. More...
 
virtual mint getFlattenedLength () const =0
 Get total length. More...
 
virtual mint type () const =0
 Get the data type of this tensor. More...
 
virtual void * rawData () const =0
 Get raw pointer to the data of this tensor. More...
 

Member Function Documentation

◆ getDimensions()

virtual mint const* LLU::TensorInterface::getDimensions ( ) const
pure virtual

Get dimensions.

Returns
raw pointer to dimensions of this tensor
See also
http://reference.wolfram.com/language/LibraryLink/ref/callback/MTensor_getDimensions.html

Implemented in LLU::MContainer< MArgumentType::Tensor >, and LLU::TensorView.

◆ getFlattenedLength()

virtual mint LLU::TensorInterface::getFlattenedLength ( ) const
pure virtual

◆ getRank()

virtual mint LLU::TensorInterface::getRank ( ) const
pure virtual

◆ rawData()

virtual void* LLU::TensorInterface::rawData ( ) const
pure virtual

Get raw pointer to the data of this tensor.

Implemented in LLU::MContainer< MArgumentType::Tensor >, and LLU::TensorView.

◆ type()

virtual mint LLU::TensorInterface::type ( ) const
pure virtual

Get the data type of this tensor.

Returns
type of elements (MType_Integer, MType_Real or MType_Complex)
See also
http://reference.wolfram.com/language/LibraryLink/ref/callback/MTensor_getType.html

Implemented in LLU::MContainer< MArgumentType::Tensor >, and LLU::TensorView.