Class that provides methods to access data stored as a contiguous array of homogeneous data in rows-major format.
More...
|
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) |
|
template<typename DataType = DAAL_DATA_TYPE>
class daal::data_management::interface1::HomogenTensor< DataType >
- Template Parameters
-
DataType | Defines the underlying data type that describes a tensor |
- Deprecated:
- This item will be removed in a future release.
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
-
nDim | Number of dimensions |
dimSizes | Array with sizes for each dimension |
data | Array 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
-
nDim | Number of dimensions |
dimSizes | Array with sizes for each dimension |
data | Array 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
-
dims | Collection of tensor dimensions |
data | Size 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
-
dims | Collection of tensor dimensions |
data | Array with a homogeneous data set |
- Deprecated:
- This item will be removed in a future release.
Constructs homogeneous tensor with a user-defined data and layout
- Parameters
-
[in] | layout | Tensor layout |
[in] | data | Array with a homogeneous data set |
- Deprecated:
- This item will be removed in a future release.
Constructs homogeneous tensor with a user-defined data and layout
- Parameters
-
[in] | layout | Tensor layout |
[in] | data | Array with a homogeneous data set |
- Deprecated:
- This item will be removed in a future release.
Constructs homogeneous tensor with a user-defined dimensions and memory allocation flag
- Parameters
-
dims | Collection of tensor dimensions |
memoryAllocationFlag | Flag specifying memory allocation |
- Deprecated:
- This item will be removed in a future release.
Constructs homogeneous tensor with a user-defined dimensions, memory allocation flag and fills it with the constant values
- Parameters
-
dims | Collection of tensor dimensions |
memoryAllocationFlag | Flag specifying memory allocation |
initValue | Constant value |
- Deprecated:
- This item will be removed in a future release.
services::Status assign |
( |
const DataType |
initValue | ) |
|
|
inline |
Fills a tensor with a constant value
- Parameters
-
[in] | initValue | Constant 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] | stat | Status 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] | nDim | Number of dimensions |
[in] | dimSizes | Array with sizes for each dimension |
[in] | data | Array with a homogeneous data set |
[out] | stat | Status 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] | nDim | Number of dimensions |
[in] | dimSizes | Array with sizes for each dimension |
[in] | data | Array with a homogeneous data set |
[out] | stat | Status 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] | dims | Collection of tensor dimensions |
[in] | data | Array with a homogeneous data set |
[out] | stat | Status 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] | dims | Collection of tensor dimensions |
[in] | data | Array with a homogeneous data set |
[out] | stat | Status of the tensor construction |
- Returns
- Homogeneous tensor with a user-defined data, number and sizes of dimensions
Constructs homogeneous tensor with a user-defined data and layout
- Parameters
-
[in] | layout | Tensor layout |
[in] | data | Array with a homogeneous data set |
[out] | stat | Status 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] | layout | Tensor layout |
[in] | data | Array with a homogeneous data set |
[out] | stat | Status 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] | dims | Collection of tensor dimensions |
[in] | memoryAllocationFlag | Flag specifying memory allocation |
[out] | stat | Status 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] | dims | Collection of tensor dimensions |
[in] | memoryAllocationFlag | Flag specifying memory allocation |
[in] | initValue | Constant value |
[out] | stat | Status of the tensor construction |
- Returns
- Homogeneous tensor with a user-defined dimensions
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] | firstDimIndex | Index 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] | fixedDims | The number of first dimension with fixed values |
[in] | fixedDimNums | Values at which dimensions are fixed |
[in] | rangeDimIdx | Values for the next dimension after fixed to get data from |
[in] | rangeDimNum | Range for dimension values to get data from |
[in] | rwflag | Flag specifying read/write access to the subtensor |
[out] | subtensor | The 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] | fixedDims | The number of first dimension with fixed values |
[in] | fixedDimNums | Values at which dimensions are fixed |
[in] | rangeDimIdx | Values for the next dimension after fixed to get data from |
[in] | rangeDimNum | Range for dimension values to get data from |
[in] | rwflag | Flag specifying read/write access to the subtensor |
[out] | subtensor | The 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] | fixedDims | The number of first dimension with fixed values |
[in] | fixedDimNums | Values at which dimensions are fixed |
[in] | rangeDimIdx | Values for the next dimension after fixed to get data from |
[in] | rangeDimNum | Range for dimension values to get data from |
[in] | rwflag | Flag specifying read/write access to the subtensor |
[out] | subtensor | The 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] | fixedDims | The number of first dimension with fixed values |
[in] | fixedDimNums | Values at which dimensions are fixed |
[in] | rangeDimIdx | Values for the next dimension after fixed to get data from |
[in] | rangeDimNum | Range for dimension values to get data from |
[in] | rwflag | Flag specifying read/write access to the subtensor |
[out] | subtensor | The subtensor descriptor. |
[in] | layout | Layout 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] | fixedDims | The number of first dimension with fixed values |
[in] | fixedDimNums | Values at which dimensions are fixed |
[in] | rangeDimIdx | Values for the next dimension after fixed to get data from |
[in] | rangeDimNum | Range for dimension values to get data from |
[in] | rwflag | Flag specifying read/write access to the subtensor |
[out] | subtensor | The subtensor descriptor. |
[in] | layout | Layout 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] | fixedDims | The number of first dimension with fixed values |
[in] | fixedDimNums | Values at which dimensions are fixed |
[in] | rangeDimIdx | Values for the next dimension after fixed to get data from |
[in] | rangeDimNum | Range for dimension values to get data from |
[in] | rwflag | Flag specifying read/write access to the subtensor |
[out] | subtensor | The subtensor descriptor. |
[in] | layout | Layout of the requested subtensor |
Implements DenseTensorIface.
Returns a homogeneous tensor offset layout
- Returns
- Layout
Releases subtensor
- Parameters
-
[in] | subtensor | The subtensor descriptor. |
Implements DenseTensorIface.
Releases subtensor
- Parameters
-
[in] | subtensor | The subtensor descriptor. |
Implements DenseTensorIface.
Releases subtensor
- Parameters
-
[in] | subtensor | The subtensor descriptor. |
Implements DenseTensorIface.
services::Status setArray |
( |
DataType *const |
ptr | ) |
|
|
inline |
Sets a pointer to a homogeneous data set
- Parameters
-
[in] | ptr | Pointer 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] | ptr | Pointer 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] | ndim | Number of dimensions |
[in] | dimSizes | Array 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] | dimensions | Collection with sizes for each dimension |
Implements TensorIface.
The documentation for this class was generated from the following file: