remove old makefile and test code
This commit is contained in:
parent
db0e114bfd
commit
17b29fb0dc
2 changed files with 0 additions and 136 deletions
19
Makefile
19
Makefile
|
@ -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}
|
|
117
test_ccubes.c
117
test_ccubes.c
|
@ -1,117 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2011-2016, 2025 Paul Irofti <paul@irofti.net>
|
|
||||||
*
|
|
||||||
* 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 <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#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;
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue