- Add C implementation demonstrating memory alignment effects (matrix_alignment_prototype.c) - Include cache-blocked matrix multiplication with AVX SIMD optimizations - Add automated benchmarking framework (run_all_tests.sh, run_benchmark_sizes.sh) - Add Python visualization scripts (generate_plots.py) - Include Makefile for building with AVX support - Add benchmark results and generated plots - Add README with build and usage instructions - Configure .gitignore for C/Python project files
31 lines
590 B
Makefile
31 lines
590 B
Makefile
# Makefile for HPC Matrix Alignment Prototype
|
|
# Demonstrates memory alignment optimization impact
|
|
|
|
CC = gcc
|
|
CFLAGS = -Wall -Wextra -O3 -march=native -std=c11 -ffast-math -mavx -mfma
|
|
LDFLAGS = -lm
|
|
TARGET = matrix_alignment_prototype
|
|
SOURCE = matrix_alignment_prototype.c
|
|
|
|
# Default target
|
|
all: $(TARGET)
|
|
|
|
# Build the prototype
|
|
$(TARGET): $(SOURCE)
|
|
$(CC) $(CFLAGS) -o $(TARGET) $(SOURCE) $(LDFLAGS)
|
|
|
|
# Run the prototype
|
|
run: $(TARGET)
|
|
./$(TARGET)
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -f $(TARGET) *.o
|
|
|
|
# Debug build
|
|
debug: CFLAGS += -g -DDEBUG
|
|
debug: $(TARGET)
|
|
|
|
.PHONY: all run clean debug
|
|
|