Initial commit: Matrix alignment prototype for HPC performance demonstration
- 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
This commit is contained in:
30
Makefile
Normal file
30
Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user