BeBOP: pOSKI  v1.0.0
parallel Optimized Sparse Kernel Interface library
 All Files Functions Variables
Functions
poski_PartitionHandler.c File Reference

Handle partitioning model routines. More...

#include <stdio.h>
#include <stdlib.h>
#include <poski/poski_partitioncommon.h>
#include <poski/poski_kernelcommon.h>
#include <poski/poski_matrixcommon.h>
#include <poski/poski_vectorcommon.h>
#include <poski/poski_malloc.h>
#include <poski/poski_print.h>

Functions

poski_partitionarg_t * poski_partitionMatHints (poski_partitiontype_t ptype, poski_int_t npartitions, poski_kernel_t kernel, poski_operation_t op)
 Create a partition-matrix object by user's partitioning hint.
int poski_DestroyPartitionMat (poski_partitionarg_t *args)
 Destroy a partition-matrix object.
poski_partitionvec_t * poski_PartitionVecHints (poski_mat_t A_tunable, poski_kernel_t kernel, poski_operation_t op, poski_vecprop_t vecprop)
 Create a partition-vector object by user's partitioning hint.
int poski_DestroyPartitionVec (poski_partitionvec_t *args)
 Destroy a partition-vector object.

Detailed Description

Handle partitioning model routines.

This module implements the routines to handle the partitioning model.

Attention:
Currently, only support OneD, and SemiOneD partitioning.

Also, refer poski_Partition_common.c, poski_Partition_OneD.c, poski_Partition_SemiOneD.c


Function Documentation

poski_partitionarg_t* poski_partitionMatHints ( poski_partitiontype_t  ptype,
poski_int_t  npartitions,
poski_kernel_t  kernel,
poski_operation_t  op 
)

Create a partition-matrix object by user's partitioning hint.

Note: Currently only take k=0 or 2 for the properties of kernel and operation {2, kernel, op}.

Parameters:
[in]ptypeThe partitioning model type.
[in]npartitionsNumber of partitions.
[in]kernelSpecified kernel.
[in]opSpecified transpose operation.
Returns:
A valid partition object if success, or an error message otherwise.
int poski_DestroyPartitionMat ( poski_partitionarg_t *  args)

Destroy a partition-matrix object.

Parameters:
[in]argsPartition-matrix object.
Returns:
0 if success, or an error message otherwise.
poski_partitionvec_t* poski_PartitionVecHints ( poski_mat_t  A_tunable,
poski_kernel_t  kernel,
poski_operation_t  op,
poski_vecprop_t  vecprop 
)

Create a partition-vector object by user's partitioning hint.

Parameters:
[in]A_tunableTunable matrix object.
[in]kernelSpecified kernel.
[in]opSpecified transpose operation.
[in]vecpropSpecified vector property.
Returns:
A valid partition object if success, or an error message otherwise.
int poski_DestroyPartitionVec ( poski_partitionvec_t *  args)

Destroy a partition-vector object.

Parameters:
[in]argsPartition-vector object.
Returns:
1 if success, or an error message otherwise.