Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3ac36b86 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Factorize the strings declarations in spm testings

parent 1c8d845a
No related branches found
No related tags found
1 merge request!31Hotfix and code factorization
......@@ -13,9 +13,11 @@
**/
#include "spm_tests.h"
char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
char* fmtnames[] = { "CSC", "CSR", "IJV" };
char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
const char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
const char* fmtnames[] = { "CSC", "CSR", "IJV" };
const char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
const char *dofname[] = { "None", "Constant", "Variadic" };
const char* transnames[] = { "NoTrans", "Trans", "ConjTrans" };
static inline int
spmCompareFloatArray( spm_int_t n,
......
......@@ -34,10 +34,6 @@
printf("SUCCESS\n"); \
}
char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
char* fmtnames[] = { "CSC", "CSR", "IJV" };
char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
int main (int argc, char **argv)
{
spmatrix_t original, *spm;
......
......@@ -32,10 +32,6 @@
printf("SUCCESS\n"); \
}
char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
char* fmtnames[] = { "CSC", "CSR", "IJV" };
char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
int main (int argc, char **argv)
{
spmatrix_t original, *spm;
......
......@@ -22,11 +22,6 @@
#include <time.h>
#include <spm_tests.h>
int z_spm_norm_check( const spmatrix_t *spm );
int c_spm_norm_check( const spmatrix_t *spm );
int d_spm_norm_check( const spmatrix_t *spm );
int s_spm_norm_check( const spmatrix_t *spm );
#define PRINT_RES(_ret_) \
if(_ret_) { \
printf("FAILED(%d)\n", _ret_); \
......@@ -36,10 +31,6 @@ int s_spm_norm_check( const spmatrix_t *spm );
printf("SUCCESS\n"); \
}
char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
char* fmtnames[] = { "CSC", "CSR", "IJV" };
char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
int main (int argc, char **argv)
{
spmatrix_t original, *spm;
......@@ -108,10 +99,12 @@ int main (int argc, char **argv)
continue;
}
printf(" Case: %d / %s / %s / %d / %s\n",
i, fltnames[spm->flttype],
fmtnames[spm->fmttype], baseval,
mtxnames[mtxtype - SpmGeneral] );
printf( " Case: %s / %s / %s / %d / %s\n",
fltnames[spm->flttype],
dofname[i+1],
mtxnames[mtxtype - SpmGeneral],
baseval,
fmtnames[spm->fmttype] );
switch( spm->flttype ){
case SpmComplex64:
......
......@@ -31,11 +31,6 @@
printf("SUCCESS\n"); \
}
char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
char* transnames[] = { "NoTrans", "Trans", "ConjTrans" };
char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
char* fmtnames[] = { "CSC", "CSR", "IJV" };
int main (int argc, char **argv)
{
spmatrix_t spm;
......
......@@ -22,11 +22,6 @@
#include <time.h>
#include <spm_tests.h>
int z_spm_norm_check( const spmatrix_t *spm );
int c_spm_norm_check( const spmatrix_t *spm );
int d_spm_norm_check( const spmatrix_t *spm );
int s_spm_norm_check( const spmatrix_t *spm );
#define PRINT_RES(_ret_) \
if(_ret_) { \
printf("FAILED(%d)\n", _ret_); \
......@@ -36,10 +31,6 @@ int s_spm_norm_check( const spmatrix_t *spm );
printf("SUCCESS\n"); \
}
char* fltnames[] = { "Pattern", "", "Float", "Double", "Complex32", "Complex64" };
char* fmtnames[] = { "CSC", "CSR", "IJV" };
char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
int main (int argc, char **argv)
{
spmatrix_t spm;
......@@ -101,7 +92,8 @@ int main (int argc, char **argv)
printf(" Case: %s / %s / %d / %s\n",
fltnames[spm.flttype],
fmtnames[spm.fmttype], baseval,
fmtnames[spm.fmttype],
baseval,
mtxnames[mtxtype - SpmGeneral] );
switch( spm.flttype ){
......
......@@ -75,7 +75,6 @@ spmdist_check_scatter_gather( spmatrix_t *original,
int root,
int clustnum )
{
const char *dofname[] = { "None", "Constant", "Variadic" };
const char *distname[] = { "Round-Robin", "Continuous "};
spmatrix_t *spms = NULL;
spmatrix_t *spmg = NULL;
......
......@@ -20,9 +20,11 @@
#include <stdio.h>
#include <spm.h>
extern char* fltnames[];
extern char* fmtnames[];
extern char* mtxnames[];
extern const char* fltnames[];
extern const char* fmtnames[];
extern const char* mtxnames[];
extern const char *dofname[];
extern const char* transnames[];
void spmGetOptions( int argc, char **argv,
spm_driver_t *driver, char **filename );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment