convert.c File Reference


Detailed Description

Conversion between CSR and BDIAG1 format.

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <oski/config.h>
#include <oski/common.h>
#include <oski/modloader.h>
#include <oski/matrix.h>
#include <oski/CSR/format.h>
#include <oski/BDIAG1/format.h>
#include <oski/BDIAG1/module.h>
#include <oski/xforms_internal.h>

Defines

#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 Returns the minimum of two values.

Functions

static oski_matBDIAG1_tCreateFromCSR (oski_index_t b, oski_index_t d, const oski_matCSR_t *mat, const oski_matcommon_t *props)
 Create a BDIAG1 matrix from a CSR representation.
void * oski_CreateMatReprFromCSR (const oski_matCSR_t *mat, const oski_matcommon_t *props,...)
 Method: Instantiate from an existing CSR representation.
oski_matCSR_toski_ConvertMatReprToCSR (const void *mat, const oski_matcommon_t *props)
 Method: Convert to CSR format.
void * oski_CopyMatRepr (const void *mat, const oski_matcommon_t *props)
 Method: Duplicate a matrix representation.
void oski_DestroyMatRepr (void *mat)
 Method: Destroy matrix type-specific representation.
int oski_CreateLuaMatReprFromCSR (lua_State *L)
 Matrix-type specific method to convert from a CSR matrix, with arguments passed on the Lua stack.


Function Documentation

static oski_matBDIAG1_t* CreateFromCSR oski_index_t  b,
oski_index_t  d,
const oski_matCSR_t mat,
const oski_matcommon_t props
[static]
 

Create a BDIAG1 matrix from a CSR representation.

This routine extracts a block diagonal beginning at column $j_0$ of $m\times n$ input matrix $A$. This block diagonal consists of dense $b b$ blocks, with up to 1 additional $b' b'$ block in the event that $b$ does not divide $\{m,n-j_0$ (i.e., $b' = {mod}(\{m,n-j_0, b)


Generated on Wed Sep 19 16:41:21 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6