STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
Cluster

Clusterization routines. More...

Data Structures

struct  starsh_cluster
 Info about clusterization of physical data. More...
 

Typedefs

typedef struct starsh_cluster STARSH_cluster
 

Functions

int starsh_cluster_new (STARSH_cluster **cluster, void *data, STARSH_int ndata, STARSH_int *pivot, STARSH_int nblocks, STARSH_int nlevels, STARSH_int *level, STARSH_int *start, STARSH_int *size, STARSH_int *parent, STARSH_int *child_start, STARSH_int *child, enum STARSH_CLUSTER_TYPE type)
 Init STARSH_cluster object. More...
 
void starsh_cluster_free (STARSH_cluster *cluster)
 
void starsh_cluster_info (STARSH_cluster *cluster)
 
int starsh_cluster_new_plain (STARSH_cluster **cluster, void *data, STARSH_int ndata, STARSH_int block_size)
 Plain division of data into blocks of discrete elements. More...
 

Detailed Description

Clusterization routines.

Typedef Documentation

◆ STARSH_cluster

Typedef for cluster

Function Documentation

◆ starsh_cluster_free()

void starsh_cluster_free ( STARSH_cluster cluster)

Free STARSH_cluster object.

◆ starsh_cluster_info()

void starsh_cluster_info ( STARSH_cluster cluster)

Print some info about STARSH_cluster object.

◆ starsh_cluster_new()

int starsh_cluster_new ( STARSH_cluster **  cluster,
void *  data,
STARSH_int  ndata,
STARSH_int pivot,
STARSH_int  nblocks,
STARSH_int  nlevels,
STARSH_int level,
STARSH_int start,
STARSH_int size,
STARSH_int parent,
STARSH_int child_start,
STARSH_int child,
enum STARSH_CLUSTER_TYPE  type 
)

Init STARSH_cluster object.

This function simply alocates memory and fills fields of STARSH_cluster object. Look at STARSH_cluster to get more info about meaning of each field.

Parameters
[out]clusterAddress of pointer to STARSH_cluster object.
[in]dataPointer structure, holding physical data.
[in]ndataNumber of discrete elements, corresponding to physical data.
[in]pivotPivoting of clusterization. After applying this pivoting, rows (or columns), corresponding to one block are one after another.
[in]nblocksNumber of blocks / block rows / block columns / subclusters.
[in]nlevelsNumber of levels of hierarchy.
[in]levelIndexes of subclusters for each level of hierarchy. Subclusters with indexes from level[i] to level[i+1]-1 inclusively belong to i-th level of hierarchy.
[in]startStart point of of indexes of discrete elements of each block / subcluster in array pivot.
[in]sizeSize of each block / subcluster / block row / block column.
[in]parentArray of parents.
[in]child_startArray of start points in array child of each subcluster.
[in]childArray of children of each subcluster.
[in]typeType of clusterization. Look at STARSH_CLUSTER_TYPE for more info.
Returns
Error code STARSH_ERRNO.

◆ starsh_cluster_new_plain()

int starsh_cluster_new_plain ( STARSH_cluster **  cluster,
void *  data,
STARSH_int  ndata,
STARSH_int  block_size 
)

Plain division of data into blocks of discrete elements.

Non-pivoted non-hierarchical clusterization.

Parameters
[out]clusterAddress of pointer to STARSH_cluster object.
[in]dataPointer to structure, holding physical data.
[in]ndataNumber of discrete elements in physical data.
[in]block_sizeHow many discrete elements should be combined into single block.
Returns
Error code STARSH_ERRNO.
See also
starsh_cluster_new().