GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
bincrs_func.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include "ghost/util.h"
#include "ghost/bincrs.h"
#include "ghost/machine.h"
#include "ghost/locality.h"
Include dependency graph for bincrs_func.c:

Macros

#define _XOPEN_SOURCE   500
 
#define SWAPREQ(header)   (header.endianess == GHOST_BINCRS_LITTLE_ENDIAN)?ghost_machine_bigendian()?1:0:ghost_machine_bigendian()?0:1
 

Functions

static uint32_t bswap_32 (uint32_t val)
 
static uint64_t bswap_64 (uint64_t val)
 
int ghost_sparsemat_rowfunc_bincrs (ghost_gidx row, ghost_lidx *rowlen, ghost_gidx *col, void *val, void *arg)
 
ghost_error ghost_bincrs_header_read (ghost_bincrs_header_t *header, char *matrixPath)
 

Macro Definition Documentation

#define _XOPEN_SOURCE   500
#define SWAPREQ (   header)    (header.endianess == GHOST_BINCRS_LITTLE_ENDIAN)?ghost_machine_bigendian()?1:0:ghost_machine_bigendian()?0:1

Function Documentation

static uint32_t bswap_32 ( uint32_t  val)
inlinestatic
static uint64_t bswap_64 ( uint64_t  val)
inlinestatic
ghost_error ghost_bincrs_header_read ( ghost_bincrs_header_t header,
char *  matrixPath 
)

Here is the call graph for this function:

int ghost_sparsemat_rowfunc_bincrs ( ghost_gidx  row,
ghost_lidx rowlen,
ghost_gidx col,
void *  val,
void *  arg 
)
Parameters
row
rowlen
col
val
Returns

If called with row #GHOST_SPARSEMAT_ROWFUNC_BINCRS_ROW_INIT, the parameter val has to be a ghost_sparsemat_rowfunc_bincrs_initargs * with the according information filled in. The parameter col has to be a ghost_gidx[2] in which the number of rows and columns will be stored.

Here is the call graph for this function: