From 17b29fb0dcd195097d6264d1b04940c2a1459095 Mon Sep 17 00:00:00 2001 From: Paul Irofti Date: Sat, 29 Mar 2025 16:25:36 +0200 Subject: [PATCH] remove old makefile and test code --- Makefile | 19 -------- test_ccubes.c | 117 -------------------------------------------------- 2 files changed, 136 deletions(-) delete mode 100644 Makefile delete mode 100644 test_ccubes.c diff --git a/Makefile b/Makefile deleted file mode 100644 index 4d0511a..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -NAME = test_ccubes - -SRCS = $(shell find . -maxdepth 1 -type f -name '*.c') -OBJS = $(SRCS:.c=.o) - -LDLIBS += -lOpenCL - -.PHONY: all clean test - -all: ${NAME} - -${NAME}: ${OBJS} - ${CC} ${LDFLAGS} $^ ${LDLIBS} -o $@ - -test: - ./${NAME} - -clean: - @${RM} ${NAME} ${OBJS} diff --git a/test_ccubes.c b/test_ccubes.c deleted file mode 100644 index a62bbc2..0000000 --- a/test_ccubes.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2011-2016, 2025 Paul Irofti - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include -#include - -#include "real.h" -#include "cl_setup.h" - -#include "clccubes.h" - -#include "config.h" -#include "logging.h" - -int -parse_args(char *argv[], int argc, - uint32_t *signals, uint32_t *atoms, uint32_t *problem_size, - uint32_t *sparsity, uint32_t *iters, uint32_t *patoms, uint32_t *pcoding, - real *rmse) -{ - int i = 1; - while (i < argc) { - if (strcmp(argv[i], "-signals") == 0) { - *signals = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-atoms") == 0) { - *atoms = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-problem") == 0) { - *problem_size = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-sparsity") == 0) { - *sparsity = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-iterations") == 0) { - *iters = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-patoms") == 0) { - *patoms = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-pcoding") == 0) { - *pcoding = strtoul(argv[++i], NULL, 0); - } else if (strcmp(argv[i], "-rmse") == 0) { - sscanf(argv[++i], "%f", rmse); - } else { - printf("Unrecognized option %s\n", argv[i]); - return 1; - } - i++; - } - - return 0; -} - -void -usage(char *program) -{ - printf("USAGE: %s [-signals sigs] [-atoms atoms] " - "[-problem problem_size] [-sparsity s] [-iterations iters] " - "[-patoms p] [-pcoding c]\n", - program); - exit(1); -} - -int main(int argc, char *argv[]) -{ - int rc = 0; - - real *zeroes = NULL; - uint64_t start, stop; - char log[100] = {0}; - char *program; - - struct ccubes_context ccubesctx; - - /* Inputs */ - - /* Outputs */ - - /* Rounding */ - - /* Logging */ - config_set_int("log", LOG_LEVEL_WARN); - config_set_int("log:ccubes", LOG_LEVEL_WARN); - config_set_int("log:test", LOG_LEVEL_WARN); - config_set_int("cl", LOG_LEVEL_DEBUG); - -#if 0 - rc = parse_args(argv, argc, - &signals, &atoms, &problem_size, &sparsity, &iters, - &patoms, &pcoding, &target_error); - if (rc != 0) { - usage(argv[0]); - } - - if (strstr(argv[0], "test_ccubes") != NULL) - program = "ccubes"; - sprintf(log, "log-%s-p%d-n%d-m%d-k%d-i%d-pa%d", program, - problem_size, atoms, signals, sparsity, iters, patoms); - config_set_string("out", log); -#endif - - log_debug("test", "Starting ccubes..."); - - ccubes(); - - fflush(stdout); -err: - return rc; -}