structhint.c File Reference


Detailed Description

Implementation of structural tuning hint data structure.

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

Functions

void oski_InitStructHint (oski_structhint_t *hint)
 Initialize a structural hint record.
void oski_ResetStructHintDiaglens (oski_structhint_t *hint)
 Clears the diagonal length block list, and resets the count of number of diagonal lengths to 0.
int oski_AllocStructHintDiaglens (oski_structhint_t *hint, int num_lens)
 Attempt to allocate space for some number of diagonal lengths.
void oski_ResetStructHintBlocksizes (oski_structhint_t *hint)
 Clears the dense block size list, and resets the count of number of block sizes to 0.
int oski_AllocStructHintBlocksizes (oski_structhint_t *hint, int num_sizes)
 Attempt to allocate space of 'num_sizes' block sizes.
void oski_ResetStructHint (oski_structhint_t *hint)
 Reset a structural hint record.


Function Documentation

int oski_AllocStructHintBlocksizes oski_structhint_t hint,
int  num_sizes
 

Attempt to allocate space of 'num_sizes' block sizes.

Parameters:
[in,out] hint Hint to set.
[in] num_sizes Number of block sizes to set.
Even if the allocation fails, the block size count is set to 'num_sizes' and the previous block size list is lost (freed).

If num_sizes is 0, then no space is allocated.

Returns:
Returns 1 <==> no errors occurred.

int oski_AllocStructHintDiaglens oski_structhint_t hint,
int  num_lens
 

Attempt to allocate space for some number of diagonal lengths.

Parameters:
[in,out] hint Hint to which this routine applies.
[in] num_lens Number of diagonal lengths for which to allocate space.
Even if the allocation fails, the diagonal length size count is set to 'num_lens' and the previous diagonal length list is lost (freed).

If num_lens is 0, then no space is allocated.

Returns:
Returns 1 <==> the lists could be allocated.

void oski_InitStructHint oski_structhint_t hint  ) 
 

Initialize a structural hint record.

Parameters:
[in,out] hint Structural hint record.
Postcondition:
Initializes the fields of a structural hint record to default values.

void oski_ResetStructHint oski_structhint_t hint  ) 
 

Reset a structural hint record.

Parameters:
[in,out] hint Reinitializes a previously allocated and used structural hint record.
This routine reinitializes the fields of 'hint' to their default values, and frees any associated data stored with the 'hint' on call to this routine.


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