C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

Static Public Member Functions | List of all members
HomogenTensor< DataType > Class Template Reference

Class that provides methods to access data stored as a contiguous array of homogeneous data in rows-major format. More...

Static Public Member Functions

static services::SharedPtr
< HomogenTensor< DataType > > 
create (services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (size_t nDim, const size_t *dimSizes, DataType *data, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (size_t nDim, const size_t *dimSizes, const services::SharedPtr< DataType > &data, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (const services::Collection< size_t > &dims, DataType *data, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (const services::Collection< size_t > &dims, const services::SharedPtr< DataType > &data, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (const TensorOffsetLayout &layout, DataType *data, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (const TensorOffsetLayout &layout, const services::SharedPtr< DataType > &data, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (const services::Collection< size_t > &dims, AllocationFlag memoryAllocationFlag, services::Status *stat=NULL)
 
static services::SharedPtr
< HomogenTensor< DataType > > 
create (const services::Collection< size_t > &dims, AllocationFlag memoryAllocationFlag, const DataType initValue, services::Status *stat=NULL)
 

Additional Inherited Members

- Public Types inherited from TensorIface
enum  MemoryStatus { notAllocated = 0, userAllocated = 1, internallyAllocated = 2 }
 Enumeration to specify the status of memory related to the Numeric Table. More...
 
enum  AllocationFlag { doNotAllocate = 0, notAllocate = 0, doAllocate = 1 }
 Enumeration to specify whether the Numeric Table must allocate memory. More...
 

Class Declaration

template<typename DataType = DAAL_DATA_TYPE>
class daal::data_management::interface1::HomogenTensor< DataType >

Template Parameters
DataTypeDefines the underlying data type that describes a tensor
Deprecated:
This item will be removed in a future release.

Constructor & Destructor Documentation

HomogenTensor ( )
inline

Constructs an empty homogeneous tensor

Deprecated:
This item will be removed in a future release.
HomogenTensor ( size_t  nDim,
const size_t *  dimSizes,
DataType *  data 
)
inline

Constructs homogeneous tensor with a user-defined data, number and sizes of dimensions

Parameters
nDimNumber of dimensions
dimSizesArray with sizes for each dimension
dataArray with a homogeneous data set
Deprecated:
This item will be removed in a future release.
HomogenTensor ( size_t  nDim,
const size_t *  dimSizes,
const services::SharedPtr< DataType > &  data 
)
inline

Constructs homogeneous tensor with a user-defined data, number and sizes of dimensions

Parameters
nDimNumber of dimensions
dimSizesArray with sizes for each dimension
dataArray with a homogeneous data set
Deprecated:
This item will be removed in a future release.
HomogenTensor ( const services::Collection< size_t > &  dims,
DataType *  data 
)

Constructs homogeneous tensor with a user-defined data and dimensions

Parameters
dimsCollection of tensor dimensions
dataSize of the byte array
Deprecated:
This item will be removed in a future release.
HomogenTensor ( const services::Collection< size_t > &  dims,
const services::SharedPtr< DataType > &  data 
)

Constructs homogeneous tensor with a user-defined data and dimensions

Parameters
dimsCollection of tensor dimensions
dataArray with a homogeneous data set
Deprecated:
This item will be removed in a future release.
HomogenTensor ( const TensorOffsetLayout layout,
DataType *  data 
)
inline

Constructs homogeneous tensor with a user-defined data and layout

Parameters
[in]layoutTensor layout
[in]dataArray with a homogeneous data set
Deprecated:
This item will be removed in a future release.
HomogenTensor ( const TensorOffsetLayout layout,
const services::SharedPtr< DataType > &  data 
)
inline

Constructs homogeneous tensor with a user-defined data and layout

Parameters
[in]layoutTensor layout
[in]dataArray with a homogeneous data set
Deprecated:
This item will be removed in a future release.
HomogenTensor ( const services::Collection< size_t > &  dims,
AllocationFlag  memoryAllocationFlag 
)
inline

Constructs homogeneous tensor with a user-defined dimensions and memory allocation flag

Parameters
dimsCollection of tensor dimensions
memoryAllocationFlagFlag specifying memory allocation
Deprecated:
This item will be removed in a future release.
HomogenTensor ( const services::Collection< size_t > &  dims,
AllocationFlag  memoryAllocationFlag,
const DataType  initValue 
)
inline

Constructs homogeneous tensor with a user-defined dimensions, memory allocation flag and fills it with the constant values

Parameters
dimsCollection of tensor dimensions
memoryAllocationFlagFlag specifying memory allocation
initValueConstant value
Deprecated:
This item will be removed in a future release.

Member Function Documentation

services::Status assign ( const DataType  initValue)
inline

Fills a tensor with a constant value

Parameters
[in]initValueConstant value to initialize entries of the homogeneous tensor
static services::SharedPtr<HomogenTensor<DataType> > create ( services::Status *  stat = NULL)
inlinestatic

Constructs an empty homogeneous tensor

Parameters
[out]statStatus of the tensor construction
Returns
Empty homogeneous tensor
static services::SharedPtr<HomogenTensor<DataType> > create ( size_t  nDim,
const size_t *  dimSizes,
DataType *  data,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined data, number and sizes of dimensions

Parameters
[in]nDimNumber of dimensions
[in]dimSizesArray with sizes for each dimension
[in]dataArray with a homogeneous data set
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined data, number and sizes of dimensions
static services::SharedPtr<HomogenTensor<DataType> > create ( size_t  nDim,
const size_t *  dimSizes,
const services::SharedPtr< DataType > &  data,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined data, number and sizes of dimensions

Parameters
[in]nDimNumber of dimensions
[in]dimSizesArray with sizes for each dimension
[in]dataArray with a homogeneous data set
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined data, number and sizes of dimensions
static services::SharedPtr<HomogenTensor<DataType> > create ( const services::Collection< size_t > &  dims,
DataType *  data,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined data, number and sizes of dimensions

Parameters
[in]dimsCollection of tensor dimensions
[in]dataArray with a homogeneous data set
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined data, number and sizes of dimensions
static services::SharedPtr<HomogenTensor<DataType> > create ( const services::Collection< size_t > &  dims,
const services::SharedPtr< DataType > &  data,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined data, number and sizes of dimensions

Parameters
[in]dimsCollection of tensor dimensions
[in]dataArray with a homogeneous data set
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined data, number and sizes of dimensions
static services::SharedPtr<HomogenTensor<DataType> > create ( const TensorOffsetLayout layout,
DataType *  data,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined data and layout

Parameters
[in]layoutTensor layout
[in]dataArray with a homogeneous data set
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined data and layout
static services::SharedPtr<HomogenTensor<DataType> > create ( const TensorOffsetLayout layout,
const services::SharedPtr< DataType > &  data,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined data and layout

Parameters
[in]layoutTensor layout
[in]dataArray with a homogeneous data set
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined data and layout
static services::SharedPtr<HomogenTensor<DataType> > create ( const services::Collection< size_t > &  dims,
AllocationFlag  memoryAllocationFlag,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined dimensions and memory allocation flag

Parameters
[in]dimsCollection of tensor dimensions
[in]memoryAllocationFlagFlag specifying memory allocation
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined dimensions
static services::SharedPtr<HomogenTensor<DataType> > create ( const services::Collection< size_t > &  dims,
AllocationFlag  memoryAllocationFlag,
const DataType  initValue,
services::Status *  stat = NULL 
)
inlinestatic

Constructs homogeneous tensor with a user-defined dimensions and memory allocation flag and fills it with the constant values

Parameters
[in]dimsCollection of tensor dimensions
[in]memoryAllocationFlagFlag specifying memory allocation
[in]initValueConstant value
[out]statStatus of the tensor construction
Returns
Homogeneous tensor with a user-defined dimensions
virtual TensorOffsetLayout createDefaultSubtensorLayout ( ) const
inlinevirtual

Creates default tensor layout

Returns
Layout

Implements DenseTensorIface.

virtual TensorOffsetLayout createRawSubtensorLayout ( ) const
inlinevirtual

Creates raw tensor layout

Returns
Layout

Implements DenseTensorIface.

DataType* getArray ( ) const
inline

Returns a pointer to a data set registered in a homogeneous tensor

Returns
Pointer to the data set
services::SharedPtr<DataType> getArraySharedPtr ( ) const
inline

Returns a pointer to a data set registered in a homogeneous tensor

Returns
Pointer to the data set
virtual DAAL_DEPRECATED_VIRTUAL services::SharedPtr<Tensor> getSampleTensor ( size_t  firstDimIndex)
inlinevirtual

Returns new tensor with first dimension limited to one point

Parameters
[in]firstDimIndexIndex of the point in the first dimention
Deprecated:
This item will be removed in a future release.

Implements TensorIface.

services::Status getSubtensor ( size_t  fixedDims,
const size_t *  fixedDimNums,
size_t  rangeDimIdx,
size_t  rangeDimNum,
ReadWriteMode  rwflag,
SubtensorDescriptor< double > &  subtensor 
)
inlinevirtual

Gets subtensor from the tensor

Parameters
[in]fixedDimsThe number of first dimension with fixed values
[in]fixedDimNumsValues at which dimensions are fixed
[in]rangeDimIdxValues for the next dimension after fixed to get data from
[in]rangeDimNumRange for dimension values to get data from
[in]rwflagFlag specifying read/write access to the subtensor
[out]subtensorThe subtensor descriptor.

Reimplemented from DenseTensorIface.

services::Status getSubtensor ( size_t  fixedDims,
const size_t *  fixedDimNums,
size_t  rangeDimIdx,
size_t  rangeDimNum,
ReadWriteMode  rwflag,
SubtensorDescriptor< float > &  subtensor 
)
inlinevirtual

Gets subtensor from the tensor

Parameters
[in]fixedDimsThe number of first dimension with fixed values
[in]fixedDimNumsValues at which dimensions are fixed
[in]rangeDimIdxValues for the next dimension after fixed to get data from
[in]rangeDimNumRange for dimension values to get data from
[in]rwflagFlag specifying read/write access to the subtensor
[out]subtensorThe subtensor descriptor.

Reimplemented from DenseTensorIface.

services::Status getSubtensor ( size_t  fixedDims,
const size_t *  fixedDimNums,
size_t  rangeDimIdx,
size_t  rangeDimNum,
ReadWriteMode  rwflag,
SubtensorDescriptor< int > &  subtensor 
)
inlinevirtual

Gets subtensor from the tensor

Parameters
[in]fixedDimsThe number of first dimension with fixed values
[in]fixedDimNumsValues at which dimensions are fixed
[in]rangeDimIdxValues for the next dimension after fixed to get data from
[in]rangeDimNumRange for dimension values to get data from
[in]rwflagFlag specifying read/write access to the subtensor
[out]subtensorThe subtensor descriptor.

Reimplemented from DenseTensorIface.

services::Status getSubtensorEx ( size_t  fixedDims,
const size_t *  fixedDimNums,
size_t  rangeDimIdx,
size_t  rangeDimNum,
ReadWriteMode  rwflag,
SubtensorDescriptor< double > &  subtensor,
const TensorOffsetLayout layout 
)
virtual

Gets subtensor from the tensor

Parameters
[in]fixedDimsThe number of first dimension with fixed values
[in]fixedDimNumsValues at which dimensions are fixed
[in]rangeDimIdxValues for the next dimension after fixed to get data from
[in]rangeDimNumRange for dimension values to get data from
[in]rwflagFlag specifying read/write access to the subtensor
[out]subtensorThe subtensor descriptor.
[in]layoutLayout of the requested subtensor

Implements DenseTensorIface.

services::Status getSubtensorEx ( size_t  fixedDims,
const size_t *  fixedDimNums,
size_t  rangeDimIdx,
size_t  rangeDimNum,
ReadWriteMode  rwflag,
SubtensorDescriptor< float > &  subtensor,
const TensorOffsetLayout layout 
)
virtual

Gets subtensor from the tensor

Parameters
[in]fixedDimsThe number of first dimension with fixed values
[in]fixedDimNumsValues at which dimensions are fixed
[in]rangeDimIdxValues for the next dimension after fixed to get data from
[in]rangeDimNumRange for dimension values to get data from
[in]rwflagFlag specifying read/write access to the subtensor
[out]subtensorThe subtensor descriptor.
[in]layoutLayout of the requested subtensor

Implements DenseTensorIface.

services::Status getSubtensorEx ( size_t  fixedDims,
const size_t *  fixedDimNums,
size_t  rangeDimIdx,
size_t  rangeDimNum,
ReadWriteMode  rwflag,
SubtensorDescriptor< int > &  subtensor,
const TensorOffsetLayout layout 
)
virtual

Gets subtensor from the tensor

Parameters
[in]fixedDimsThe number of first dimension with fixed values
[in]fixedDimNumsValues at which dimensions are fixed
[in]rangeDimIdxValues for the next dimension after fixed to get data from
[in]rangeDimNumRange for dimension values to get data from
[in]rwflagFlag specifying read/write access to the subtensor
[out]subtensorThe subtensor descriptor.
[in]layoutLayout of the requested subtensor

Implements DenseTensorIface.

TensorOffsetLayout& getTensorLayout ( )
inline

Returns a homogeneous tensor offset layout

Returns
Layout
services::Status releaseSubtensor ( SubtensorDescriptor< double > &  subtensor)
virtual

Releases subtensor

Parameters
[in]subtensorThe subtensor descriptor.

Implements DenseTensorIface.

services::Status releaseSubtensor ( SubtensorDescriptor< float > &  subtensor)
virtual

Releases subtensor

Parameters
[in]subtensorThe subtensor descriptor.

Implements DenseTensorIface.

services::Status releaseSubtensor ( SubtensorDescriptor< int > &  subtensor)
virtual

Releases subtensor

Parameters
[in]subtensorThe subtensor descriptor.

Implements DenseTensorIface.

services::Status setArray ( DataType *const  ptr)
inline

Sets a pointer to a homogeneous data set

Parameters
[in]ptrPointer to the data set in the homogeneous format
services::Status setArray ( const services::SharedPtr< DataType > &  ptr)
inline

Sets a pointer to a homogeneous data set

Parameters
[in]ptrPointer to the data set in the homogeneous format
virtual services::Status setDimensions ( size_t  ndim,
const size_t *  dimSizes 
)
inlinevirtual

Sets the number of dimensions in the Tensor

Parameters
[in]ndimNumber of dimensions
[in]dimSizesArray with sizes for each dimension

Implements TensorIface.

virtual services::Status setDimensions ( const services::Collection< size_t > &  dimensions)
inlinevirtual

Sets the number and size of dimensions in the Tensor

Parameters
[in]dimensionsCollection with sizes for each dimension

Implements TensorIface.


The documentation for this class was generated from the following file:

For more complete information about compiler optimizations, see our Optimization Notice.