summaryrefslogtreecommitdiff
path: root/SpMV/support/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'SpMV/support/utils.h')
-rw-r--r--SpMV/support/utils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/SpMV/support/utils.h b/SpMV/support/utils.h
new file mode 100644
index 0000000..ddb1e2c
--- /dev/null
+++ b/SpMV/support/utils.h
@@ -0,0 +1,11 @@
+
+#ifndef _UTILS_H_
+#define _UTILS_H_
+
+#define PRINT_ERROR(fmt, ...) fprintf(stderr, "\033[0;31mERROR:\033[0m " fmt "\n", ##__VA_ARGS__)
+#define PRINT_WARNING(fmt, ...) fprintf(stderr, "\033[0;35mWARNING:\033[0m " fmt "\n", ##__VA_ARGS__)
+#define PRINT_INFO(cond, fmt, ...) if(cond) printf("\033[0;32mINFO:\033[0m " fmt "\n", ##__VA_ARGS__);
+#define PRINT(fmt, ...) printf(fmt "\n", ##__VA_ARGS__)
+
+#endif
+