diff options
Diffstat (limited to 'SpMV/support/params.h')
-rw-r--r-- | SpMV/support/params.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/SpMV/support/params.h b/SpMV/support/params.h deleted file mode 100644 index bf60e79..0000000 --- a/SpMV/support/params.h +++ /dev/null @@ -1,51 +0,0 @@ - -#ifndef _PARAMS_H_ -#define _PARAMS_H_ - -#include "common.h" -#include "utils.h" - -static void usage() -{ - PRINT("\nUsage: ./program [options]" - "\n" - "\nBenchmark-specific options:" - "\n -f <F> input matrix file name (default=data/bcsstk30.mtx)" - "\n" - "\nGeneral options:" - "\n -v <V> verbosity" "\n -h help" "\n\n"); -} - -typedef struct Params { - const char *fileName; - unsigned int verbosity; -} Params; - -static struct Params input_params(int argc, char **argv) -{ - struct Params p; - p.fileName = "data/bcsstk30.mtx"; - p.verbosity = 1; - int opt; - while ((opt = getopt(argc, argv, "f:v:h")) >= 0) { - switch (opt) { - case 'f': - p.fileName = optarg; - break; - case 'v': - p.verbosity = atoi(optarg); - break; - case 'h': - usage(); - exit(0); - default: - PRINT_ERROR("Unrecognized option!"); - usage(); - exit(0); - } - } - - return p; -} - -#endif |