BeBOP Optimized Sparse Kernel Interface Library
1.0.1h
|
00001 00026 00027 #if !defined(INC_OSKI_CSR_FORMAT_H) && !defined(OSKI_UNBIND) 00028 00029 #define INC_OSKI_CSR_FORMAT_H 00030 00031 #include <oski/mangle.h> 00032 00033 #if defined(DO_NAME_MANGLING) 00034 00037 #define oski_matCSR_t MANGLE_(oski_matCSR_t) 00038 00039 #define oski_WrapCSR_funcpt MANGLE_(oski_wrapCSR_funcpt) 00040 #define oski_CheckCSR_funcpt MANGLE_(oski_checkCSR_funcpt) 00041 #define oski_StreamMatRepr_funcpt MANGLE_(oski_StreamMatRepr_funcpt) 00042 #define oski_SortIndices_funcpt MANGLE_(oski_SortIndices_funcpt) 00043 #define oski_ExpandCSRToFull_funcpt MANGLE_(oski_ExpandCSRToFull_funcpt) 00044 #define oski_ConditionallyExpandCSRToFull_funcpt \ 00045 MANGLE_(oski_ConditionallyExpandCSRToFull_funcpt) 00046 #define oski_ChangeIndexBase_funcpt MANGLE_(oski_ChangeIndexBase_funcpt) 00047 #define oski_TransposeCSR_funcpt MANGLE_(oski_TransposeCSR_funcpt) 00048 #define oski_CountZeroRowsCSR_funcpt MANGLE_(oski_CountZeroRowsCSR_funcpt) 00049 00050 #endif 00051 00091 typedef struct 00092 { 00096 oski_index_t base_index; 00097 00103 int has_unit_diag_implicit; 00104 00110 int has_sorted_indices; 00111 00124 struct 00125 { 00126 int is_upper; 00127 int is_lower; 00128 } stored; 00129 00130 oski_index_t *ptr; 00131 oski_index_t *ind; 00132 oski_value_t *val; 00133 int is_shared; 00134 } 00135 oski_matCSR_t; 00136 00139 00140 #include <oski/inmatprop.h> 00141 #include <oski/matrix.h> 00142 00146 typedef double (*oski_StreamMatRepr_funcpt) (const void *mat, 00147 const oski_matcommon_t * props); 00148 00152 typedef oski_matCSR_t *(*oski_ExpandCSRToFull_funcpt) (const oski_matCSR_t * 00153 S, 00154 const oski_matcommon_t 00155 * props); 00156 00160 typedef int (*oski_ConditionallyExpandCSRToFull_funcpt) (const oski_matCSR_t * 00161 S, 00162 const 00163 oski_matcommon_t * 00164 props, 00165 oski_matCSR_t ** 00166 p_mat_full); 00167 00169 typedef void (*oski_ChangeIndexBase_funcpt) (oski_matCSR_t * A, 00170 const oski_matcommon_t * props, 00171 const oski_index_t new_base); 00172 00176 typedef int (*oski_SortIndices_funcpt) (oski_matCSR_t * A, oski_index_t m); 00177 00181 typedef oski_matCSR_t *(*oski_TransposeCSR_funcpt) (const oski_matCSR_t * A, 00182 const oski_matcommon_t * 00183 props); 00184 00190 typedef oski_matCSR_t *(*oski_WrapCSR_funcpt) (oski_matcommon_t * out_props, 00191 oski_index_t * Aptr, 00192 oski_index_t * Aind, 00193 oski_value_t * Aval, 00194 oski_index_t num_rows, 00195 oski_index_t num_cols, 00196 oski_inmatpropset_t * props, 00197 oski_copymode_t mode); 00198 00204 typedef oski_index_t (*oski_CountZeroRowsCSR_funcpt) (const oski_matCSR_t * A, 00205 const oski_matcommon_t * 00206 props); 00209 #endif 00210 00211 #if defined(OSKI_UNBIND) 00212 # include <oski/mangle.h> 00213 # undef INC_OSKI_CSR_FORMAT_H 00214 # undef oski_matCSR_t 00215 # undef oski_WrapCSR_funcpt 00216 # undef oski_CheckCSR_funcpt 00217 # undef oski_StreamMatRepr_funcpt 00218 # undef oski_SortIndices_funcpt 00219 # undef oski_ExpandCSRToFull_funcpt 00220 # undef oski_ConditionallyExpandCSRToFull_funcpt 00221 # undef oski_ChangeIndexBase_funcpt 00222 # undef oski_TransposeCSR_funcpt 00223 # undef oski_CountZeroRowsCSR_funcpt 00224 #endif 00225 00226 /* eof */