|
BeBOP Optimized Sparse Kernel Interface Library
1.0.1h
|
Structural hint implementation. More...
#include <oski/common.h>Go to the source code of this file.
Data Structures | |
| struct | oski_structhint_t |
| Structural hint record. More... | |
Defines | |
| #define | INC_OSKI_STRUCTHINT_H |
| oski/structhint.h has been included. | |
Functions | |
| void | oski_InitStructHint (oski_structhint_t *hint) |
| Initialize a structural hint record. | |
| void | oski_ResetStructHint (oski_structhint_t *hint) |
| Reset 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. | |
Structural hint implementation.
Structural hints are stored in records defined by the oski_structhint_t type, below, and stored with the matrix (see oski_matstruct_t).
Workload hints are stored as (simulated) traces with the matrix (see oski_matstruct_t).
| #define INC_OSKI_STRUCTHINT_H |
oski/structhint.h has been included.
| int oski_AllocStructHintBlocksizes | ( | oski_structhint_t * | hint, |
| int | num_sizes | ||
| ) |
Attempt to allocate space of 'num_sizes' block sizes.
| [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.
References oski_structhint_t::block_size, oski_structhint_t::c_sizes, oski_structhint_t::num_sizes, oski_Malloc, oski_ResetStructHintBlocksizes(), and oski_structhint_t::r_sizes.
Referenced by oski_SetHint().
| int oski_AllocStructHintDiaglens | ( | oski_structhint_t * | hint, |
| int | num_lens | ||
| ) |
Attempt to allocate space for some number of diagonal lengths.
| [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.
References oski_structhint_t::d_lens, oski_structhint_t::diag_lens, oski_structhint_t::num_lens, oski_Malloc, and oski_ResetStructHintDiaglens().
Referenced by oski_SetHint().
| void oski_InitStructHint | ( | oski_structhint_t * | hint | ) |
Initialize a structural hint record.
| [in,out] | hint | Structural hint record. |
References oski_structhint_t::block_size, oski_structhint_t::c_sizes, oski_structhint_t::d_lens, oski_structhint_t::diag_lens, oski_structhint_t::is_random, oski_structhint_t::is_symm, oski_structhint_t::is_unaligned, oski_structhint_t::num_lens, oski_structhint_t::num_sizes, and oski_structhint_t::r_sizes.
Referenced by oski_CreateMatStruct(), and oski_ResetStructHint().
| void oski_ResetStructHint | ( | oski_structhint_t * | hint | ) |
Reset a structural hint record.
| [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.
References oski_InitStructHint(), oski_ResetStructHintBlocksizes(), and oski_ResetStructHintDiaglens().
Referenced by oski_DestroyMatStruct().
1.7.6.1