summaryrefslogtreecommitdiff
path: root/SpMV/support/params.h
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2025-01-17 09:34:47 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2025-01-17 09:34:47 +0100
commit24dea071574167bcad2d553f6b6bc24f40ccbb48 (patch)
treefb21b3c4b855e09f4a79b4c1bfab1c7f4966cc97 /SpMV/support/params.h
parentb4d38f56de51e5ac7c2c813b420e9f6d42abc2e6 (diff)
SpMV: indent -linux
Diffstat (limited to 'SpMV/support/params.h')
-rw-r--r--SpMV/support/params.h67
1 files changed, 36 insertions, 31 deletions
diff --git a/SpMV/support/params.h b/SpMV/support/params.h
index b4b696c..bf60e79 100644
--- a/SpMV/support/params.h
+++ b/SpMV/support/params.h
@@ -5,42 +5,47 @@
#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");
+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;
+ 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;
+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
-