STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
Random TLR matrix

Synthetic random TLR matrix routines. More...

Collaboration diagram for Random TLR matrix:

Data Structures

struct  starsh_randtlr
 Structure for synthetic TLR matrices. More...
 

Typedefs

typedef struct starsh_randtlr STARSH_randtlr
 Structure for synthetic TLR matrices.
 

Enumerations

enum  STARSH_RANDTLR_KERNEL { STARSH_RANDTLR_KERNEL1 = 1 }
 List of built-in kernels for starsh_randtlr_get_kernel(). More...
 
enum  STARSH_RANDTLR_PARAM { STARSH_RANDTLR_NB = 1, STARSH_RANDTLR_DECAY = 2, STARSH_RANDTLR_DIAG = 3 }
 List of parameters for starsh_application(). More...
 

Functions

void starsh_randtlr_block_kernel (int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
 The only kernel for STARSH_randtlr object. More...
 
int starsh_randtlr_generate (STARSH_randtlr **data, STARSH_int count, STARSH_int block_size, double decay, double diag)
 Generate STARSH_randtlr object for random TLR matrix. More...
 
int starsh_randtlr_generate_va (STARSH_randtlr **data, STARSH_int count, va_list args)
 Generate STARSH_randtlr object with incomplete set of parameters. More...
 
int starsh_randtlr_generate_el (STARSH_randtlr **data, STARSH_int count,...)
 Generate STARSH_randtlr object with incomplete set of parameters. More...
 
int starsh_randtlr_get_kernel (STARSH_kernel **kernel, STARSH_randtlr *data, enum STARSH_RANDTLR_KERNEL type)
 Get kernel for spatial statistics problem. More...
 
void starsh_randtlr_free (STARSH_randtlr *data)
 Free memory of STARSH_randtlr object. More...
 

Detailed Description

Synthetic random TLR matrix routines.

STARSH_randtlr is about generation of TLR matrix in a special form. Each tile is generated as a multiplication of 3 matrices: \( U_i \), \( S \) and \( U_j \), where \( i \) and \( j \) are row and column indexes of some orthogonal matrix \( U \) and \( S \) is a diagonal matrix.

Enumeration Type Documentation

◆ STARSH_RANDTLR_KERNEL

List of built-in kernels for starsh_randtlr_get_kernel().

There is only one kernel right now, this structure is to support future methods to generate synthetic matrices.

Enumerator
STARSH_RANDTLR_KERNEL1 

The only kernel.

◆ STARSH_RANDTLR_PARAM

List of parameters for starsh_application().

In the table below each constant correspond to a given argument and type for starsh_randtlr_generate(). These constants are used to generate problem with incomplete set of parameters via starsh_application(), starsh_randtlr_generate_va() or starsh_randtlr_generate_el().

See also
starsh_application(), starsh_randtlr_generate(), starsh_randtlr_generate_va(), starsh_randtlr_generate_el().
Enumerator
STARSH_RANDTLR_NB 

Size of tiles.

STARSH_RANDTLR_DECAY 

Decay of singular values, first singular value is 1.0.

STARSH_RANDTLR_DIAG 

Value to add to diagonal elements.

Function Documentation

◆ starsh_randtlr_block_kernel()

void starsh_randtlr_block_kernel ( int  nrows,
int  ncols,
STARSH_int irow,
STARSH_int icol,
void *  row_data,
void *  col_data,
void *  result,
int  ld 
)

The only kernel for STARSH_randtlr object.

Parameters
[in]nrowsNumber of rows of \( A \).
[in]ncolsNumber of columns of \( A \).
[in]irowArray of row indexes.
[in]icolArray of column indexes.
[in]row_dataPointer to physical data (STARSH_randtlr object).
[in]col_dataPointer to physical data (STARSH_randtlr object).
[out]resultPointer to memory of \( A \).
[in]ldLeading dimension of result.

◆ starsh_randtlr_free()

void starsh_randtlr_free ( STARSH_randtlr data)

Free memory of STARSH_randtlr object.

See also
starsh_randtlr_generate().

◆ starsh_randtlr_generate()

int starsh_randtlr_generate ( STARSH_randtlr **  data,
STARSH_int  count,
STARSH_int  block_size,
double  decay,
double  diag 
)

Generate STARSH_randtlr object for random TLR matrix.

Parameters
[out]dataAddress of pointer to STARSH_randtlr object.
[in]countSize of matrix.
[in]block_sizeSize of each tile.
[in]decayDecay of singular values, first value is 1.0.
[in]diagValue to add to each diagonal element.
Returns
Error code STARSH_ERRNO.

◆ starsh_randtlr_generate_el()

int starsh_randtlr_generate_el ( STARSH_randtlr **  data,
STARSH_int  count,
  ... 
)

Generate STARSH_randtlr object with incomplete set of parameters.

Parses possibly incomplete set of parameters for starsh_randtlr_generate(). If argument is not in the ..., then its default value is used:

Argument Default value Type –
block_size count STARSH_int
decay 0.0 double
diag 0.0 double

List of arguments ... should look as pairs (Arg.constant, Value) with 0 as a last argument. For correspondance of arguments and arg.constants take a look at STARSH_RANDTLR_PARAM.

Parameters
[out]dataAddress of pointer to STARSH_randtlr object.
[in]countSize of matrix.
[in]...Variable amount of arguments.
Returns
Error code STARSH_ERRNO.
Examples
See also
starsh_randtlr_generate(), starsh_randtlr_generate_va().

◆ starsh_randtlr_generate_va()

int starsh_randtlr_generate_va ( STARSH_randtlr **  data,
STARSH_int  count,
va_list  args 
)

Generate STARSH_randtlr object with incomplete set of parameters.

Parse possibly incomplete set of parameters for starsh_randtlr_generate(). If argument is not in the args, then its default value is used:

Argument Default value Type –
block_size count STARSH_int
decay 0.0 double
diag 0.0 double

List of arguments args should look as pairs (Arg.constant, Value) with 0 as a last argument. For correspondance of arguments and arg.constants take a look at STARSH_RANDTLR_PARAM.

Parameters
[out]dataAddress of pointer to STARSH_randtlr object.
[in]countSize of matrix.
[in]argsArguments, packed into va_args.
Returns
Error code STARSH_ERRNO.
Examples
See also
starsh_randtlr_generate(), starsh_randtlr_generate_el().

◆ starsh_randtlr_get_kernel()

int starsh_randtlr_get_kernel ( STARSH_kernel **  kernel,
STARSH_randtlr data,
enum STARSH_RANDTLR_KERNEL  type 
)

Get kernel for spatial statistics problem.

Kernel can be selected with this call or manually. Currently, there is only one kernel for STARSH_randtlr problem.

Parameters
[out]kernelAddress of pointer to STARSH_kernel function.
[in]dataPointer to STARSH_randtlr object.
[in]typeType of kernel. For more info look at STARSH_RANDTLR_KERNEL.
Returns
Error code STARSH_ERRNO.
See also
starsh_randtlr_block_kernel().