BIGtensor-GPU  1.0
Manipulation Class Referenceabstract

Compute essential tensor operations. More...

Inheritance diagram for Manipulation:
BIGtensor

Public Member Functions

void Collapse (int collapse_mode, char *in_tensor_path, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Collapsing a mode of a tensor. More...
 
void ConvertSign (char *in_tensor_path, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Converting signs of a tensor. More...
 
void ConvertToBinaryTensor (char *in_tensor_path, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Converting a tensor into a binary tensor. More...
 
void Find (int *index, char *in_tensor_path, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Finding elements satisfying certain conditions or index in a tensor. More...
 
void Matricize (int mode, char *in_tensor_path, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Matricization of a tensor to certain mode. More...
 
void Fold (char *in_tensor_path, int order, int mode, int *dim, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Converting a matrix into a tensor. More...
 
void Norm (char type, char *in_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Computing L1-norm or L-F norm of a tensor. More...
 
void PermutateModes (int *modes, char *in_tensor_path, char *out_tensor_path, const GPU_MODE _gpu_mode=ANY)
 Permuting the order of modes of a tensor (transpose in a matrix) More...
 
void ScalarOP (char *in_tensor_path, char op, const float val, char *out_tensor_path, const GPU_MODE _gpu_mode)
 Execution of scalar operations (+, -, *, /) More...
 
void Scale (char *in_tensor_path, const int new_mode, char *out_tensor_path, const GPU_MODE _gpu_mode)
 Expansion of a tensor to given a new mode. More...
 

Detailed Description

Compute essential tensor operations.

Member Function Documentation

◆ Collapse()

void Manipulation::Collapse ( int  collapse_mode,
char *  in_tensor_path,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Collapsing a mode of a tensor.

Parameters
collapse_modemode of a tensor to collapse
in_tensor_pathinput tensor path
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ ConvertSign()

void Manipulation::ConvertSign ( char *  in_tensor_path,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Converting signs of a tensor.

Parameters
in_tensor_pathinput tensor path
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ ConvertToBinaryTensor()

void Manipulation::ConvertToBinaryTensor ( char *  in_tensor_path,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Converting a tensor into a binary tensor.

Parameters
in_tensor_pathinput tensor path
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ Find()

void Manipulation::Find ( int *  index,
char *  in_tensor_path,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Finding elements satisfying certain conditions or index in a tensor.

Parameters
indexindex in the tensor
in_tensor_pathinput tensor path
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ Fold()

void Manipulation::Fold ( char *  in_csr_path,
int  order,
int  mode,
int *  dim,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Converting a matrix into a tensor.

Parameters
in_csr_pathinput tensor path
orderthe order of a tensor
modethe mode of a tensor to fold
dimthe dimension of a tensor
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ Matricize()

void Manipulation::Matricize ( int  mode,
char *  in_tensor_path,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Matricization of a tensor to certain mode.

Parameters
modethe mode of tensor
in_tensor_pathinput tensor path
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ Norm()

void Manipulation::Norm ( char  type,
char *  in_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Computing L1-norm or L-F norm of a tensor.

Parameters
typetype of normalization
in_tensor_pathinput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ PermutateModes()

void Manipulation::PermutateModes ( int *  modes,
char *  in_tensor_path,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode = ANY 
)

Permuting the order of modes of a tensor (transpose in a matrix)

Parameters
modeslist of modes to permutate
in_tensor_pathinput tensor path
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ ScalarOP()

void Manipulation::ScalarOP ( char *  in_tensor_path,
char  op,
const float  val,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode 
)

Execution of scalar operations (+, -, *, /)

Parameters
in_tensor_pathinput tensor path
opoperator (supporting: +, -, *, /)
valoperation value (e.g.: val is 0.3 in 'x + 0.3')
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None

◆ Scale()

void Manipulation::Scale ( char *  in_tensor_path,
const int  new_mode,
char *  out_tensor_path,
const GPU_MODE  _gpu_mode 
)

Expansion of a tensor to given a new mode.

Parameters
in_tensor_pathinput tensor path
new_modenew mode
out_tensor_pathoutput tensor path
_gpu_modegpu mode for this computation (default: gpu_mode of a BIGtensor instance)
Returns
None
Exceptions
None