From 30b0e3d35a88fc036d89610d2d93d33fa059d7d1 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Sat, 30 May 2026 12:48:39 -0500 Subject: [PATCH] Move gemv/gemm tests to level2/level3, mirroring src (closes #4) All tests lived in tests/blas/level1/ regardless of BLAS level. Move the gemv tests to tests/blas/level2/ and the gemm tests to tests/blas/level3/ so the test tree mirrors src/blas/{level1,level2,level3}. The Makefile now wildcards all three test directories (with a per-directory object rule, as BLAS_OBJS already does); CFLAGS already carries the test includes globally. No test code changes; 183/183 pass. Co-Authored-By: Claude Opus 4.8 --- Makefile | 16 +++++++++++++--- tests/blas/{level1 => level2}/test_dgemv.c | 0 tests/blas/{level1 => level2}/test_hgemv.c | 0 tests/blas/{level1 => level2}/test_qgemv.c | 0 tests/blas/{level1 => level2}/test_sgemv.c | 0 tests/blas/{level1 => level3}/test_dgemm.c | 0 tests/blas/{level1 => level3}/test_hgemm.c | 0 tests/blas/{level1 => level3}/test_qgemm.c | 0 tests/blas/{level1 => level3}/test_sgemm.c | 0 9 files changed, 13 insertions(+), 3 deletions(-) rename tests/blas/{level1 => level2}/test_dgemv.c (100%) rename tests/blas/{level1 => level2}/test_hgemv.c (100%) rename tests/blas/{level1 => level2}/test_qgemv.c (100%) rename tests/blas/{level1 => level2}/test_sgemv.c (100%) rename tests/blas/{level1 => level3}/test_dgemm.c (100%) rename tests/blas/{level1 => level3}/test_hgemm.c (100%) rename tests/blas/{level1 => level3}/test_qgemm.c (100%) rename tests/blas/{level1 => level3}/test_sgemm.c (100%) diff --git a/Makefile b/Makefile index 4445bf3..65fb47e 100644 --- a/Makefile +++ b/Makefile @@ -73,8 +73,12 @@ BLAS_SRCS = \ # $(BLAS_SRC_DIR_L1)/srotg.c BLAS_OBJS = $(BLAS_SRCS:.c=.o) -TEST_SRC_DIR = ./tests/blas/level1 -TEST_SRCS = $(wildcard $(TEST_SRC_DIR)/*.c) +TEST_SRC_DIR_L1 = ./tests/blas/level1 +TEST_SRC_DIR_L2 = ./tests/blas/level2 +TEST_SRC_DIR_L3 = ./tests/blas/level3 +TEST_SRCS = $(wildcard $(TEST_SRC_DIR_L1)/*.c) \ + $(wildcard $(TEST_SRC_DIR_L2)/*.c) \ + $(wildcard $(TEST_SRC_DIR_L3)/*.c) TEST_OBJS = $(TEST_SRCS:.c=.o) TEST_ALL_SRC = ./tests/test_all.c @@ -96,7 +100,13 @@ $(TARGET): $(BLAS_OBJS) $(TEST_TARGET): $(TEST_OBJS) $(BLAS_OBJS) $(MUNIT_OBJ) $(TEST_ALL_OBJ) $(CC) $(LDFLAGS) $^ -o $@ $(LIBS) -$(TEST_OBJS): $(TEST_SRC_DIR)/%.o: $(TEST_SRC_DIR)/%.c +$(TEST_OBJS): $(TEST_SRC_DIR_L1)/%.o: $(TEST_SRC_DIR_L1)/%.c + $(CC) $(CFLAGS) -c $< -o $@ + +$(TEST_OBJS): $(TEST_SRC_DIR_L2)/%.o: $(TEST_SRC_DIR_L2)/%.c + $(CC) $(CFLAGS) -c $< -o $@ + +$(TEST_OBJS): $(TEST_SRC_DIR_L3)/%.o: $(TEST_SRC_DIR_L3)/%.c $(CC) $(CFLAGS) -c $< -o $@ $(TEST_ALL_OBJ): $(TEST_ALL_SRC) diff --git a/tests/blas/level1/test_dgemv.c b/tests/blas/level2/test_dgemv.c similarity index 100% rename from tests/blas/level1/test_dgemv.c rename to tests/blas/level2/test_dgemv.c diff --git a/tests/blas/level1/test_hgemv.c b/tests/blas/level2/test_hgemv.c similarity index 100% rename from tests/blas/level1/test_hgemv.c rename to tests/blas/level2/test_hgemv.c diff --git a/tests/blas/level1/test_qgemv.c b/tests/blas/level2/test_qgemv.c similarity index 100% rename from tests/blas/level1/test_qgemv.c rename to tests/blas/level2/test_qgemv.c diff --git a/tests/blas/level1/test_sgemv.c b/tests/blas/level2/test_sgemv.c similarity index 100% rename from tests/blas/level1/test_sgemv.c rename to tests/blas/level2/test_sgemv.c diff --git a/tests/blas/level1/test_dgemm.c b/tests/blas/level3/test_dgemm.c similarity index 100% rename from tests/blas/level1/test_dgemm.c rename to tests/blas/level3/test_dgemm.c diff --git a/tests/blas/level1/test_hgemm.c b/tests/blas/level3/test_hgemm.c similarity index 100% rename from tests/blas/level1/test_hgemm.c rename to tests/blas/level3/test_hgemm.c diff --git a/tests/blas/level1/test_qgemm.c b/tests/blas/level3/test_qgemm.c similarity index 100% rename from tests/blas/level1/test_qgemm.c rename to tests/blas/level3/test_qgemm.c diff --git a/tests/blas/level1/test_sgemm.c b/tests/blas/level3/test_sgemm.c similarity index 100% rename from tests/blas/level1/test_sgemm.c rename to tests/blas/level3/test_sgemm.c