testvec.h

Go to the documentation of this file.
00001 
00009 #if !defined(INC_UTIL_TESTVEC_H)
00010 
00011 #define INC_UTIL_TESTVEC_H
00012 
00013 #include <stdlib.h>
00014 
00015 #include <oski/common.h>
00016 #include <oski/matrix.h>
00017 #include <oski/matcreate.h>
00018 #include <oski/vecview.h>
00019 
00020 #if defined(DO_NAME_MANGLING)
00021 
00023 #define testvec_Create        MANGLE_(testvec_Create)
00024 #define testvec_CalcDataSize  MANGLE_(testvec_CalcDataSize)
00025 #define testvec_Clone         MANGLE_(testvec_Clone)
00026 #define testvec_Destroy       MANGLE_(testvec_Destroy)
00027 
00028 #define testmat_ChangeSizeDenseCSR \
00029     MANGLE_(testmat_ChangeSizeDenseCSR)
00030 #define testmat_ChangeSizeDenseTriCSR \
00031     MANGLE_(testmat_ChangeSizeDenseTriCSR)
00032 #define testmat_GenDenseCSR   MANGLE_(testmat_GenDenseCSR)
00033 #define testmat_GenRandomCSR  MANGLE_(testmat_GenRandomCSR)
00034 #define testmat_GenTriCSR   MANGLE_(testmat_GenTriCSR)
00035 #define testmat_GenTriCSC   MANGLE_(testmat_GenTriCSC)
00036 #define testmat_GenBlockedBandedCSR MANGLE_(testmat_GenBlockedBandedCSR)
00037 
00038 #define check_MatMult_instance  \
00039     MANGLE_(check_MatMult_instance)
00040 #define check_MatTrisolve_instance \
00041     MANGLE_(check_MatTrisolve_instance)
00042 #define check_MatTransMatMult_instance  \
00043     MANGLE_(check_MatTransMatMult_instance)
00044 #define check_MatMultAndMatTransMult_instance \
00045     MANGLE_(check_MatMultAndMatTransMult_instance)
00046 
00047 #define testmat_ChooseDim  MANGLE_(testmat_ChooseDim)
00048 #define ChooseDivisible MANGLE_(ChooseDivisible)
00049 
00050 #endif
00051 
00056 oski_vecview_t testvec_Create (oski_index_t len, oski_index_t num_vecs,
00057                    oski_storage_t orient, int use_minstride);
00058 
00063 size_t testvec_CalcDataSize (const oski_vecview_t x);
00064 
00068 oski_vecview_t testvec_Clone (const oski_vecview_t x);
00069 
00073 void testvec_Destroy (oski_vecview_t x);
00074 
00079 size_t testmat_ChooseDim (size_t nz_volume, size_t elem_size);
00080 
00085 size_t ChooseDivisible (size_t n, size_t d);
00086 
00092 void testmat_GenDenseCSR (oski_index_t m, oski_index_t n,
00093               oski_index_t ** p_ptr, oski_index_t ** p_ind,
00094               oski_value_t ** p_val);
00095 
00100 void testmat_ChangeSizeDenseCSR (oski_index_t m_new, oski_index_t n_new,
00101                  oski_index_t * ptr, oski_index_t * ind);
00102 
00107 void testmat_ChangeSizeDenseTriCSR (oski_index_t n_new,
00108                     int make_lower, int cond_for_trisolve,
00109                     oski_index_t * ptr, oski_index_t * ind,
00110                     oski_value_t * val);
00111 
00117 void testmat_GenTriCSR (oski_index_t m, oski_index_t max_nnz_row,
00118             oski_inmatprop_t shape, int is_unitdiag,
00119             int is_sorted, int indbase, oski_index_t ** p_ptr,
00120             oski_index_t ** p_ind, oski_value_t ** p_val);
00121 
00127 void testmat_GenTriCSC (oski_index_t m, oski_index_t max_nnz_row,
00128             oski_inmatprop_t shape, int is_unitdiag,
00129             int is_sorted, int indbase, oski_index_t ** p_ptr,
00130             oski_index_t ** p_ind, oski_value_t ** p_val);
00131 
00136 void testmat_GenBlockedBandedCSR (oski_index_t k_min, oski_index_t row_min,
00137                   oski_index_t r, oski_index_t c,
00138                   oski_index_t * p_n,
00139                   oski_index_t ** p_ptr,
00140                   oski_index_t ** p_ind,
00141                   oski_value_t ** p_val);
00145 int check_MatMult_instance (const oski_matrix_t A0, const oski_matrix_t A1,
00146                 oski_matop_t opA, oski_value_t alpha,
00147                 const oski_vecview_t x, oski_value_t beta,
00148                 oski_vecview_t y0);
00149 
00153 int check_MatTrisolve_instance (const oski_matrix_t T0,
00154                 const oski_matrix_t T1, oski_matop_t opT,
00155                 oski_value_t alpha, const oski_vecview_t b);
00156 
00160 int check_MatTransMatMult_instance (const oski_matrix_t A0,
00161                     const oski_matrix_t A1, oski_ataop_t opA,
00162                     oski_value_t alpha,
00163                     const oski_vecview_t x, oski_value_t beta,
00164                     oski_vecview_t y0, oski_vecview_t t0);
00165 
00170 int check_MatMultAndMatTransMult_instance (const oski_matrix_t A0,
00171                        const oski_matrix_t A1,
00172                        oski_value_t alpha,
00173                        const oski_vecview_t x,
00174                        oski_value_t beta,
00175                        oski_vecview_t y, oski_matop_t opA,
00176                        oski_value_t omega,
00177                        const oski_vecview_t w,
00178                        oski_value_t zeta,
00179                        oski_vecview_t z);
00180 
00185 oski_matrix_t testmat_GenRandomCSR (oski_index_t m, oski_index_t n,
00186                     oski_index_t min_nnz_row,
00187                     oski_index_t max_nnz_row,
00188                     oski_inmatprop_t shape,
00189                     int implicit_diag, int index_base,
00190                     oski_copymode_t copymode,
00191                     oski_index_t ** p_ptr,
00192                     oski_index_t ** p_ind,
00193                     oski_value_t ** p_val);
00194 
00195 #endif
00196 
00197 /* eof */

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