BeBOP: pOSKI
v1.0.0
parallel Optimized Sparse Kernel Interface library
|
Handle the Sparse matrix kernels. More...
#include <stdio.h>
#include <stdlib.h>
#include <poski/poski_kernelcommon.h>
#include <poski/poski_partitioncommon.h>
#include <poski/poski_matrixcommon.h>
#include <poski/poski_vectorcommon.h>
#include <poski/poski_vector.h>
#include <poski/poski_print.h>
Functions | |
int | poski_Set_MatMult (poski_mat_t A, poski_operation_t op, poski_value_t alpha, poski_vec_t x, poski_value_t beta, poski_vec_t y) |
Set parameters for sparse matrix-vector multiply. | |
int | poski_MatMult (poski_mat_t A, poski_operation_t op, poski_value_t alpha, poski_vec_t x, poski_value_t beta, poski_vec_t y) |
Sparse matrix-vector multiply implementation. | |
int | poski_report_MatMultCSR (poski_sparse_matrix_t *A, poski_value_t alpha, poski_value_t *x, poski_value_t beta, poski_value_t *y) |
Report the information related with sparse matrix-vector multiply computation. |
Handle the Sparse matrix kernels.
This module implements the library's support kernels which perform error-checking first and then calls the appropriate kernel implementation.
Also, refer poski_Kernel_common.c, poski_Kernel_matmult.c
int poski_Set_MatMult | ( | poski_mat_t | A, |
poski_operation_t | op, | ||
poski_value_t | alpha, | ||
poski_vec_t | x, | ||
poski_value_t | beta, | ||
poski_vec_t | y | ||
) |
Set parameters for sparse matrix-vector multiply.
[in] | A | Sparse matrix object. |
[in] | op | Specifies the transpose operations, in {OP_NORMAL, OP_TRANS}. |
[in] | alpha | Scalar multiplier. |
[in] | x | Vector view object. |
[in] | beta | Scalar multiplier. |
[in] | y | Vector view object. |
int poski_MatMult | ( | poski_mat_t | A, |
poski_operation_t | op, | ||
poski_value_t | alpha, | ||
poski_vec_t | x, | ||
poski_value_t | beta, | ||
poski_vec_t | y | ||
) |
Sparse matrix-vector multiply implementation.
[in] | A | Sparse matrix object. |
[in] | op | Specifies the transpose operations, in {OP_NORMAL, OP_TRANS}. |
[in] | alpha | Scalar multiplier. |
[in] | x | Vector view object. |
[in] | beta | Scalar multiplier. |
[in] | y | Vector view object. |
This routine performs as follows:
(1) error-check for the input parameters.
(2) run an appropriate kernel operation, currently only support transpose operations.
(3) run an appropriate permute operation if required.
(4) run an appropriate reduction operation if required.
int poski_report_MatMultCSR | ( | poski_sparse_matrix_t * | A, |
poski_value_t | alpha, | ||
poski_value_t * | x, | ||
poski_value_t | beta, | ||
poski_value_t * | y | ||
) |
Report the information related with sparse matrix-vector multiply computation.
[in] | A | Sparse matrix object in CSR format. |
[in] | alpha | Scalar multiplier. |
[in] | x | Vector data pointer. |
[in] | beta | Scalar multiplier. |
[in] | y | Vector data pointer. |