#include <oski/mangle.h>
#include <oski/matrix.h>
#include <oski/vecview.h>
Go to the source code of this file.
Data Structures | |
struct | oski_traceargs_MatMult_t |
Trace argument signature for oski_MatMult(). More... | |
Name mangling. | |
#define | oski_MatMult_funcpt MANGLE_(oski_MatMult_funcpt) |
#define | oski_MatReprMult_funcpt MANGLE_(oski_MatReprMult_funcpt) |
#define | oski_MatMult MANGLE_(oski_MatMult) |
#define | oski_CheckArgsMatMult MANGLE_(oski_CheckArgsMatMult) |
#define | oski_traceargs_MatMult_t MANGLE_(oski_traceargs_MatMult_t) |
#define | oski_MakeArglistMatMult MANGLE_(oski_MakeArglistMatMult) |
Tracing. | |
#define | GET_XFLOP_MatMult(args) (2.0*((const oski_traceargs_MatMult_t *)(args))->num_vecs) |
Compute the "flop factor.". | |
void | oski_MakeArglistMatMult (oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, const oski_vecview_t y_view, oski_traceargs_MatMult_t *args) |
Initialize a static argument signature. | |
Defines | |
#define | INC_OSKI_MATMULT_H |
oski/matmul.h included. | |
#define | OSKI_MATMULT_COMPAT_DIMS(m_A, k_A, k_B, n_B, m_C, n_C) |
Returns 1 <==> multiply dimensions are compatible. | |
#define | OSKI_MATTRANSMULT_COMPAT_DIMS(m_A, k_A, k_B, n_B, m_C, n_C) |
Returns 1 <==> transpose-multiply dimensions are compatible. | |
#define | OSKI_MATMULT_COMPAT_OBJ_DIMS(A, B, C) |
Returns 1 <==> multiply dimensions are compatible. | |
#define | OSKI_MATTRANSMULT_COMPAT_OBJ_DIMS(A, B, C) |
Returns 1 <==> transpose-multiply dimensions are compatible. | |
Typedefs | |
typedef int(* | oski_MatMult_funcpt )(const oski_matrix_t A_tunable, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view) |
Function pointer type for oski_MatMult(). | |
typedef int(* | oski_MatReprMult_funcpt )(const void *A, const oski_matcommon_t *props, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view) |
Function pointer type for a matrix type-specific implementation of oski_MatMult(). | |
Functions | |
int | oski_MatMult (const oski_matrix_t A_tunable, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view) |
Computes , where . | |
int | oski_CheckArgsMatMult (const oski_matrix_t A_tunable, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, const oski_vecview_t y_view, const char *caller) |
Checks validity of arguments to a routine with a matrix vector multiply signature. |
|
Value: ( OSKI_CHECK_MAT_DIMS(m_A, k_A) && OSKI_CHECK_MAT_DIMS(k_B, n_B) \ && OSKI_CHECK_MAT_DIMS(m_C, n_C) \ && ((m_A) == (m_C)) && ((k_A) == (k_B)) && ((n_B) == (n_C)) ) Given a desired matrix multiply operation, , returns 1 <==> the dimensions of all three matrices are legal and compatible. By 'legal,' we mean according to OSKI_CHECK_MAT_DIMS, which this routine also calls.
|
|
Value: OSKI_MATMULT_COMPAT_DIMS( (A)->num_rows, (A)->num_cols, \ ((B) == INVALID_VEC) \ || ((B) == SYMBOLIC_VEC) || ((B) == SYMBOLIC_MULTIVEC) \ ? (A)->num_cols : (B)->num_rows, \ ((B) == INVALID_VEC) \ || ((B) == SYMBOLIC_VEC) || ((B) == SYMBOLIC_MULTIVEC) \ ? (C)->num_cols : (B)->num_cols, \ ((C) == INVALID_VEC) \ || ((C) == SYMBOLIC_VEC) || ((C) == SYMBOLIC_MULTIVEC) \ ? (A)->num_rows : (C)->num_rows, \ ((C) == INVALID_VEC) \ || ((C) == SYMBOLIC_VEC) || ((C) == SYMBOLIC_MULTIVEC) \ ? (B)->num_cols : (C)->num_cols \ ) This routine is a high-level object wrapper around an equivalent call to OSKI_CHECK_MAT_DIMS(). Specifically, this routine assumes the operands A, B, and C are pointers to structs containing 'num_rows' and 'num_cols' fields. A must be a valid object. However, either B or C may be NULL, in which case the missing argument is assumed to have the correct dimensions. B and C must not both be NULL, however. |
|
Value: ( OSKI_CHECK_MAT_DIMS(m_A, k_A) && OSKI_CHECK_MAT_DIMS(k_B, n_B) \ && OSKI_CHECK_MAT_DIMS(m_C, n_C) \ && ((k_A) == (m_C)) && ((m_A) == (k_B)) && ((n_B) == (n_C)) ) Given a desired matrix multiply operation, , where , returns 1 <==> the dimensions of all three matrices are legal and compatible. By 'legal,' we mean according to OSKI_CHECK_MAT_DIMS, which this routine also calls.
|
|
Value: OSKI_MATTRANSMULT_COMPAT_DIMS( (A)->num_rows, (A)->num_cols, \ ((B) == INVALID_VEC) \ || ((B) == SYMBOLIC_VEC) || ((B) == SYMBOLIC_MULTIVEC) \ ? (A)->num_rows : (B)->num_rows, \ ((B) == INVALID_VEC) \ || ((B) == SYMBOLIC_VEC) || ((B) == SYMBOLIC_MULTIVEC) \ ? (C)->num_cols : (B)->num_cols, \ ((C) == INVALID_VEC) \ || ((C) == SYMBOLIC_VEC) || ((C) == SYMBOLIC_MULTIVEC) \ ? (A)->num_cols : (C)->num_rows, \ ((C) == INVALID_VEC) \ || ((C) == SYMBOLIC_VEC) || ((C) == SYMBOLIC_MULTIVEC) \ ? (B)->num_cols : (C)->num_cols \ ) This routine is a high-level object wrapper around an equivalent call to OSKI_CHECK_MAT_DIMS(). Specifically, this routine assumes the operands A, B, and C are pointers to structs containing 'num_rows' and 'num_cols' fields. A must be a valid object. However, either B or C may be NULL or symbolic, in which case the missing argument is assumed to have the correct dimensions. B and C must not both be NULL (though they may both be symbolic), however. |
|
Checks validity of arguments to a routine with a matrix vector multiply signature.
|