#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oski/common.h>
#include <oski/matrix.h>
#include <oski/matcreate.h>
#include <oski/CSR/module.h>
#include <oski/CSC/format.h>
#include <oski/CSC/module.h>
Defines | |
#define | NUM_STREAMS 2 |
Number of times to stream when estimating the matrix streaming time. | |
Functions | |
int | oski_DestroyMat (oski_matrix_t A_tunable) |
Frees object memory associated with a given matrix object. | |
static int | CopyMatSpecific (const oski_matcommon_t *props, const oski_matspecific_t *src, oski_matspecific_t *dest) |
Duplicate a oski_matspecific_t data structure. | |
oski_matrix_t | oski_CopyMat (const oski_matrix_t A_tunable) |
Creates a copy of a matrix object. | |
static double | MeasureStreamTimeCSR (const void *repr, const oski_matcommon_t *props, oski_timer_t timer) |
Measure the time to stream a CSR data structure, for use in future cost estimates. | |
oski_matrix_t | oski_CreateMatCSR_va (oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_copymode_t mode, int k, va_list ap) |
Explicit variable-argument version of oski_CreateMatCSR(). | |
oski_matrix_t | oski_CreateMatCSR_arr (oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_copymode_t mode, int k, const oski_inmatprop_t *in_props) |
Explicit property-array version of oski_CreateMatCSR(). | |
oski_matrix_t | oski_CreateMatCSR (oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_copymode_t mode, int k,...) |
Creates and returns a valid tunable matrix object from a compressed sparse row (CSR) representation. | |
static double | MeasureStreamTimeCSC (const void *repr, const oski_matcommon_t *props, oski_timer_t timer) |
Measure the time to stream a CSC data structure, for use in future cost estimates. | |
oski_matrix_t | oski_CreateMatCSC_arr (oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_copymode_t mode, int k, const oski_inmatprop_t *in_props) |
Explicit property-array version of oski_CreateMatCSC. | |
oski_matrix_t | oski_CreateMatCSC_va (oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_copymode_t mode, int k, va_list ap) |
Variable-argument version of oski_CreateMatCSC. | |
oski_matrix_t | oski_CreateMatCSC (oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_copymode_t mode, int k,...) |
Creates and returns a valid tunable matrix object from a compressed sparse column (CSC) representation. | |
static double | CalcMatRepr1NormViaCSR (const oski_matspecific_t *A, const oski_matcommon_t *props) |
Compute the 1-norm of a matrix representation by first trying to convert to CSR format, since CSR always has a 1-norm computation routine. | |
double | oski_CalcMat1Norm (const oski_matrix_t A) |
Computes the 1-norm (maximum absolute row sum) of the specified matrix. | |
const oski_matcommon_t * | oski_GetMatProps (const oski_matrix_t A) |
Returns a matrix's type-independent properties. |
|
Duplicate a oski_matspecific_t data structure. This implementation loads the matrix type-specific copy routine and executes it.
|
|
Measure the time to stream a CSR data structure, for use in future cost estimates. Stream NUM_STREAMS times and choose the fastest. |
|
Computes the 1-norm (maximum absolute row sum) of the specified matrix.
|
|
Explicit property-array version of oski_CreateMatCSC. Check input arguments. Collect asserted input matrix properties. Load CSC wrapping routine. Create handle by wrapping input matrix in a matCSC_t data structure. Cache streaming time for future cost estimates. |
|
Explicit property-array version of oski_CreateMatCSR(). Check input arguments. Collect asserted input matrix properties. Load CSR wrapping routine. Create handle by wrapping input matrix in a matCSR_t data structure. Cache streaming time for future cost estimates. |
|
Returns a matrix's type-independent properties.
|