matrix fixed

This commit is contained in:
2025-04-12 11:37:07 +08:00
parent b92e49bd71
commit ba21f80f3b
24 changed files with 1840 additions and 569 deletions

35
perflab/poly/Makefile Normal file
View File

@@ -0,0 +1,35 @@
CC = gcc
NVCC = nvcc
CFLAGS = -Wall -O2 -g
CUDA_FLAGS = -O2 -g
LDFLAGS = -lm -lcudart
# Source files
SRCS = poly_test.c clock.c cpe.c fcyc.c lsquare.c
CUDA_SRCS = poly.cu
OBJS = $(SRCS:.c=.o) poly.o
# Target executable
TARGET = poly_test
# Default target
all: $(TARGET)
# Rule to build the executable
$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $(TARGET) $(LDFLAGS)
# Rule to build object files
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
# Rule to build CUDA object files
poly.o: poly.cu
$(NVCC) $(CUDA_FLAGS) -c $< -o $@
# Clean rule
clean:
rm -f $(OBJS) $(TARGET)
# Phony targets
.PHONY: all clean