From a5d4812025c84d27ab001e247fb6d6e81a8bb723 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Thu, 12 Apr 2018 20:46:58 -0700 Subject: [PATCH] algotune: start work on algotune. This is a library for stress testing algorithms problems. --- misc/algotest/Makefile.am | 11 +++++++ misc/algotest/algotune.cc | 49 +++++++++++++++++++++++++++++++ misc/algotest/algotune.h | 20 +++++++++++++ misc/algotest/configure.ac | 22 ++++++++++++++ misc/algotest/libalgotune-1.pc.in | 10 +++++++ 5 files changed, 112 insertions(+) create mode 100644 misc/algotest/Makefile.am create mode 100644 misc/algotest/algotune.cc create mode 100644 misc/algotest/algotune.h create mode 100644 misc/algotest/configure.ac create mode 100644 misc/algotest/libalgotune-1.pc.in diff --git a/misc/algotest/Makefile.am b/misc/algotest/Makefile.am new file mode 100644 index 0000000..e16d0e8 --- /dev/null +++ b/misc/algotest/Makefile.am @@ -0,0 +1,11 @@ +AM_CPPFLAGS = -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align +AM_CPPFLAGS += -Wwrite-strings -Wmissing-declarations -Wno-long-long -Werror +AM_CPPFLAGS += -Wunused-variable -std=c++14 -D_XOPEN_SOURCE -O2 -I. +AM_CPPFLAGS += -fno-elide-constructors -Weffc++ + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libalgotune-1.pc + +lib_LTLIBRARIES = libalgotune.la +nobase_include_HEADERS = algotune.h +libalgotune_la_SOURCES = algotune.cc diff --git a/misc/algotest/algotune.cc b/misc/algotest/algotune.cc new file mode 100644 index 0000000..41f2b08 --- /dev/null +++ b/misc/algotest/algotune.cc @@ -0,0 +1,49 @@ +#include +#include + +#include "algotune.h" + +namespace algotune { + +int +rand_int(int low, int high) +{ + return -1; +} + + +int64_t +rand_int(int64_t low, int64_t high) +{ + return -1; +} + + +std::vector +gen_int_vector(int size, int low, int high) +{ + return vector(0); +} + + +std::vector +gen_int_vector(int size, int low, int high) +{ + return vector(0); +} + + +void +stress_test_int(bool(*func)(std::vector)) +{ + +} + + +void +stress_test_int64(bool(*func)(std::vector + +namespace algotune { + +int rand_int(int low, int high); +int64_t rand_int(int64_t low, int64_t high); + +std::vector gen_int_vector(int size, int low, int high); +std::vector gen_int_vector(int size, int low, int high); + +void stress_test_int(bool(*func)(std::vector)); +void stress_test_int64(bool(*func)(std::vector