#include <oski/common.h>
#include <oski/config.h>
#include <oski/mangle.h>
#include <oski/matrix.h>
#include <oski/getset.h>
Defines | |
#define | MIN(i, j) ((i) < (j) ? (i) : (j)) |
Returns the smallest of two values. | |
#define | MAX(i, j) ((i) > (j) ? (i) : (j)) |
Returns the largest of two values. | |
Functions | |
static int | GetMatEntry (const oski_matspecific_t *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t *p_aij) |
Calls matrix type-specific implementation of oski_GetMatEntry(). | |
static int | SetMatEntry (const oski_matspecific_t *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t new_val) |
Calls matrix type-specific implementation of oski_SetMatEntry(). | |
oski_value_t | oski_GetMatEntry (const oski_matrix_t A_tunable, oski_index_t row, oski_index_t col) |
Returns the value of a matrix element. | |
int | oski_SetMatEntry (const oski_matrix_t A_tunable, oski_index_t row, oski_index_t col, oski_value_t new_val) |
Changes the value of the specified matrix element. | |
static int | FindIndexOutOfRange (const oski_index_t *x, oski_index_t n, oski_index_t min, oski_index_t max) |
Returns the index of any element not in the specified closed interval, or -1 if all elements are in the interval. | |
static int | GetMaxIndex (const oski_index_t *x, oski_index_t n) |
Returns the largest value in the specified array. | |
static int | CheckCliqueArgs (const oski_matrix_t A_tunable, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, oski_vecview_t vals, const char *caller) |
Checks the input arguments to oski_GetMatClique() and oski_SetMatClique(), returning 0 if the arguments are valid or an error code otherwise. | |
static int | GetClique (const oski_matspecific_t *mat, const oski_matcommon_t *props, const oski_index_t *rows, oski_index_t R, const oski_index_t *cols, oski_index_t C, const oski_vecview_t V) |
Given a type-specific representation, try to find a native oski_GetMatReprClique() implementation and call it. | |
static int | GetCliqueDefault (const oski_matrix_t A_tunable, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, oski_vecview_t V) |
Returns a clique using a default naive algorithm that just calls oski_GetMatEntry() repeatedly. | |
int | oski_GetMatClique (const oski_matrix_t A_tunable, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, oski_vecview_t vals) |
Returns a block of values, defined by a clique, from a matrix. | |
static int | SetClique (const oski_matspecific_t *mat, const oski_matcommon_t *props, const oski_index_t *rows, oski_index_t R, const oski_index_t *cols, oski_index_t C, const oski_vecview_t V) |
Given a type-specific representation, try to find a native oski_SetMatReprClique() implementation and call it. | |
static int | SetCliqueDefault (const oski_matrix_t A_tunable, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, oski_vecview_t V) |
Returns a clique using a default naive algorithm that just calls oski_SetMatEntry() repeatedly. | |
int | oski_SetMatClique (const oski_matrix_t A_tunable, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, const oski_vecview_t vals) |
Changes a block of values, defined by a clique, in a matrix. | |
static int | CheckDiagValuesArgs (const oski_matrix_t A_tunable, oski_index_t d, oski_vecview_t vals, const char *caller) |
Checks the input arguments to oski_GetMatDiagValues() and oski_SetMatDiagValues(), returning 0 if the arguments are valid or an error code otherwise. | |
static int | GetDiagValues (const oski_matspecific_t *mat, const oski_matcommon_t *props, oski_index_t d, oski_vecview_t V) |
Given a type-specific representation, try to find a native oski_GetMatReprDiagValues() implementation and call it. | |
static int | GetDiagValuesDefault (const oski_matrix_t A_tunable, oski_index_t d, oski_vecview_t V) |
Returns a clique using a default naive algorithm that just calls oski_GetMatEntry() repeatedly. | |
int | oski_GetMatDiagValues (const oski_matrix_t A_tunable, oski_index_t diag_num, oski_vecview_t diag_vals) |
Extract the diagonal from , that is, all entries such that . | |
static int | SetDiagValues (const oski_matspecific_t *mat, const oski_matcommon_t *props, oski_index_t d, const oski_vecview_t V) |
Given a type-specific representation, try to find a native oski_SetMatReprDiagValues() implementation and call it. | |
static int | SetDiagValuesDefault (const oski_matrix_t A_tunable, oski_index_t d, const oski_vecview_t V) |
Sets values along a given diagonal using a default naive algorithm that just calls oski_SetMatEntry() repeatedly. | |
int | oski_SetMatDiagValues (const oski_matrix_t A_tunable, oski_index_t diag_num, const oski_vecview_t diag_vals) |
Sets the values along diagonal from , that is, all entries such that . |
|
Checks the input arguments to oski_GetMatClique() and oski_SetMatClique(), returning 0 if the arguments are valid or an error code otherwise. This routine calls the error handler on error, using the method name, 'caller'. |
|
Checks the input arguments to oski_GetMatDiagValues() and oski_SetMatDiagValues(), returning 0 if the arguments are valid or an error code otherwise. This routine calls the error handler on error, using the method name, 'caller'. |
|
Returns the index of any element not in the specified closed interval, or -1 if all elements are in the interval. The index returned is 0-based. |
|
Given a type-specific representation, try to find a native oski_GetMatReprClique() implementation and call it. If none exists, returns ERR_NOT_IMPLEMENTED. Otherwise, calls the native function and returns its error code. |
|
Returns a clique using a default naive algorithm that just calls oski_GetMatEntry() repeatedly.
|
|
Given a type-specific representation, try to find a native oski_GetMatReprDiagValues() implementation and call it. If none exists, returns ERR_NOT_IMPLEMENTED. Otherwise, calls the native function and returns its error code. |
|
Returns a clique using a default naive algorithm that just calls oski_GetMatEntry() repeatedly.
|
|
Calls matrix type-specific implementation of oski_GetMatEntry().
|
|
Returns the largest value in the specified array.
|
|
Given a type-specific representation, try to find a native oski_SetMatReprClique() implementation and call it. If none exists, returns ERR_NOT_IMPLEMENTED. Otherwise, calls the native function and returns its error code. |
|
Returns a clique using a default naive algorithm that just calls oski_SetMatEntry() repeatedly.
|
|
Given a type-specific representation, try to find a native oski_SetMatReprDiagValues() implementation and call it. If none exists, returns ERR_NOT_IMPLEMENTED. Otherwise, calls the native function and returns its error code. |
|
Sets values along a given diagonal using a default naive algorithm that just calls oski_SetMatEntry() repeatedly.
|
|
Calls matrix type-specific implementation of oski_SetMatEntry().
|