inmatprop.c File Reference


Detailed Description

Input matrix properties collection and inspection.

See also:
oski/inmatprop.h

#include <assert.h>
#include <oski/common.h>
#include <oski/inmatprop.h>

Functions

void oski_ClearInMatPropSet (oski_inmatpropset_t *props)
 Initialize property set with "unset" values.
void oski_CompleteDefaultInMatPropSet (oski_inmatpropset_t *props)
 Complete unitialized properties with default values.
int oski_IsInMatPropSetConsistent (const oski_inmatpropset_t *props)
 Checks an input matrix property set for consistency.
void oski_DisplayInMatPropSet (const oski_inmatpropset_t *props)
 Display an input matrix's asserted properties (FOR DEBUGGING ONLY).
static int UpdateProp (oski_inmatpropset_t *props, oski_inmatprop_t cur_prop, int cur_argnum)
 Updates 'props' with the property 'p'.
int oski_CollectInMatProps (oski_inmatpropset_t *props, int k,...)
 Collect input matrix properties.
int oski_CollectInMatProps_va (oski_inmatpropset_t *props, int num_var_args, va_list ap)
 Explicit variable argument version of oski_CollectInMatProps().
int oski_CollectInMatProps_arr (oski_inmatpropset_t *props, int num_var_args, const oski_inmatprop_t *in_props)
 Explicit property-array version of oski_CollectInMatProps().


Function Documentation

void oski_ClearInMatPropSet oski_inmatpropset_t props  ) 
 

Initialize property set with "unset" values.

Parameters:
[out] props Property data structure to initialize.
Precondition:
props != NULL
See also:
oski_inmatpropset_t

int oski_CollectInMatProps oski_inmatpropset_t props,
int  k,
  ...
 

Collect input matrix properties.

Assuming the caller has a variable input argument list, this macro parses these arguments and collects them in an instance of oski_inmatpropset_t.

Parameters:
[in] k The number of remaining arguments.
[out] props A pointer to an instance of oski_inmatpropset_t. Its values will be overwritten by the call to this macro.
Returns:
A cleared 'props' structure, and returns 0 if no error occurs.
See also:
oski_inmatpropset_t, oski_inmatprop_t.

void oski_CompleteDefaultInMatPropSet oski_inmatpropset_t props  ) 
 

Complete unitialized properties with default values.

Parameters:
[in,out] props Property data structure to complete.
Precondition:
props != NULL
See also:
oski_inmatpropset_t
Postcondition:
Checks the final property set for consistency, and aborts the program if it is not.

void oski_DisplayInMatPropSet const oski_inmatpropset_t props  ) 
 

Display an input matrix's asserted properties (FOR DEBUGGING ONLY).

Parameters:
[in] props Asserted input matrix property set.
Precondition:
props != NULL
Note:
This routine executes only if the debugging level is 3 or higher.

int oski_IsInMatPropSetConsistent const oski_inmatpropset_t props  ) 
 

Checks an input matrix property set for consistency.

Parameters:
[in] props Input matrix properties specified.
Returns:
0 if there is some detected inconsistency in the input matrix property specification, or 1 otherwise.
Precondition:
props != NULL.

static int UpdateProp oski_inmatpropset_t props,
oski_inmatprop_t  cur_prop,
int  cur_argnum
[static]
 

Updates 'props' with the property 'p'.

Returns:
0 on success, or 1 if 'p' is invalid.
Note:
As written, assumes this routine only invoked by oski_CollectInMatProps (or related).


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