Merge branch 'elliot/measurements' into 'main'
x86 measurements See merge request course-asl-fastcode26/team70!42
This commit is contained in:
@@ -49,7 +49,7 @@ VARIANT ?= baseline
|
|||||||
|
|
||||||
# sleef is only needed for the avx512 variant (used by SLEEF intrinsics there)
|
# sleef is only needed for the avx512 variant (used by SLEEF intrinsics there)
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
ifneq ($(filter avx512_%,$(VARIANT)),)
|
ifneq ($(filter AVX512_%,$(VARIANT)),)
|
||||||
CXXFLAGS += -lsleef
|
CXXFLAGS += -lsleef
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -120,7 +120,12 @@ CXXFLAGS += -DROOFLINE=$(ROOFLINE)
|
|||||||
|
|
||||||
# Benchmark suite parameters.
|
# Benchmark suite parameters.
|
||||||
BENCH_SIZES ?= 50 100 200 500 1000 2000 5000
|
BENCH_SIZES ?= 50 100 200 500 1000 2000 5000
|
||||||
BENCH_ITER ?= 1000
|
|
||||||
|
ifneq ($(findstring AVX,$(VARIANT)),)
|
||||||
|
BENCH_SIZES += 10000
|
||||||
|
endif
|
||||||
|
|
||||||
|
BENCH_ITER ?= 200
|
||||||
|
|
||||||
# Verification parameters
|
# Verification parameters
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_avx512_1.cpp -o main_avx512_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -lsleef -lsleef -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 12332265.00 cycles
|
||||||
|
P(n): 2.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 42682490.00 cycles
|
||||||
|
P(n): 3.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 148023700.00 cycles
|
||||||
|
P(n): 3.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 893934080.00 cycles
|
||||||
|
P(n): 4.04 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 3422122660.00 cycles
|
||||||
|
P(n): 4.21 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 13481962360.00 cycles
|
||||||
|
P(n): 4.27 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 83308993160.00 cycles
|
||||||
|
P(n): 4.32 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_AVX512_1.cpp -o main_AVX512_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -lsleef -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 12410738.75 cycles
|
||||||
|
P(n): 2.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 42736235.00 cycles
|
||||||
|
P(n): 3.40 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 151930780.00 cycles
|
||||||
|
P(n): 3.81 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 898787580.00 cycles
|
||||||
|
P(n): 4.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 3427474340.00 cycles
|
||||||
|
P(n): 4.21 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 13589056760.00 cycles
|
||||||
|
P(n): 4.24 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 84346349240.00 cycles
|
||||||
|
P(n): 4.27 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 347645229380.00 cycles
|
||||||
|
P(n): 1.67 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_AVX512_1.cpp -o main_AVX512_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -lsleef -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 12329020.00 cycles
|
||||||
|
P(n): 2.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 42651410.00 cycles
|
||||||
|
P(n): 3.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 147914080.00 cycles
|
||||||
|
P(n): 3.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 894537280.00 cycles
|
||||||
|
P(n): 4.03 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 3432966440.00 cycles
|
||||||
|
P(n): 4.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 13503535040.00 cycles
|
||||||
|
P(n): 4.27 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 83704334600.00 cycles
|
||||||
|
P(n): 4.30 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 346159550800.00 cycles
|
||||||
|
P(n): 1.68 flops/cycle
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
|
||||||
/usr/bin/g++ main.cpp ./variants/variant_avx512_1.cpp -o main_avx512_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -lsleef -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 63060640.00 cycles
|
|
||||||
P(n): 2.93 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 215114100.00 cycles
|
|
||||||
P(n): 3.39 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 744500640.00 cycles
|
|
||||||
P(n): 3.89 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 4480783600.00 cycles
|
|
||||||
P(n): 4.03 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 16918374740.00 cycles
|
|
||||||
P(n): 4.26 flops/cycle
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
|
||||||
/usr/bin/g++ main.cpp ./variants/variant_avx512_1.cpp -o main_avx512_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -lsleef -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 62465750.00 cycles
|
|
||||||
P(n): 2.95 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 213111220.00 cycles
|
|
||||||
P(n): 3.42 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 749193840.00 cycles
|
|
||||||
P(n): 3.87 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 4481202620.00 cycles
|
|
||||||
P(n): 4.03 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 17063409500.00 cycles
|
|
||||||
P(n): 4.22 flops/cycle
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
|
||||||
/usr/bin/g++ main.cpp ./variants/variant_avx512_1.cpp -o main_avx512_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -lsleef -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 62186140.00 cycles
|
|
||||||
P(n): 2.97 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 214174540.00 cycles
|
|
||||||
P(n): 3.40 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 739779420.00 cycles
|
|
||||||
P(n): 3.92 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 4486436580.00 cycles
|
|
||||||
P(n): 4.02 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 16950058060.00 cycles
|
|
||||||
P(n): 4.25 flops/cycle
|
|
||||||
|
|
||||||
@@ -1,41 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_baseline.cpp -o main_baseline
|
/usr/bin/g++ main.cpp ./variants/variant_baseline.cpp -o main_baseline -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 183700.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 28.21 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 36740000.00 flops
|
||||||
T(n): 149741420.00 cycles
|
T(n): 27382860.00 cycles
|
||||||
P(n): 1.23 flops/cycle
|
P(n): 1.34 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 727400.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 56.34 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 145480000.00 flops
|
||||||
T(n): 590173880.00 cycles
|
T(n): 109792660.00 cycles
|
||||||
|
P(n): 1.33 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 434377780.00 cycles
|
||||||
|
P(n): 1.33 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 2801754240.00 cycles
|
||||||
|
P(n): 1.29 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 11397333020.00 cycles
|
||||||
|
P(n): 1.26 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 46474012140.00 cycles
|
||||||
P(n): 1.24 flops/cycle
|
P(n): 1.24 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=5000 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 1800370000.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 640112 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 2812.59 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 360074000000.00 flops
|
||||||
T(n): 2394306640.00 cycles
|
T(n): 313398836040.00 cycles
|
||||||
P(n): 1.21 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15758554280.00 cycles
|
|
||||||
P(n): 1.15 flops/cycle
|
P(n): 1.15 flops/cycle
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 61911299420.00 cycles
|
|
||||||
P(n): 1.16 flops/cycle
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_baseline.cpp -o main_baseline
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 145460860.00 cycles
|
|
||||||
P(n): 1.27 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 589429960.00 cycles
|
|
||||||
P(n): 1.24 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2395474680.00 cycles
|
|
||||||
P(n): 1.21 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15694979780.00 cycles
|
|
||||||
P(n): 1.15 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 61883782540.00 cycles
|
|
||||||
P(n): 1.16 flops/cycle
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_baseline.cpp -o main_baseline
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 147463240.00 cycles
|
|
||||||
P(n): 1.25 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 583811800.00 cycles
|
|
||||||
P(n): 1.25 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2406765140.00 cycles
|
|
||||||
P(n): 1.20 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15769461780.00 cycles
|
|
||||||
P(n): 1.14 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 61870155280.00 cycles
|
|
||||||
P(n): 1.17 flops/cycle
|
|
||||||
@@ -1,41 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_branchless.cpp -o main_branchless
|
/usr/bin/g++ main.cpp ./variants/variant_branchless.cpp -o main_branchless -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 183700.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 28.21 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 36740000.00 flops
|
||||||
T(n): 164628520.00 cycles
|
T(n): 32417335.00 cycles
|
||||||
|
P(n): 1.13 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 129693820.00 cycles
|
||||||
P(n): 1.12 flops/cycle
|
P(n): 1.12 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 2894800.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 668671300.00 cycles
|
|
||||||
P(n): 1.09 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 112.59 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 578960000.00 flops
|
||||||
T(n): 2797909140.00 cycles
|
T(n): 540955660.00 cycles
|
||||||
P(n): 1.04 flops/cycle
|
P(n): 1.07 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 18037000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 281.34 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 3607400000.00 flops
|
||||||
T(n): 18473174460.00 cycles
|
T(n): 3520866700.00 cycles
|
||||||
P(n): 0.98 flops/cycle
|
P(n): 1.02 flops/cycle
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
=== N_P=1000 N_ITER=200 ===
|
||||||
W(n) per iteration: 72090000.00 flops
|
W(n) per iteration: 72074000.00 flops
|
||||||
Q(n) per iteration: 128112 bytes
|
Q(n) per iteration: 128112 bytes
|
||||||
I(n): 562.71 flops/byte
|
I(n): 562.59 flops/byte
|
||||||
W(n): 72090000000.00 flops
|
W(n): 14414800000.00 flops
|
||||||
T(n): 72557284580.00 cycles
|
T(n): 14320050160.00 cycles
|
||||||
P(n): 0.99 flops/cycle
|
P(n): 1.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 59239757720.00 cycles
|
||||||
|
P(n): 0.97 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 385595810340.00 cycles
|
||||||
|
P(n): 0.93 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_branchless.cpp -o main_branchless
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 163598600.00 cycles
|
|
||||||
P(n): 1.13 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 672653360.00 cycles
|
|
||||||
P(n): 1.08 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2815032380.00 cycles
|
|
||||||
P(n): 1.03 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 18559971420.00 cycles
|
|
||||||
P(n): 0.97 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 72285399260.00 cycles
|
|
||||||
P(n): 1.00 flops/cycle
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_branchless.cpp -o main_branchless
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 165200000.00 cycles
|
|
||||||
P(n): 1.12 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 686277160.00 cycles
|
|
||||||
P(n): 1.06 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2805241940.00 cycles
|
|
||||||
P(n): 1.03 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 18557266380.00 cycles
|
|
||||||
P(n): 0.97 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 72552877660.00 cycles
|
|
||||||
P(n): 0.99 flops/cycle
|
|
||||||
@@ -1,41 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_branchless_sqrtfree.cpp -o main_branchless_sqrtfree
|
/usr/bin/g++ main.cpp ./variants/variant_branchless_sqrtfree.cpp -o main_branchless_sqrtfree -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 183700.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 28.21 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 36740000.00 flops
|
||||||
T(n): 160027720.00 cycles
|
T(n): 31502760.00 cycles
|
||||||
P(n): 1.15 flops/cycle
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 727400.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 56.34 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 145480000.00 flops
|
||||||
T(n): 632178740.00 cycles
|
T(n): 124771860.00 cycles
|
||||||
P(n): 1.15 flops/cycle
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 2894800.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 112.59 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 578960000.00 flops
|
||||||
T(n): 2477854340.00 cycles
|
T(n): 492923200.00 cycles
|
||||||
P(n): 1.17 flops/cycle
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 18037000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 281.34 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 3607400000.00 flops
|
||||||
T(n): 15380682320.00 cycles
|
T(n): 3068146360.00 cycles
|
||||||
|
P(n): 1.18 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 12254157320.00 cycles
|
||||||
|
P(n): 1.18 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 49194147560.00 cycles
|
||||||
P(n): 1.17 flops/cycle
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
=== N_P=5000 N_ITER=200 ===
|
||||||
W(n) per iteration: 72090000.00 flops
|
W(n) per iteration: 1800370000.00 flops
|
||||||
Q(n) per iteration: 128112 bytes
|
Q(n) per iteration: 640112 bytes
|
||||||
I(n): 562.71 flops/byte
|
I(n): 2812.59 flops/byte
|
||||||
W(n): 72090000000.00 flops
|
W(n): 360074000000.00 flops
|
||||||
T(n): 61619267280.00 cycles
|
T(n): 308136782060.00 cycles
|
||||||
P(n): 1.17 flops/cycle
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_cutoff.cpp -o main_cutoff -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 17696622.50 cycles
|
||||||
|
P(n): 2.08 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 76235880.00 cycles
|
||||||
|
P(n): 1.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 266486960.00 cycles
|
||||||
|
P(n): 2.17 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 1890343740.00 cycles
|
||||||
|
P(n): 1.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 7714431520.00 cycles
|
||||||
|
P(n): 1.87 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 33111506560.00 cycles
|
||||||
|
P(n): 1.74 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 217463904940.00 cycles
|
||||||
|
P(n): 1.66 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_cutoff_callsite.cpp -o main_cutoff_callsite -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 16586845.00 cycles
|
||||||
|
P(n): 2.22 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 71379300.00 cycles
|
||||||
|
P(n): 2.04 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 249658400.00 cycles
|
||||||
|
P(n): 2.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 1814302200.00 cycles
|
||||||
|
P(n): 1.99 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 7490646700.00 cycles
|
||||||
|
P(n): 1.92 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 30964522480.00 cycles
|
||||||
|
P(n): 1.86 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 213603966840.00 cycles
|
||||||
|
P(n): 1.69 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_baseline.cpp -o main_float_baseline -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 26646338.00 cycles
|
||||||
|
P(n): 1.38 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 101250720.00 cycles
|
||||||
|
P(n): 1.44 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 391057088.00 cycles
|
||||||
|
P(n): 1.48 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 2777867776.00 cycles
|
||||||
|
P(n): 1.30 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 11813785600.00 cycles
|
||||||
|
P(n): 1.22 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 51711320064.00 cycles
|
||||||
|
P(n): 1.11 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 368716447744.00 cycles
|
||||||
|
P(n): 0.98 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining.cpp -o main_float_inlining -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 20781472.00 cycles
|
||||||
|
P(n): 1.77 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 82498240.00 cycles
|
||||||
|
P(n): 1.76 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 337464768.00 cycles
|
||||||
|
P(n): 1.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 2432496384.00 cycles
|
||||||
|
P(n): 1.48 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 10643191808.00 cycles
|
||||||
|
P(n): 1.35 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 47047405568.00 cycles
|
||||||
|
P(n): 1.22 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 339733086208.00 cycles
|
||||||
|
P(n): 1.06 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA.cpp -o main_float_inlining_SoA -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 20960242.00 cycles
|
||||||
|
P(n): 1.75 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 84694152.00 cycles
|
||||||
|
P(n): 1.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 333992992.00 cycles
|
||||||
|
P(n): 1.73 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 2443165952.00 cycles
|
||||||
|
P(n): 1.48 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 10650114048.00 cycles
|
||||||
|
P(n): 1.35 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 47539113984.00 cycles
|
||||||
|
P(n): 1.21 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 344007868416.00 cycles
|
||||||
|
P(n): 1.05 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2.cpp -o main_float_inlining_SoA_AVX2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 9163298.00 cycles
|
||||||
|
P(n): 4.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 31129964.00 cycles
|
||||||
|
P(n): 4.67 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 116686864.00 cycles
|
||||||
|
P(n): 4.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 708034048.00 cycles
|
||||||
|
P(n): 5.09 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 2880636160.00 cycles
|
||||||
|
P(n): 5.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 12461851648.00 cycles
|
||||||
|
P(n): 4.62 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 90473930752.00 cycles
|
||||||
|
P(n): 3.98 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2.cpp -o main_float_inlining_SoA_AVX2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 9306641.00 cycles
|
||||||
|
P(n): 3.95 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 31306450.00 cycles
|
||||||
|
P(n): 4.65 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 117800880.00 cycles
|
||||||
|
P(n): 4.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 719465856.00 cycles
|
||||||
|
P(n): 5.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 2907816960.00 cycles
|
||||||
|
P(n): 4.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 12678684672.00 cycles
|
||||||
|
P(n): 4.55 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 91287060480.00 cycles
|
||||||
|
P(n): 3.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 410261585920.00 cycles
|
||||||
|
P(n): 1.42 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2.cpp -o main_float_inlining_SoA_AVX2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 9246618.00 cycles
|
||||||
|
P(n): 3.97 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 31894356.00 cycles
|
||||||
|
P(n): 4.56 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 116754544.00 cycles
|
||||||
|
P(n): 4.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 718412672.00 cycles
|
||||||
|
P(n): 5.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 2954922496.00 cycles
|
||||||
|
P(n): 4.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 12571380736.00 cycles
|
||||||
|
P(n): 4.58 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 91281481728.00 cycles
|
||||||
|
P(n): 3.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 410988249088.00 cycles
|
||||||
|
P(n): 1.41 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2_polyexp.cpp -o main_float_inlining_SoA_AVX2_polyexp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 4538634.50 cycles
|
||||||
|
P(n): 8.09 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 14836382.00 cycles
|
||||||
|
P(n): 9.81 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 52866688.00 cycles
|
||||||
|
P(n): 10.95 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 314877088.00 cycles
|
||||||
|
P(n): 11.46 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 1228216448.00 cycles
|
||||||
|
P(n): 11.74 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 4888108544.00 cycles
|
||||||
|
P(n): 11.79 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 30235383808.00 cycles
|
||||||
|
P(n): 11.91 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2_polyexp.cpp -o main_float_inlining_SoA_AVX2_polyexp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 4573347.00 cycles
|
||||||
|
P(n): 8.03 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 14972852.00 cycles
|
||||||
|
P(n): 9.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 53246808.00 cycles
|
||||||
|
P(n): 10.87 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 317441728.00 cycles
|
||||||
|
P(n): 11.36 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 1237166592.00 cycles
|
||||||
|
P(n): 11.65 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 4899325440.00 cycles
|
||||||
|
P(n): 11.76 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 30502610944.00 cycles
|
||||||
|
P(n): 11.80 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 122120396800.00 cycles
|
||||||
|
P(n): 4.76 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2_polyexp_rsqrt.cpp -o main_float_inlining_SoA_AVX2_polyexp_rsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3922583.00 cycles
|
||||||
|
P(n): 9.37 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12656640.00 cycles
|
||||||
|
P(n): 11.49 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 44724200.00 cycles
|
||||||
|
P(n): 12.95 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 264998976.00 cycles
|
||||||
|
P(n): 13.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 1051923712.00 cycles
|
||||||
|
P(n): 13.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 4077504256.00 cycles
|
||||||
|
P(n): 14.13 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 25317951488.00 cycles
|
||||||
|
P(n): 14.22 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2_polyexp_rsqrt.cpp -o main_float_inlining_SoA_AVX2_polyexp_rsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3968185.50 cycles
|
||||||
|
P(n): 9.26 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12830122.00 cycles
|
||||||
|
P(n): 11.34 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 45279400.00 cycles
|
||||||
|
P(n): 12.79 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 268426256.00 cycles
|
||||||
|
P(n): 13.44 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 1064596800.00 cycles
|
||||||
|
P(n): 13.54 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 4126754304.00 cycles
|
||||||
|
P(n): 13.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 25623275520.00 cycles
|
||||||
|
P(n): 14.05 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 102223626240.00 cycles
|
||||||
|
P(n): 5.69 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2_polyexp_rsqrt_loopopt.cpp -o main_float_inlining_SoA_AVX2_polyexp_rsqrt_loopopt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3857942.00 cycles
|
||||||
|
P(n): 9.52 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11939004.00 cycles
|
||||||
|
P(n): 12.19 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 41343432.00 cycles
|
||||||
|
P(n): 14.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 242607552.00 cycles
|
||||||
|
P(n): 14.87 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 939774144.00 cycles
|
||||||
|
P(n): 15.34 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3710422272.00 cycles
|
||||||
|
P(n): 15.53 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 23019415552.00 cycles
|
||||||
|
P(n): 15.64 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX2_polyexp_rsqrt_loopopt.cpp -o main_float_inlining_SoA_AVX2_polyexp_rsqrt_loopopt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3896576.25 cycles
|
||||||
|
P(n): 9.43 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12081705.00 cycles
|
||||||
|
P(n): 12.04 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 41848524.00 cycles
|
||||||
|
P(n): 13.83 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 245348896.00 cycles
|
||||||
|
P(n): 14.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 950120256.00 cycles
|
||||||
|
P(n): 15.17 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3760375296.00 cycles
|
||||||
|
P(n): 15.33 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 23338608640.00 cycles
|
||||||
|
P(n): 15.43 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 93044531200.00 cycles
|
||||||
|
P(n): 6.25 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp.cpp -o main_float_inlining_SoA_AVX512_polyexp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3952082.50 cycles
|
||||||
|
P(n): 9.30 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11806225.00 cycles
|
||||||
|
P(n): 12.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 39147728.00 cycles
|
||||||
|
P(n): 14.79 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 220870336.00 cycles
|
||||||
|
P(n): 16.33 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 843467072.00 cycles
|
||||||
|
P(n): 17.09 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3297570560.00 cycles
|
||||||
|
P(n): 17.48 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20527921152.00 cycles
|
||||||
|
P(n): 17.54 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp.cpp -o main_float_inlining_SoA_AVX512_polyexp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3995093.75 cycles
|
||||||
|
P(n): 9.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11929089.00 cycles
|
||||||
|
P(n): 12.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 39616448.00 cycles
|
||||||
|
P(n): 14.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 223771808.00 cycles
|
||||||
|
P(n): 16.12 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 854663616.00 cycles
|
||||||
|
P(n): 16.87 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3338979072.00 cycles
|
||||||
|
P(n): 17.26 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20689987584.00 cycles
|
||||||
|
P(n): 17.40 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 82361786368.00 cycles
|
||||||
|
P(n): 7.06 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_fastinvsqrt.cpp -o main_float_inlining_SoA_AVX512_polyexp_fastinvsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 4235088.00 cycles
|
||||||
|
P(n): 8.68 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12301878.00 cycles
|
||||||
|
P(n): 11.83 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 40178688.00 cycles
|
||||||
|
P(n): 14.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 223423168.00 cycles
|
||||||
|
P(n): 16.15 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 848105152.00 cycles
|
||||||
|
P(n): 17.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3303374080.00 cycles
|
||||||
|
P(n): 17.45 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20445360128.00 cycles
|
||||||
|
P(n): 17.61 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_fastinvsqrt.cpp -o main_float_inlining_SoA_AVX512_polyexp_fastinvsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 4261088.00 cycles
|
||||||
|
P(n): 8.62 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12455221.00 cycles
|
||||||
|
P(n): 11.68 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 40661000.00 cycles
|
||||||
|
P(n): 14.24 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 226296576.00 cycles
|
||||||
|
P(n): 15.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 859257920.00 cycles
|
||||||
|
P(n): 16.78 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3344503808.00 cycles
|
||||||
|
P(n): 17.23 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20797153280.00 cycles
|
||||||
|
P(n): 17.31 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 82334916608.00 cycles
|
||||||
|
P(n): 7.06 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3667923.00 cycles
|
||||||
|
P(n): 10.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11422578.00 cycles
|
||||||
|
P(n): 12.74 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 37820328.00 cycles
|
||||||
|
P(n): 15.31 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 216471376.00 cycles
|
||||||
|
P(n): 16.66 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 832166400.00 cycles
|
||||||
|
P(n): 17.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3253410304.00 cycles
|
||||||
|
P(n): 17.71 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20200312832.00 cycles
|
||||||
|
P(n): 17.83 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3700145.00 cycles
|
||||||
|
P(n): 9.93 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11292105.00 cycles
|
||||||
|
P(n): 12.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 38161324.00 cycles
|
||||||
|
P(n): 15.17 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 218794224.00 cycles
|
||||||
|
P(n): 16.49 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 840880000.00 cycles
|
||||||
|
P(n): 17.14 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3292569344.00 cycles
|
||||||
|
P(n): 17.50 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20442466304.00 cycles
|
||||||
|
P(n): 17.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 81447813120.00 cycles
|
||||||
|
P(n): 7.14 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3477458.00 cycles
|
||||||
|
P(n): 10.57 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11784472.00 cycles
|
||||||
|
P(n): 12.35 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 38291872.00 cycles
|
||||||
|
P(n): 15.12 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 202935328.00 cycles
|
||||||
|
P(n): 17.78 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 792025088.00 cycles
|
||||||
|
P(n): 18.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3083133952.00 cycles
|
||||||
|
P(n): 18.69 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 19033051136.00 cycles
|
||||||
|
P(n): 18.92 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3489274.50 cycles
|
||||||
|
P(n): 10.53 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11797675.00 cycles
|
||||||
|
P(n): 12.33 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 38045456.00 cycles
|
||||||
|
P(n): 15.22 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 203912944.00 cycles
|
||||||
|
P(n): 17.69 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 794322688.00 cycles
|
||||||
|
P(n): 18.15 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3086995712.00 cycles
|
||||||
|
P(n): 18.67 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 19067494400.00 cycles
|
||||||
|
P(n): 18.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 75557011456.00 cycles
|
||||||
|
P(n): 7.69 flops/cycle
|
||||||
|
|
||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_moreilp.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_moreilp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3500766.25 cycles
|
||||||
|
P(n): 10.49 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11807499.00 cycles
|
||||||
|
P(n): 12.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 38032600.00 cycles
|
||||||
|
P(n): 15.22 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 204147360.00 cycles
|
||||||
|
P(n): 17.67 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 791926400.00 cycles
|
||||||
|
P(n): 18.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3074645504.00 cycles
|
||||||
|
P(n): 18.74 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 19024320512.00 cycles
|
||||||
|
P(n): 18.93 flops/cycle
|
||||||
|
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_moreilp.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_moreilp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3498589.50 cycles
|
||||||
|
P(n): 10.50 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11758110.00 cycles
|
||||||
|
P(n): 12.37 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 37864020.00 cycles
|
||||||
|
P(n): 15.29 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 202672640.00 cycles
|
||||||
|
P(n): 17.80 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 790035264.00 cycles
|
||||||
|
P(n): 18.25 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3070306304.00 cycles
|
||||||
|
P(n): 18.77 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 18978818048.00 cycles
|
||||||
|
P(n): 18.97 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 75496284160.00 cycles
|
||||||
|
P(n): 7.70 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3466542.50 cycles
|
||||||
|
P(n): 10.60 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11758505.00 cycles
|
||||||
|
P(n): 12.37 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 38354536.00 cycles
|
||||||
|
P(n): 15.09 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 203609408.00 cycles
|
||||||
|
P(n): 17.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 792448704.00 cycles
|
||||||
|
P(n): 18.19 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3076762624.00 cycles
|
||||||
|
P(n): 18.73 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 19086870528.00 cycles
|
||||||
|
P(n): 18.87 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3470556.25 cycles
|
||||||
|
P(n): 10.59 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 11748129.00 cycles
|
||||||
|
P(n): 12.38 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 37961964.00 cycles
|
||||||
|
P(n): 15.25 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 203245888.00 cycles
|
||||||
|
P(n): 17.75 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 792723072.00 cycles
|
||||||
|
P(n): 18.18 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3083602944.00 cycles
|
||||||
|
P(n): 18.69 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 19105830912.00 cycles
|
||||||
|
P(n): 18.85 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 75556601856.00 cycles
|
||||||
|
P(n): 7.69 flops/cycle
|
||||||
|
|
||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt_morersqrt.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt_morersqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 2966264.00 cycles
|
||||||
|
P(n): 12.39 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 9680198.00 cycles
|
||||||
|
P(n): 15.03 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 30652810.00 cycles
|
||||||
|
P(n): 18.89 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 160992976.00 cycles
|
||||||
|
P(n): 22.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 629138816.00 cycles
|
||||||
|
P(n): 22.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 2423142656.00 cycles
|
||||||
|
P(n): 23.78 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 15022035968.00 cycles
|
||||||
|
P(n): 23.97 flops/cycle
|
||||||
|
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt_morersqrt.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt_morersqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 2942563.50 cycles
|
||||||
|
P(n): 12.49 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 9665785.00 cycles
|
||||||
|
P(n): 15.05 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 30626330.00 cycles
|
||||||
|
P(n): 18.90 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 161586752.00 cycles
|
||||||
|
P(n): 22.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 626457472.00 cycles
|
||||||
|
P(n): 23.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 2423129344.00 cycles
|
||||||
|
P(n): 23.78 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 14910323712.00 cycles
|
||||||
|
P(n): 24.15 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 59213176832.00 cycles
|
||||||
|
P(n): 9.81 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_4.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_4 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3587017.50 cycles
|
||||||
|
P(n): 10.24 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12215910.00 cycles
|
||||||
|
P(n): 11.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 44944608.00 cycles
|
||||||
|
P(n): 12.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 214169936.00 cycles
|
||||||
|
P(n): 16.84 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 828421248.00 cycles
|
||||||
|
P(n): 17.40 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3268490496.00 cycles
|
||||||
|
P(n): 17.63 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20012742656.00 cycles
|
||||||
|
P(n): 17.99 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float.cpp ./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_4.cpp -o main_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_4 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 56.42 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 3567542.00 cycles
|
||||||
|
P(n): 10.30 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 112.67 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 12180789.00 cycles
|
||||||
|
P(n): 11.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 225.17 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 44522004.00 cycles
|
||||||
|
P(n): 13.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 562.67 flops/byte
|
||||||
|
W(n): 3607399936.00 flops
|
||||||
|
T(n): 212099104.00 cycles
|
||||||
|
P(n): 17.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 1125.17 flops/byte
|
||||||
|
W(n): 14414799872.00 flops
|
||||||
|
T(n): 830612480.00 cycles
|
||||||
|
P(n): 17.35 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 2250.17 flops/byte
|
||||||
|
W(n): 57629601792.00 flops
|
||||||
|
T(n): 3272956672.00 cycles
|
||||||
|
P(n): 17.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800369920.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 5625.17 flops/byte
|
||||||
|
W(n): 360073986048.00 flops
|
||||||
|
T(n): 20105635840.00 cycles
|
||||||
|
P(n): 17.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772800.00 flops
|
||||||
|
Q(n) per iteration: 640056 bytes
|
||||||
|
I(n): 4539.87 flops/byte
|
||||||
|
W(n): 581154570240.00 flops
|
||||||
|
T(n): 79669575680.00 cycles
|
||||||
|
P(n): 7.29 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float_symmetry.cpp ./variants/variant_float_inlining_SoA_symmetry.cpp -o main_float_inlining_SoA_symmetry -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 95500.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 29.33 flops/byte
|
||||||
|
W(n): 19100000.00 flops
|
||||||
|
T(n): 20443398.00 cycles
|
||||||
|
P(n): 0.93 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 371000.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 57.47 flops/byte
|
||||||
|
W(n): 74200000.00 flops
|
||||||
|
T(n): 81014880.00 cycles
|
||||||
|
P(n): 0.92 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1462000.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 113.72 flops/byte
|
||||||
|
W(n): 292400000.00 flops
|
||||||
|
T(n): 331113888.00 cycles
|
||||||
|
P(n): 0.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 9055000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 282.47 flops/byte
|
||||||
|
W(n): 1811000064.00 flops
|
||||||
|
T(n): 2539428096.00 cycles
|
||||||
|
P(n): 0.71 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 563.73 flops/byte
|
||||||
|
W(n): 7222000128.00 flops
|
||||||
|
T(n): 10876538880.00 cycles
|
||||||
|
P(n): 0.66 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 1126.23 flops/byte
|
||||||
|
W(n): 28843999232.00 flops
|
||||||
|
T(n): 48466726912.00 cycles
|
||||||
|
P(n): 0.60 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550016.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 2813.73 flops/byte
|
||||||
|
W(n): 180110000128.00 flops
|
||||||
|
T(n): 346659454976.00 cycles
|
||||||
|
P(n): 0.52 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float_symmetry.cpp ./variants/variant_float_inlining_SoA_symmetry_ILP_16.cpp -o main_float_inlining_SoA_symmetry_ILP_16 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 95500.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 29.33 flops/byte
|
||||||
|
W(n): 19100000.00 flops
|
||||||
|
T(n): 17791650.00 cycles
|
||||||
|
P(n): 1.07 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 371000.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 57.47 flops/byte
|
||||||
|
W(n): 74200000.00 flops
|
||||||
|
T(n): 63650020.00 cycles
|
||||||
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1462000.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 113.72 flops/byte
|
||||||
|
W(n): 292400000.00 flops
|
||||||
|
T(n): 250374816.00 cycles
|
||||||
|
P(n): 1.17 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 9055000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 282.47 flops/byte
|
||||||
|
W(n): 1811000064.00 flops
|
||||||
|
T(n): 1849248512.00 cycles
|
||||||
|
P(n): 0.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 563.73 flops/byte
|
||||||
|
W(n): 7222000128.00 flops
|
||||||
|
T(n): 7805267968.00 cycles
|
||||||
|
P(n): 0.93 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 1126.23 flops/byte
|
||||||
|
W(n): 28843999232.00 flops
|
||||||
|
T(n): 33598928896.00 cycles
|
||||||
|
P(n): 0.86 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550016.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 2813.73 flops/byte
|
||||||
|
W(n): 180110000128.00 flops
|
||||||
|
T(n): 219049099264.00 cycles
|
||||||
|
P(n): 0.82 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float_symmetry.cpp ./variants/variant_float_inlining_SoA_symmetry_ILP_2.cpp -o main_float_inlining_SoA_symmetry_ILP_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 95500.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 29.33 flops/byte
|
||||||
|
W(n): 19100000.00 flops
|
||||||
|
T(n): 18485358.00 cycles
|
||||||
|
P(n): 1.03 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 371000.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 57.47 flops/byte
|
||||||
|
W(n): 74200000.00 flops
|
||||||
|
T(n): 72121936.00 cycles
|
||||||
|
P(n): 1.03 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1462000.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 113.72 flops/byte
|
||||||
|
W(n): 292400000.00 flops
|
||||||
|
T(n): 292071552.00 cycles
|
||||||
|
P(n): 1.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 9055000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 282.47 flops/byte
|
||||||
|
W(n): 1811000064.00 flops
|
||||||
|
T(n): 2159562496.00 cycles
|
||||||
|
P(n): 0.84 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 563.73 flops/byte
|
||||||
|
W(n): 7222000128.00 flops
|
||||||
|
T(n): 9204052992.00 cycles
|
||||||
|
P(n): 0.78 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 1126.23 flops/byte
|
||||||
|
W(n): 28843999232.00 flops
|
||||||
|
T(n): 40539975680.00 cycles
|
||||||
|
P(n): 0.71 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550016.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 2813.73 flops/byte
|
||||||
|
W(n): 180110000128.00 flops
|
||||||
|
T(n): 287918915584.00 cycles
|
||||||
|
P(n): 0.63 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float_symmetry.cpp ./variants/variant_float_inlining_SoA_symmetry_ILP_4.cpp -o main_float_inlining_SoA_symmetry_ILP_4 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 95500.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 29.33 flops/byte
|
||||||
|
W(n): 19100000.00 flops
|
||||||
|
T(n): 17061072.00 cycles
|
||||||
|
P(n): 1.12 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 371000.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 57.47 flops/byte
|
||||||
|
W(n): 74200000.00 flops
|
||||||
|
T(n): 65790100.00 cycles
|
||||||
|
P(n): 1.13 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1462000.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 113.72 flops/byte
|
||||||
|
W(n): 292400000.00 flops
|
||||||
|
T(n): 264942048.00 cycles
|
||||||
|
P(n): 1.10 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 9055000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 282.47 flops/byte
|
||||||
|
W(n): 1811000064.00 flops
|
||||||
|
T(n): 1959643520.00 cycles
|
||||||
|
P(n): 0.92 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 563.73 flops/byte
|
||||||
|
W(n): 7222000128.00 flops
|
||||||
|
T(n): 8446174720.00 cycles
|
||||||
|
P(n): 0.86 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 1126.23 flops/byte
|
||||||
|
W(n): 28843999232.00 flops
|
||||||
|
T(n): 35463753728.00 cycles
|
||||||
|
P(n): 0.81 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550016.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 2813.73 flops/byte
|
||||||
|
W(n): 180110000128.00 flops
|
||||||
|
T(n): 238467334144.00 cycles
|
||||||
|
P(n): 0.76 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-float_symmetry.cpp ./variants/variant_float_inlining_SoA_symmetry_ILP_8.cpp -o main_float_inlining_SoA_symmetry_ILP_8 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 95500.00 flops
|
||||||
|
Q(n) per iteration: 3256 bytes
|
||||||
|
I(n): 29.33 flops/byte
|
||||||
|
W(n): 19100000.00 flops
|
||||||
|
T(n): 15124368.00 cycles
|
||||||
|
P(n): 1.26 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 371000.00 flops
|
||||||
|
Q(n) per iteration: 6456 bytes
|
||||||
|
I(n): 57.47 flops/byte
|
||||||
|
W(n): 74200000.00 flops
|
||||||
|
T(n): 56135200.00 cycles
|
||||||
|
P(n): 1.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1462000.00 flops
|
||||||
|
Q(n) per iteration: 12856 bytes
|
||||||
|
I(n): 113.72 flops/byte
|
||||||
|
W(n): 292400000.00 flops
|
||||||
|
T(n): 226270656.00 cycles
|
||||||
|
P(n): 1.29 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 9055000.00 flops
|
||||||
|
Q(n) per iteration: 32056 bytes
|
||||||
|
I(n): 282.47 flops/byte
|
||||||
|
W(n): 1811000064.00 flops
|
||||||
|
T(n): 1701087744.00 cycles
|
||||||
|
P(n): 1.06 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 64056 bytes
|
||||||
|
I(n): 563.73 flops/byte
|
||||||
|
W(n): 7222000128.00 flops
|
||||||
|
T(n): 7419836416.00 cycles
|
||||||
|
P(n): 0.97 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 128056 bytes
|
||||||
|
I(n): 1126.23 flops/byte
|
||||||
|
W(n): 28843999232.00 flops
|
||||||
|
T(n): 31232745472.00 cycles
|
||||||
|
P(n): 0.92 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550016.00 flops
|
||||||
|
Q(n) per iteration: 320056 bytes
|
||||||
|
I(n): 2813.73 flops/byte
|
||||||
|
W(n): 180110000128.00 flops
|
||||||
|
T(n): 206565244928.00 cycles
|
||||||
|
P(n): 0.87 flops/cycle
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DBENCHMARK=1 main.cpp ./variants/variant_ilp.cpp -o main_ilp
|
|
||||||
@@ -1,41 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7.cpp -o main_inlining_7
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_7.cpp -o main_inlining_7 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 183700.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 28.21 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 36740000.00 flops
|
||||||
T(n): 131794980.00 cycles
|
T(n): 26152610.00 cycles
|
||||||
P(n): 1.40 flops/cycle
|
P(n): 1.40 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 727400.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 56.34 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 145480000.00 flops
|
||||||
T(n): 527605420.00 cycles
|
T(n): 102855340.00 cycles
|
||||||
P(n): 1.38 flops/cycle
|
P(n): 1.41 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 2894800.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 112.59 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 578960000.00 flops
|
||||||
T(n): 2166884360.00 cycles
|
T(n): 416352020.00 cycles
|
||||||
P(n): 1.34 flops/cycle
|
P(n): 1.39 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 18037000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 281.34 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 3607400000.00 flops
|
||||||
T(n): 14615797280.00 cycles
|
T(n): 2703040180.00 cycles
|
||||||
P(n): 1.23 flops/cycle
|
P(n): 1.33 flops/cycle
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
=== N_P=1000 N_ITER=200 ===
|
||||||
W(n) per iteration: 72090000.00 flops
|
W(n) per iteration: 72074000.00 flops
|
||||||
Q(n) per iteration: 128112 bytes
|
Q(n) per iteration: 128112 bytes
|
||||||
I(n): 562.71 flops/byte
|
I(n): 562.59 flops/byte
|
||||||
W(n): 72090000000.00 flops
|
W(n): 14414800000.00 flops
|
||||||
T(n): 57677070100.00 cycles
|
T(n): 10945114300.00 cycles
|
||||||
P(n): 1.25 flops/cycle
|
P(n): 1.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 44780593360.00 cycles
|
||||||
|
P(n): 1.29 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 302187860020.00 cycles
|
||||||
|
P(n): 1.19 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7.cpp -o main_inlining_7
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 132693220.00 cycles
|
|
||||||
P(n): 1.39 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 527980800.00 cycles
|
|
||||||
P(n): 1.38 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2161999920.00 cycles
|
|
||||||
P(n): 1.34 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 14567319680.00 cycles
|
|
||||||
P(n): 1.24 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 57637351660.00 cycles
|
|
||||||
P(n): 1.25 flops/cycle
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7.cpp -o main_inlining_7
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 132083640.00 cycles
|
|
||||||
P(n): 1.40 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 526775360.00 cycles
|
|
||||||
P(n): 1.38 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2160050540.00 cycles
|
|
||||||
P(n): 1.34 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 14605475200.00 cycles
|
|
||||||
P(n): 1.24 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=1000 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 72090000.00 flops
|
|
||||||
Q(n) per iteration: 128112 bytes
|
|
||||||
I(n): 562.71 flops/byte
|
|
||||||
W(n): 72090000000.00 flops
|
|
||||||
T(n): 57692748180.00 cycles
|
|
||||||
P(n): 1.25 flops/cycle
|
|
||||||
@@ -1,33 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_SoA.cpp -o main_inlining_7_SoA
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_7_SoA.cpp -o main_inlining_7_SoA -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 183700.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 28.21 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 36740000.00 flops
|
||||||
T(n): 174279560.00 cycles
|
T(n): 35383470.00 cycles
|
||||||
|
P(n): 1.04 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 135260800.00 cycles
|
||||||
|
P(n): 1.08 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 568409800.00 cycles
|
||||||
|
P(n): 1.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 3527927320.00 cycles
|
||||||
|
P(n): 1.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 13794114780.00 cycles
|
||||||
|
P(n): 1.04 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 55124148000.00 cycles
|
||||||
|
P(n): 1.05 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 339496934040.00 cycles
|
||||||
P(n): 1.06 flops/cycle
|
P(n): 1.06 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 771260820.00 cycles
|
|
||||||
P(n): 0.95 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 3263227240.00 cycles
|
|
||||||
P(n): 0.89 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 19848792000.00 cycles
|
|
||||||
P(n): 0.91 flops/cycle
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_SoA.cpp -o main_inlining_7_SoA
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 174641860.00 cycles
|
|
||||||
P(n): 1.06 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 769502860.00 cycles
|
|
||||||
P(n): 0.95 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 3259749920.00 cycles
|
|
||||||
P(n): 0.89 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 19799476220.00 cycles
|
|
||||||
P(n): 0.91 flops/cycle
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_SoA.cpp -o main_inlining_7_SoA
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 174646140.00 cycles
|
|
||||||
P(n): 1.06 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 771133380.00 cycles
|
|
||||||
P(n): 0.95 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 3262481280.00 cycles
|
|
||||||
P(n): 0.89 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 19817595500.00 cycles
|
|
||||||
P(n): 0.91 flops/cycle
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_7_SoA_AVX2.cpp -o main_inlining_7_SoA_AVX2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 16974342.50 cycles
|
||||||
|
P(n): 2.16 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 57723920.00 cycles
|
||||||
|
P(n): 2.52 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 222978920.00 cycles
|
||||||
|
P(n): 2.60 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 1357585720.00 cycles
|
||||||
|
P(n): 2.66 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 5355315600.00 cycles
|
||||||
|
P(n): 2.69 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 21335421540.00 cycles
|
||||||
|
P(n): 2.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 117834867640.00 cycles
|
||||||
|
P(n): 3.06 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_7_SoA_AVX2.cpp -o main_inlining_7_SoA_AVX2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 16926442.50 cycles
|
||||||
|
P(n): 2.17 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 57446850.00 cycles
|
||||||
|
P(n): 2.53 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 221308320.00 cycles
|
||||||
|
P(n): 2.62 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 1356623360.00 cycles
|
||||||
|
P(n): 2.66 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 5376098620.00 cycles
|
||||||
|
P(n): 2.68 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 21339460820.00 cycles
|
||||||
|
P(n): 2.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 117506633560.00 cycles
|
||||||
|
P(n): 3.06 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 482998340640.00 cycles
|
||||||
|
P(n): 1.20 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_7_SoA_AVX2_polyexp.cpp -o main_inlining_7_SoA_AVX2_polyexp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 9225415.00 cycles
|
||||||
|
P(n): 3.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 32320875.00 cycles
|
||||||
|
P(n): 4.50 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 122392560.00 cycles
|
||||||
|
P(n): 4.73 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 727457980.00 cycles
|
||||||
|
P(n): 4.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2871839460.00 cycles
|
||||||
|
P(n): 5.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 11342093520.00 cycles
|
||||||
|
P(n): 5.08 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 70407692300.00 cycles
|
||||||
|
P(n): 5.11 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_7_SoA_AVX2_polyexp.cpp -o main_inlining_7_SoA_AVX2_polyexp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 9074662.50 cycles
|
||||||
|
P(n): 4.05 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 31994315.00 cycles
|
||||||
|
P(n): 4.55 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 120234740.00 cycles
|
||||||
|
P(n): 4.82 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 719504200.00 cycles
|
||||||
|
P(n): 5.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2844257700.00 cycles
|
||||||
|
P(n): 5.07 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 11300324680.00 cycles
|
||||||
|
P(n): 5.10 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 70554568640.00 cycles
|
||||||
|
P(n): 5.10 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 281416807980.00 cycles
|
||||||
|
P(n): 2.07 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main-symmetry.cpp ./variants/variant_inlining_7_symmetry_1.cpp -o main_inlining_7_symmetry_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 95500.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 14.67 flops/byte
|
||||||
|
W(n): 19100000.00 flops
|
||||||
|
T(n): 26579745.00 cycles
|
||||||
|
P(n): 0.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 371000.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 28.73 flops/byte
|
||||||
|
W(n): 74200000.00 flops
|
||||||
|
T(n): 103695480.00 cycles
|
||||||
|
P(n): 0.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1462000.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 56.86 flops/byte
|
||||||
|
W(n): 292400000.00 flops
|
||||||
|
T(n): 419123920.00 cycles
|
||||||
|
P(n): 0.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 9055000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 141.24 flops/byte
|
||||||
|
W(n): 1811000000.00 flops
|
||||||
|
T(n): 2784745220.00 cycles
|
||||||
|
P(n): 0.65 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 281.86 flops/byte
|
||||||
|
W(n): 7222000000.00 flops
|
||||||
|
T(n): 11348309820.00 cycles
|
||||||
|
P(n): 0.64 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 563.11 flops/byte
|
||||||
|
W(n): 28844000000.00 flops
|
||||||
|
T(n): 46060134940.00 cycles
|
||||||
|
P(n): 0.63 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 1406.86 flops/byte
|
||||||
|
W(n): 180110000000.00 flops
|
||||||
|
T(n): 207964035400.00 cycles
|
||||||
|
P(n): 0.87 flops/cycle
|
||||||
|
|
||||||
@@ -1,33 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2.cpp -o main_inlining_7_symmetry_2
|
/usr/bin/g++ main-symmetry.cpp ./variants/variant_inlining_7_symmetry_2.cpp -o main_inlining_7_symmetry_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 95500.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 14.67 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 19100000.00 flops
|
||||||
T(n): 134217900.00 cycles
|
T(n): 27293615.00 cycles
|
||||||
P(n): 1.37 flops/cycle
|
P(n): 0.70 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 371000.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 28.73 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 74200000.00 flops
|
||||||
T(n): 539909700.00 cycles
|
T(n): 105365700.00 cycles
|
||||||
P(n): 1.35 flops/cycle
|
P(n): 0.70 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 1462000.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 56.86 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 292400000.00 flops
|
||||||
T(n): 2204928560.00 cycles
|
T(n): 419757680.00 cycles
|
||||||
P(n): 1.31 flops/cycle
|
P(n): 0.70 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 9055000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 141.24 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 1811000000.00 flops
|
||||||
T(n): 15229802740.00 cycles
|
T(n): 2826530220.00 cycles
|
||||||
P(n): 1.18 flops/cycle
|
P(n): 0.64 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 281.86 flops/byte
|
||||||
|
W(n): 7222000000.00 flops
|
||||||
|
T(n): 11717351620.00 cycles
|
||||||
|
P(n): 0.62 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 563.11 flops/byte
|
||||||
|
W(n): 28844000000.00 flops
|
||||||
|
T(n): 47723304520.00 cycles
|
||||||
|
P(n): 0.60 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 1406.86 flops/byte
|
||||||
|
W(n): 180110000000.00 flops
|
||||||
|
T(n): 223284452580.00 cycles
|
||||||
|
P(n): 0.81 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2.cpp -o main_inlining_7_symmetry_2
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 134590240.00 cycles
|
|
||||||
P(n): 1.37 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 537772020.00 cycles
|
|
||||||
P(n): 1.36 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2216669180.00 cycles
|
|
||||||
P(n): 1.31 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15269978860.00 cycles
|
|
||||||
P(n): 1.18 flops/cycle
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2.cpp -o main_inlining_7_symmetry_2
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 133252040.00 cycles
|
|
||||||
P(n): 1.38 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 533142280.00 cycles
|
|
||||||
P(n): 1.37 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2200045220.00 cycles
|
|
||||||
P(n): 1.32 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15171854800.00 cycles
|
|
||||||
P(n): 1.19 flops/cycle
|
|
||||||
@@ -1,33 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2_ilp_1.cpp -o main_inlining_7_symmetry_2_ilp_1
|
/usr/bin/g++ main-symmetry.cpp ./variants/variant_inlining_7_symmetry_2_ilp_1.cpp -o main_inlining_7_symmetry_2_ilp_1 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 95500.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 14.67 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 19100000.00 flops
|
||||||
T(n): 134117580.00 cycles
|
T(n): 26906550.00 cycles
|
||||||
P(n): 1.38 flops/cycle
|
P(n): 0.71 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 371000.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 28.73 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 74200000.00 flops
|
||||||
T(n): 529885740.00 cycles
|
T(n): 103009840.00 cycles
|
||||||
P(n): 1.38 flops/cycle
|
P(n): 0.72 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 1462000.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 56.86 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 292400000.00 flops
|
||||||
T(n): 2158215760.00 cycles
|
T(n): 415634800.00 cycles
|
||||||
P(n): 1.34 flops/cycle
|
P(n): 0.70 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 9055000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 141.24 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 1811000000.00 flops
|
||||||
T(n): 14658868260.00 cycles
|
T(n): 2788626920.00 cycles
|
||||||
P(n): 1.23 flops/cycle
|
P(n): 0.65 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 281.86 flops/byte
|
||||||
|
W(n): 7222000000.00 flops
|
||||||
|
T(n): 11839944240.00 cycles
|
||||||
|
P(n): 0.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 563.11 flops/byte
|
||||||
|
W(n): 28844000000.00 flops
|
||||||
|
T(n): 47471597160.00 cycles
|
||||||
|
P(n): 0.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 1406.86 flops/byte
|
||||||
|
W(n): 180110000000.00 flops
|
||||||
|
T(n): 229239879220.00 cycles
|
||||||
|
P(n): 0.79 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2_ilp_1.cpp -o main_inlining_7_symmetry_2_ilp_1
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 135847100.00 cycles
|
|
||||||
P(n): 1.36 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 531086160.00 cycles
|
|
||||||
P(n): 1.37 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2149640340.00 cycles
|
|
||||||
P(n): 1.35 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 14662439140.00 cycles
|
|
||||||
P(n): 1.23 flops/cycle
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2_ilp_1.cpp -o main_inlining_7_symmetry_2_ilp_1
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 132982240.00 cycles
|
|
||||||
P(n): 1.39 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 530176140.00 cycles
|
|
||||||
P(n): 1.38 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2162889920.00 cycles
|
|
||||||
P(n): 1.34 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 14697507480.00 cycles
|
|
||||||
P(n): 1.23 flops/cycle
|
|
||||||
@@ -1,33 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2_ilp_2.cpp -o main_inlining_7_symmetry_2_ilp_2
|
/usr/bin/g++ main-symmetry.cpp ./variants/variant_inlining_7_symmetry_2_ilp_2.cpp -o main_inlining_7_symmetry_2_ilp_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 95500.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 14.67 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 19100000.00 flops
|
||||||
T(n): 138339020.00 cycles
|
T(n): 27010420.00 cycles
|
||||||
P(n): 1.33 flops/cycle
|
P(n): 0.71 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 371000.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 28.73 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 74200000.00 flops
|
||||||
T(n): 534997480.00 cycles
|
T(n): 104951940.00 cycles
|
||||||
P(n): 1.36 flops/cycle
|
P(n): 0.71 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 1462000.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 56.86 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 292400000.00 flops
|
||||||
T(n): 2168912380.00 cycles
|
T(n): 424775660.00 cycles
|
||||||
P(n): 1.34 flops/cycle
|
P(n): 0.69 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 9055000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 141.24 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 1811000000.00 flops
|
||||||
T(n): 14986758980.00 cycles
|
T(n): 2897228320.00 cycles
|
||||||
P(n): 1.20 flops/cycle
|
P(n): 0.63 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 36110000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 281.86 flops/byte
|
||||||
|
W(n): 7222000000.00 flops
|
||||||
|
T(n): 11755662900.00 cycles
|
||||||
|
P(n): 0.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 144220000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 563.11 flops/byte
|
||||||
|
W(n): 28844000000.00 flops
|
||||||
|
T(n): 48142159600.00 cycles
|
||||||
|
P(n): 0.60 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 900550000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 1406.86 flops/byte
|
||||||
|
W(n): 180110000000.00 flops
|
||||||
|
T(n): 323181153620.00 cycles
|
||||||
|
P(n): 0.56 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2_ilp_2.cpp -o main_inlining_7_symmetry_2_ilp_2
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 135244420.00 cycles
|
|
||||||
P(n): 1.36 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 537453160.00 cycles
|
|
||||||
P(n): 1.36 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2175781640.00 cycles
|
|
||||||
P(n): 1.33 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 14932133120.00 cycles
|
|
||||||
P(n): 1.21 flops/cycle
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_inlining_7_symmetry_2_ilp_2.cpp -o main_inlining_7_symmetry_2_ilp_2
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 135881620.00 cycles
|
|
||||||
P(n): 1.36 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 534853360.00 cycles
|
|
||||||
P(n): 1.36 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2166176600.00 cycles
|
|
||||||
P(n): 1.34 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 14773516340.00 cycles
|
|
||||||
P(n): 1.22 flops/cycle
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8.cpp -o main_inlining_8 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 26107785.00 cycles
|
||||||
|
P(n): 1.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 101599080.00 cycles
|
||||||
|
P(n): 1.43 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 411127240.00 cycles
|
||||||
|
P(n): 1.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 2720631660.00 cycles
|
||||||
|
P(n): 1.33 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 10908764220.00 cycles
|
||||||
|
P(n): 1.32 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 44709284140.00 cycles
|
||||||
|
P(n): 1.29 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 302868572700.00 cycles
|
||||||
|
P(n): 1.19 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt.cpp -o main_inlining_8_SoA_AVX512_polyexp_fastinvsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 7287068.75 cycles
|
||||||
|
P(n): 5.04 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 24479917.50 cycles
|
||||||
|
P(n): 5.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 88304220.00 cycles
|
||||||
|
P(n): 6.56 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 532537300.00 cycles
|
||||||
|
P(n): 6.77 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2074603460.00 cycles
|
||||||
|
P(n): 6.95 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8222911780.00 cycles
|
||||||
|
P(n): 7.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 51149290420.00 cycles
|
||||||
|
P(n): 7.04 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt.cpp -o main_inlining_8_SoA_AVX512_polyexp_fastinvsqrt -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 7237100.00 cycles
|
||||||
|
P(n): 5.08 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 24227557.50 cycles
|
||||||
|
P(n): 6.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 87321790.00 cycles
|
||||||
|
P(n): 6.63 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 529210780.00 cycles
|
||||||
|
P(n): 6.82 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2064752120.00 cycles
|
||||||
|
P(n): 6.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8154495340.00 cycles
|
||||||
|
P(n): 7.07 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 50962729840.00 cycles
|
||||||
|
P(n): 7.07 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 203476930280.00 cycles
|
||||||
|
P(n): 2.86 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt_sr.cpp -o main_inlining_8_SoA_AVX512_polyexp_fastinvsqrt_sr -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 7143010.00 cycles
|
||||||
|
P(n): 5.14 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 24630712.50 cycles
|
||||||
|
P(n): 5.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 88030350.00 cycles
|
||||||
|
P(n): 6.58 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 538550140.00 cycles
|
||||||
|
P(n): 6.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2077772880.00 cycles
|
||||||
|
P(n): 6.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8277950160.00 cycles
|
||||||
|
P(n): 6.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 51513976020.00 cycles
|
||||||
|
P(n): 6.99 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt_sr.cpp -o main_inlining_8_SoA_AVX512_polyexp_fastinvsqrt_sr -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 7224345.00 cycles
|
||||||
|
P(n): 5.09 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 24323830.00 cycles
|
||||||
|
P(n): 5.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 87541580.00 cycles
|
||||||
|
P(n): 6.61 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 540497680.00 cycles
|
||||||
|
P(n): 6.67 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2069077440.00 cycles
|
||||||
|
P(n): 6.97 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8259242740.00 cycles
|
||||||
|
P(n): 6.98 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 51381444880.00 cycles
|
||||||
|
P(n): 7.01 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 205008714840.00 cycles
|
||||||
|
P(n): 2.83 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_moreavx.cpp -o main_inlining_8_SoA_AVX512_polyexp_moreavx -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 6876013.75 cycles
|
||||||
|
P(n): 5.34 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 23521667.50 cycles
|
||||||
|
P(n): 6.18 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 85927760.00 cycles
|
||||||
|
P(n): 6.74 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 524078060.00 cycles
|
||||||
|
P(n): 6.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2052525500.00 cycles
|
||||||
|
P(n): 7.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8210618700.00 cycles
|
||||||
|
P(n): 7.02 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 50972389900.00 cycles
|
||||||
|
P(n): 7.06 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_moreavx.cpp -o main_inlining_8_SoA_AVX512_polyexp_moreavx -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 6880311.25 cycles
|
||||||
|
P(n): 5.34 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 23463525.00 cycles
|
||||||
|
P(n): 6.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 85995280.00 cycles
|
||||||
|
P(n): 6.73 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 521810900.00 cycles
|
||||||
|
P(n): 6.91 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2070674920.00 cycles
|
||||||
|
P(n): 6.96 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8150338100.00 cycles
|
||||||
|
P(n): 7.07 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 50841614020.00 cycles
|
||||||
|
P(n): 7.08 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 202898659340.00 cycles
|
||||||
|
P(n): 2.86 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_moreavx_ilp_2.cpp -o main_inlining_8_SoA_AVX512_polyexp_moreavx_ilp_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 7796687.50 cycles
|
||||||
|
P(n): 4.71 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 25453505.00 cycles
|
||||||
|
P(n): 5.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 90370870.00 cycles
|
||||||
|
P(n): 6.41 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 538274500.00 cycles
|
||||||
|
P(n): 6.70 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2095953220.00 cycles
|
||||||
|
P(n): 6.88 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8248614920.00 cycles
|
||||||
|
P(n): 6.99 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 51762509580.00 cycles
|
||||||
|
P(n): 6.96 flops/cycle
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
|
/usr/bin/g++ main.cpp ./variants/variant_inlining_8_SoA_AVX512_polyexp_moreavx_ilp_2.cpp -o main_inlining_8_SoA_AVX512_polyexp_moreavx_ilp_2 -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
|
=== N_P=50 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 183700.00 flops
|
||||||
|
Q(n) per iteration: 6512 bytes
|
||||||
|
I(n): 28.21 flops/byte
|
||||||
|
W(n): 36740000.00 flops
|
||||||
|
T(n): 7778888.75 cycles
|
||||||
|
P(n): 4.72 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=100 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 727400.00 flops
|
||||||
|
Q(n) per iteration: 12912 bytes
|
||||||
|
I(n): 56.34 flops/byte
|
||||||
|
W(n): 145480000.00 flops
|
||||||
|
T(n): 25303990.00 cycles
|
||||||
|
P(n): 5.75 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=200 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2894800.00 flops
|
||||||
|
Q(n) per iteration: 25712 bytes
|
||||||
|
I(n): 112.59 flops/byte
|
||||||
|
W(n): 578960000.00 flops
|
||||||
|
T(n): 89661540.00 cycles
|
||||||
|
P(n): 6.46 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=500 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 18037000.00 flops
|
||||||
|
Q(n) per iteration: 64112 bytes
|
||||||
|
I(n): 281.34 flops/byte
|
||||||
|
W(n): 3607400000.00 flops
|
||||||
|
T(n): 534011120.00 cycles
|
||||||
|
P(n): 6.76 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 2077751560.00 cycles
|
||||||
|
P(n): 6.94 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 8233407040.00 cycles
|
||||||
|
P(n): 7.00 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 51189403060.00 cycles
|
||||||
|
P(n): 7.03 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=10000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 2905772704.00 flops
|
||||||
|
Q(n) per iteration: 1280112 bytes
|
||||||
|
I(n): 2269.94 flops/byte
|
||||||
|
W(n): 581154540800.00 flops
|
||||||
|
T(n): 204461065180.00 cycles
|
||||||
|
P(n): 2.84 flops/cycle
|
||||||
|
|
||||||
@@ -1,33 +1,58 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_lut_exp.cpp -o main_lut_exp
|
/usr/bin/g++ main.cpp ./variants/variant_lut_exp.cpp -o main_lut_exp -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
|
||||||
=== N_P=50 N_ITER=1000 ===
|
=== N_P=50 N_ITER=200 ===
|
||||||
W(n) per iteration: 184500.00 flops
|
W(n) per iteration: 183700.00 flops
|
||||||
Q(n) per iteration: 6512 bytes
|
Q(n) per iteration: 6512 bytes
|
||||||
I(n): 28.33 flops/byte
|
I(n): 28.21 flops/byte
|
||||||
W(n): 184500000.00 flops
|
W(n): 36740000.00 flops
|
||||||
T(n): 145567620.00 cycles
|
T(n): 28473305.00 cycles
|
||||||
P(n): 1.27 flops/cycle
|
P(n): 1.29 flops/cycle
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
=== N_P=100 N_ITER=200 ===
|
||||||
W(n) per iteration: 729000.00 flops
|
W(n) per iteration: 727400.00 flops
|
||||||
Q(n) per iteration: 12912 bytes
|
Q(n) per iteration: 12912 bytes
|
||||||
I(n): 56.46 flops/byte
|
I(n): 56.34 flops/byte
|
||||||
W(n): 729000000.00 flops
|
W(n): 145480000.00 flops
|
||||||
T(n): 569315980.00 cycles
|
T(n): 108936380.00 cycles
|
||||||
P(n): 1.28 flops/cycle
|
P(n): 1.34 flops/cycle
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
=== N_P=200 N_ITER=200 ===
|
||||||
W(n) per iteration: 2898000.00 flops
|
W(n) per iteration: 2894800.00 flops
|
||||||
Q(n) per iteration: 25712 bytes
|
Q(n) per iteration: 25712 bytes
|
||||||
I(n): 112.71 flops/byte
|
I(n): 112.59 flops/byte
|
||||||
W(n): 2898000000.00 flops
|
W(n): 578960000.00 flops
|
||||||
T(n): 2268145640.00 cycles
|
T(n): 435221200.00 cycles
|
||||||
P(n): 1.28 flops/cycle
|
P(n): 1.33 flops/cycle
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
=== N_P=500 N_ITER=200 ===
|
||||||
W(n) per iteration: 18045000.00 flops
|
W(n) per iteration: 18037000.00 flops
|
||||||
Q(n) per iteration: 64112 bytes
|
Q(n) per iteration: 64112 bytes
|
||||||
I(n): 281.46 flops/byte
|
I(n): 281.34 flops/byte
|
||||||
W(n): 18045000000.00 flops
|
W(n): 3607400000.00 flops
|
||||||
T(n): 15227306960.00 cycles
|
T(n): 2891372800.00 cycles
|
||||||
P(n): 1.19 flops/cycle
|
P(n): 1.25 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=1000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 72074000.00 flops
|
||||||
|
Q(n) per iteration: 128112 bytes
|
||||||
|
I(n): 562.59 flops/byte
|
||||||
|
W(n): 14414800000.00 flops
|
||||||
|
T(n): 11754846460.00 cycles
|
||||||
|
P(n): 1.23 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=2000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 288148000.00 flops
|
||||||
|
Q(n) per iteration: 256112 bytes
|
||||||
|
I(n): 1125.09 flops/byte
|
||||||
|
W(n): 57629600000.00 flops
|
||||||
|
T(n): 47925865680.00 cycles
|
||||||
|
P(n): 1.20 flops/cycle
|
||||||
|
|
||||||
|
=== N_P=5000 N_ITER=200 ===
|
||||||
|
W(n) per iteration: 1800370000.00 flops
|
||||||
|
Q(n) per iteration: 640112 bytes
|
||||||
|
I(n): 2812.59 flops/byte
|
||||||
|
W(n): 360074000000.00 flops
|
||||||
|
T(n): 306184750700.00 cycles
|
||||||
|
P(n): 1.18 flops/cycle
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_lut_exp.cpp -o main_lut_exp
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 141259480.00 cycles
|
|
||||||
P(n): 1.31 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 570826340.00 cycles
|
|
||||||
P(n): 1.28 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2281692040.00 cycles
|
|
||||||
P(n): 1.27 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15242958120.00 cycles
|
|
||||||
P(n): 1.18 flops/cycle
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
rm -f main_* sizes run_tests *.o *.s
|
|
||||||
/usr/bin/g++ -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 main.cpp ./variants/variant_lut_exp.cpp -o main_lut_exp
|
|
||||||
=== N_P=50 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 184500.00 flops
|
|
||||||
Q(n) per iteration: 6512 bytes
|
|
||||||
I(n): 28.33 flops/byte
|
|
||||||
W(n): 184500000.00 flops
|
|
||||||
T(n): 140807980.00 cycles
|
|
||||||
P(n): 1.31 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=100 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 729000.00 flops
|
|
||||||
Q(n) per iteration: 12912 bytes
|
|
||||||
I(n): 56.46 flops/byte
|
|
||||||
W(n): 729000000.00 flops
|
|
||||||
T(n): 563063780.00 cycles
|
|
||||||
P(n): 1.29 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=200 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 2898000.00 flops
|
|
||||||
Q(n) per iteration: 25712 bytes
|
|
||||||
I(n): 112.71 flops/byte
|
|
||||||
W(n): 2898000000.00 flops
|
|
||||||
T(n): 2268612980.00 cycles
|
|
||||||
P(n): 1.28 flops/cycle
|
|
||||||
|
|
||||||
=== N_P=500 N_ITER=1000 ===
|
|
||||||
W(n) per iteration: 18045000.00 flops
|
|
||||||
Q(n) per iteration: 64112 bytes
|
|
||||||
I(n): 281.46 flops/byte
|
|
||||||
W(n): 18045000000.00 flops
|
|
||||||
T(n): 15237244940.00 cycles
|
|
||||||
P(n): 1.18 flops/cycle
|
|
||||||
+5
-2
@@ -17,7 +17,11 @@ echo "Detected architecture: $ARCH"
|
|||||||
|
|
||||||
echo "Starting benchmark suite (3 runs per variant)..."
|
echo "Starting benchmark suite (3 runs per variant)..."
|
||||||
|
|
||||||
for variant_file in variants/variant_*.cpp; do
|
for run in 1 2 3; do
|
||||||
|
for variant_file in variants/variant_*.cpp; do
|
||||||
|
|
||||||
|
bash scripts/disable-frequency-scaling.sh
|
||||||
|
|
||||||
filename=$(basename "$variant_file")
|
filename=$(basename "$variant_file")
|
||||||
|
|
||||||
base_name="${filename#variant_}"
|
base_name="${filename#variant_}"
|
||||||
@@ -29,7 +33,6 @@ for variant_file in variants/variant_*.cpp; do
|
|||||||
|
|
||||||
echo "--- Processing ${filename} (Base: ${base_name}) ---"
|
echo "--- Processing ${filename} (Base: ${base_name}) ---"
|
||||||
|
|
||||||
for run in 1 2 3; do
|
|
||||||
log_file="${log_dir}/${run}.log"
|
log_file="${log_dir}/${run}.log"
|
||||||
|
|
||||||
if [ -f "$log_file" ]; then
|
if [ -f "$log_file" ]; then
|
||||||
|
|||||||
@@ -1,244 +0,0 @@
|
|||||||
// # This file performs inlining for run_simulation.
|
|
||||||
// # Changes: Inlined w, acceleration_term_dt, pedestrian_repulsion_dt, and obstacle_repulsion_dt
|
|
||||||
// # Predecessor: variant_baseline.cpp
|
|
||||||
|
|
||||||
#include "../headers/board.hpp"
|
|
||||||
#include "../headers/constants.hpp"
|
|
||||||
#include "../headers/pedestrian.hpp"
|
|
||||||
#include "../headers/vector2d.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <math.h>
|
|
||||||
#include <random>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define SEED 42
|
|
||||||
#define BOARD_WIDTH 10.0
|
|
||||||
#define BOARD_LENGTH 50.0
|
|
||||||
#define WALL_EPS 1e-3
|
|
||||||
#define BOARD_WIDTH_MINUS_WALL_EPS 9.999
|
|
||||||
|
|
||||||
#ifndef RANDOM_SEED
|
|
||||||
#define RANDOM_SEED 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BENCHMARK
|
|
||||||
#define BENCHMARK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
Pedestrian *init_pedestrians(int n_p) {
|
|
||||||
#if RANDOM_SEED
|
|
||||||
random_device rd;
|
|
||||||
mt19937 gen(rd());
|
|
||||||
#else
|
|
||||||
mt19937 gen(SEED);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
normal_distribution<double> velocity_gen(v0_mean, v0_std_dev);
|
|
||||||
uniform_real_distribution<double> y_gen(0.3, BOARD_WIDTH - 0.3);
|
|
||||||
uniform_real_distribution<double> x_gen_left(2.0, BOARD_LENGTH / 2.0);
|
|
||||||
uniform_real_distribution<double> x_gen_right(BOARD_LENGTH / 2.0, BOARD_LENGTH - 2.0);
|
|
||||||
|
|
||||||
Pedestrian *P = new Pedestrian[n_p];
|
|
||||||
|
|
||||||
int n_p_half = n_p / 2;
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p_half; i++) {
|
|
||||||
double x = x_gen_left(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(BOARD_LENGTH + 30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = init_e.norm();
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(WHITE, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = n_p_half; i < n_p; i++) {
|
|
||||||
double x = x_gen_right(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(-30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = init_e.norm();
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(BLACK, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
return P;
|
|
||||||
}
|
|
||||||
|
|
||||||
Board init_board_without_obstacles() { return Board(BOARD_LENGTH, BOARD_WIDTH, 0, nullptr); }
|
|
||||||
|
|
||||||
int run_simulation(Pedestrian *pedestrians, Board &board, int n_p, int n_iter, const char *dump_path) {
|
|
||||||
|
|
||||||
#if BENCHMARK
|
|
||||||
(void)dump_path;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
const int dump_interval = 1;
|
|
||||||
|
|
||||||
vector<tuple<int, int, double, double, double, double, int>> samples;
|
|
||||||
|
|
||||||
if (dump_path) {
|
|
||||||
samples.reserve(static_cast<size_t>(n_iter / dump_interval + 1) * n_p);
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
samples.emplace_back(0, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int t = 0; t < n_iter; t++) {
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
Vector2d desired_velocity = p.e * p.desired_v0;
|
|
||||||
Vector2d actual_velocity = p.curr_vel;
|
|
||||||
Vector2d f_alpha_0_dt = (desired_velocity - actual_velocity) * dt_times_tau_alpha_inv;
|
|
||||||
Vector2d f_alpha_dt = f_alpha_0_dt;
|
|
||||||
|
|
||||||
for (int j = 0; j < n_p; j++) {
|
|
||||||
if (i == j)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Vector2d r_ab = p.curr_pos - pedestrians[j].curr_pos;
|
|
||||||
double r_ab_norm = r_ab.norm();
|
|
||||||
r_ab_norm = r_ab_norm > EPS ? r_ab_norm : EPS;
|
|
||||||
Vector2d s_b_e = pedestrians[j].s_b_e;
|
|
||||||
Vector2d r_ab2 = r_ab - s_b_e;
|
|
||||||
double r_ab2_norm = r_ab2.norm();
|
|
||||||
r_ab2_norm = r_ab2_norm > EPS ? r_ab2_norm : EPS;
|
|
||||||
double r_ab_norm_sum = r_ab_norm + r_ab2_norm;
|
|
||||||
double two_b_sq = r_ab_norm_sum * r_ab_norm_sum - pedestrians[j].s_b_sq;
|
|
||||||
two_b_sq = two_b_sq > EPS_SQ ? two_b_sq : EPS_SQ;
|
|
||||||
double two_b = sqrt(two_b_sq);
|
|
||||||
double scalar_mult_common = (r_ab_norm_sum / (two_b * r_ab_norm * r_ab2_norm)) * (NEG_V0_AB_div_TWO_SIGMA * exp(two_b * NEG_TWO_SIGMA_INV));
|
|
||||||
double scalar_mult_r_ab = scalar_mult_common * r_ab2_norm;
|
|
||||||
double scalar_mult_r_ab2 = scalar_mult_common * r_ab_norm;
|
|
||||||
Vector2d f_alpha_beta_neg = r_ab * scalar_mult_r_ab + r_ab2 * scalar_mult_r_ab2;
|
|
||||||
double w_val;
|
|
||||||
if (p.e.dot(f_alpha_beta_neg) >= f_alpha_beta_neg.norm() * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
Vector2d f_alpha_beta_dt = f_alpha_beta_neg * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt += f_alpha_beta_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < board.n_obstacles; k++) {
|
|
||||||
|
|
||||||
Vector2d r_aB = p.curr_pos - board.obstacles[k].find_nearest_obstacle_point(p.curr_pos);
|
|
||||||
double r_aB_norm = r_aB.norm();
|
|
||||||
r_aB_norm = r_aB_norm > EPS ? r_aB_norm : EPS;
|
|
||||||
double scalar_mult = (NEG_U0_AB_div_R * exp(r_aB_norm * NEG_R_INV)) / r_aB_norm;
|
|
||||||
Vector2d f_alpha_B_neg = r_aB * scalar_mult;
|
|
||||||
double w_val;
|
|
||||||
if (p.e.dot(f_alpha_B_neg) >= f_alpha_B_neg.norm() * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
Vector2d f_alpha_B_dt = f_alpha_B_neg * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt += f_alpha_B_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.w += f_alpha_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double w_norm = p.w.norm();
|
|
||||||
|
|
||||||
double w_norm2 = w_norm > EPS ? w_norm : EPS;
|
|
||||||
|
|
||||||
double correction_factor = std::min(1.0, p.v_max / w_norm2);
|
|
||||||
|
|
||||||
p.curr_vel = p.w * correction_factor;
|
|
||||||
|
|
||||||
p.curr_pos = p.curr_pos + p.curr_vel * dt;
|
|
||||||
|
|
||||||
if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) {
|
|
||||||
p.curr_pos.x = 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w = Vector2d(p.desired_v0, 0.0);
|
|
||||||
p.curr_vel = p.w;
|
|
||||||
}
|
|
||||||
if (p.color == BLACK && p.curr_pos.x < 1.5) {
|
|
||||||
p.curr_pos.x = BOARD_LENGTH - 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w = Vector2d(-p.desired_v0, 0.0);
|
|
||||||
p.curr_vel = p.w;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.curr_pos.y = clamp(p.curr_pos.y, WALL_EPS, BOARD_WIDTH_MINUS_WALL_EPS);
|
|
||||||
|
|
||||||
Vector2d e = p.destination - p.curr_pos;
|
|
||||||
|
|
||||||
double e_norm = e.norm();
|
|
||||||
double e_norm2 = e_norm > EPS ? e_norm : EPS;
|
|
||||||
double e_norm_inv = 1.0 / e_norm2;
|
|
||||||
|
|
||||||
p.e = e * e_norm_inv;
|
|
||||||
|
|
||||||
double velocity_norm_sq = p.curr_vel.dot(p.curr_vel);
|
|
||||||
|
|
||||||
double velocity_norm = std::sqrt(velocity_norm_sq);
|
|
||||||
|
|
||||||
p.s_b_sq = velocity_norm_sq * delta_t_sq;
|
|
||||||
|
|
||||||
p.s_b_e = p.e * (velocity_norm * delta_t);
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path && (t % dump_interval == 0)) {
|
|
||||||
samples.emplace_back(t + 1, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path) {
|
|
||||||
ofstream out(dump_path);
|
|
||||||
out << "time,id,x,y,p.e.x,p.e.y,color\n";
|
|
||||||
|
|
||||||
for (auto &[t, id, x, y, e_x, e_y, c] : samples) {
|
|
||||||
out << t << ',' << id << ',' << x << ',' << y << ',' << e_x << ',' << e_y << ',' << c << '\n';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,243 +0,0 @@
|
|||||||
// # This file performs inlining for run_simulation.
|
|
||||||
// # Changes: Inlined norm() and dot()
|
|
||||||
// # Predecessor: variant_inlining_1.cpp
|
|
||||||
|
|
||||||
#include "../headers/board.hpp"
|
|
||||||
#include "../headers/constants.hpp"
|
|
||||||
#include "../headers/pedestrian.hpp"
|
|
||||||
#include "../headers/vector2d.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <math.h>
|
|
||||||
#include <random>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define SEED 42
|
|
||||||
#define BOARD_WIDTH 10.0
|
|
||||||
#define BOARD_LENGTH 50.0
|
|
||||||
#define WALL_EPS 1e-3
|
|
||||||
#define BOARD_WIDTH_MINUS_WALL_EPS 9.999
|
|
||||||
|
|
||||||
#ifndef RANDOM_SEED
|
|
||||||
#define RANDOM_SEED 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BENCHMARK
|
|
||||||
#define BENCHMARK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
Pedestrian *init_pedestrians(int n_p) {
|
|
||||||
#if RANDOM_SEED
|
|
||||||
random_device rd;
|
|
||||||
mt19937 gen(rd());
|
|
||||||
#else
|
|
||||||
mt19937 gen(SEED);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
normal_distribution<double> velocity_gen(v0_mean, v0_std_dev);
|
|
||||||
uniform_real_distribution<double> y_gen(0.3, BOARD_WIDTH - 0.3);
|
|
||||||
uniform_real_distribution<double> x_gen_left(2.0, BOARD_LENGTH / 2.0);
|
|
||||||
uniform_real_distribution<double> x_gen_right(BOARD_LENGTH / 2.0, BOARD_LENGTH - 2.0);
|
|
||||||
|
|
||||||
Pedestrian *P = new Pedestrian[n_p];
|
|
||||||
|
|
||||||
int n_p_half = n_p / 2;
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p_half; i++) {
|
|
||||||
double x = x_gen_left(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(BOARD_LENGTH + 30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(WHITE, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = n_p_half; i < n_p; i++) {
|
|
||||||
double x = x_gen_right(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(-30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(BLACK, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
return P;
|
|
||||||
}
|
|
||||||
|
|
||||||
Board init_board_without_obstacles() { return Board(BOARD_LENGTH, BOARD_WIDTH, 0, nullptr); }
|
|
||||||
|
|
||||||
int run_simulation(Pedestrian *pedestrians, Board &board, int n_p, int n_iter, const char *dump_path) {
|
|
||||||
|
|
||||||
#if BENCHMARK
|
|
||||||
(void)dump_path;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
const int dump_interval = 1;
|
|
||||||
|
|
||||||
vector<tuple<int, int, double, double, double, double, int>> samples;
|
|
||||||
|
|
||||||
if (dump_path) {
|
|
||||||
samples.reserve(static_cast<size_t>(n_iter / dump_interval + 1) * n_p);
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
samples.emplace_back(0, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int t = 0; t < n_iter; t++) {
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
Vector2d desired_velocity = p.e * p.desired_v0;
|
|
||||||
Vector2d actual_velocity = p.curr_vel;
|
|
||||||
Vector2d f_alpha_0_dt = (desired_velocity - actual_velocity) * dt_times_tau_alpha_inv;
|
|
||||||
Vector2d f_alpha_dt = f_alpha_0_dt;
|
|
||||||
|
|
||||||
for (int j = 0; j < n_p; j++) {
|
|
||||||
if (i == j)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Vector2d r_ab = p.curr_pos - pedestrians[j].curr_pos;
|
|
||||||
double r_ab_norm = sqrt(r_ab.x * r_ab.x + r_ab.y * r_ab.y);
|
|
||||||
r_ab_norm = r_ab_norm > EPS ? r_ab_norm : EPS;
|
|
||||||
Vector2d s_b_e = pedestrians[j].s_b_e;
|
|
||||||
Vector2d r_ab2 = r_ab - s_b_e;
|
|
||||||
double r_ab2_norm = sqrt(r_ab2.x * r_ab2.x + r_ab2.y * r_ab2.y);
|
|
||||||
r_ab2_norm = r_ab2_norm > EPS ? r_ab2_norm : EPS;
|
|
||||||
double r_ab_norm_sum = r_ab_norm + r_ab2_norm;
|
|
||||||
double two_b_sq = r_ab_norm_sum * r_ab_norm_sum - pedestrians[j].s_b_sq;
|
|
||||||
two_b_sq = two_b_sq > EPS_SQ ? two_b_sq : EPS_SQ;
|
|
||||||
double two_b = sqrt(two_b_sq);
|
|
||||||
double scalar_mult_common = (r_ab_norm_sum / (two_b * r_ab_norm * r_ab2_norm)) * (NEG_V0_AB_div_TWO_SIGMA * exp(two_b * NEG_TWO_SIGMA_INV));
|
|
||||||
double scalar_mult_r_ab = scalar_mult_common * r_ab2_norm;
|
|
||||||
double scalar_mult_r_ab2 = scalar_mult_common * r_ab_norm;
|
|
||||||
Vector2d f_alpha_beta_neg = r_ab * scalar_mult_r_ab + r_ab2 * scalar_mult_r_ab2;
|
|
||||||
double w_val;
|
|
||||||
if ((p.e.x * f_alpha_beta_neg.x + p.e.y * f_alpha_beta_neg.y) >= sqrt(f_alpha_beta_neg.x * f_alpha_beta_neg.x + f_alpha_beta_neg.y * f_alpha_beta_neg.y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
Vector2d f_alpha_beta_dt = f_alpha_beta_neg * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt += f_alpha_beta_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < board.n_obstacles; k++) {
|
|
||||||
|
|
||||||
Vector2d r_aB = p.curr_pos - board.obstacles[k].find_nearest_obstacle_point(p.curr_pos);
|
|
||||||
double r_aB_norm = sqrt(r_aB.x * r_aB.x + r_aB.y * r_aB.y);
|
|
||||||
r_aB_norm = r_aB_norm > EPS ? r_aB_norm : EPS;
|
|
||||||
double scalar_mult = (NEG_U0_AB_div_R * exp(r_aB_norm * NEG_R_INV)) / r_aB_norm;
|
|
||||||
Vector2d f_alpha_B_neg = r_aB * scalar_mult;
|
|
||||||
double w_val;
|
|
||||||
if ((p.e.x * f_alpha_B_neg.x + p.e.y * f_alpha_B_neg.y) >= sqrt(f_alpha_B_neg.x * f_alpha_B_neg.x + f_alpha_B_neg.y * f_alpha_B_neg.y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
Vector2d f_alpha_B_dt = f_alpha_B_neg * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt += f_alpha_B_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.w += f_alpha_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double w_norm = sqrt(p.w.x * p.w.x + p.w.y * p.w.y);
|
|
||||||
|
|
||||||
double w_norm2 = w_norm > EPS ? w_norm : EPS;
|
|
||||||
|
|
||||||
double correction_factor = min(1.0, p.v_max / w_norm2);
|
|
||||||
|
|
||||||
p.curr_vel = p.w * correction_factor;
|
|
||||||
|
|
||||||
p.curr_pos = p.curr_pos + p.curr_vel * dt;
|
|
||||||
|
|
||||||
if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) {
|
|
||||||
p.curr_pos.x = 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w = Vector2d(p.desired_v0, 0.0);
|
|
||||||
p.curr_vel = p.w;
|
|
||||||
}
|
|
||||||
if (p.color == BLACK && p.curr_pos.x < 1.5) {
|
|
||||||
p.curr_pos.x = BOARD_LENGTH - 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w = Vector2d(-p.desired_v0, 0.0);
|
|
||||||
p.curr_vel = p.w;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.curr_pos.y = clamp(p.curr_pos.y, WALL_EPS, BOARD_WIDTH_MINUS_WALL_EPS);
|
|
||||||
|
|
||||||
Vector2d e = p.destination - p.curr_pos;
|
|
||||||
|
|
||||||
double e_norm = sqrt(e.x * e.x + e.y * e.y);
|
|
||||||
double e_norm2 = e_norm > EPS ? e_norm : EPS;
|
|
||||||
double e_norm_inv = 1.0 / e_norm2;
|
|
||||||
|
|
||||||
p.e = e * e_norm_inv;
|
|
||||||
|
|
||||||
double velocity_norm_sq = p.curr_vel.x * p.curr_vel.x + p.curr_vel.y * p.curr_vel.y;
|
|
||||||
|
|
||||||
double velocity_norm = sqrt(velocity_norm_sq);
|
|
||||||
|
|
||||||
p.s_b_sq = velocity_norm_sq * delta_t_sq;
|
|
||||||
|
|
||||||
p.s_b_e = p.e * (velocity_norm * delta_t);
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path && (t % dump_interval == 0)) {
|
|
||||||
samples.emplace_back(t + 1, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path) {
|
|
||||||
ofstream out(dump_path);
|
|
||||||
out << "time,id,x,y,p.e.x,p.e.y,color\n";
|
|
||||||
|
|
||||||
for (auto &[t, id, x, y, e_x, e_y, c] : samples) {
|
|
||||||
out << t << ',' << id << ',' << x << ',' << y << ',' << e_x << ',' << e_y << ',' << c << '\n';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,255 +0,0 @@
|
|||||||
// # This file performs in-lining for run_simulation.
|
|
||||||
// # Changes: Inlined find_nearest_obstacle_point()
|
|
||||||
// # Predecessor: variant_inlining_2.cpp
|
|
||||||
|
|
||||||
#include "../headers/board.hpp"
|
|
||||||
#include "../headers/constants.hpp"
|
|
||||||
#include "../headers/pedestrian.hpp"
|
|
||||||
#include "../headers/vector2d.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <math.h>
|
|
||||||
#include <random>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define SEED 42
|
|
||||||
#define BOARD_WIDTH 10.0
|
|
||||||
#define BOARD_LENGTH 50.0
|
|
||||||
#define WALL_EPS 1e-3
|
|
||||||
#define BOARD_WIDTH_MINUS_WALL_EPS 9.999
|
|
||||||
|
|
||||||
#ifndef RANDOM_SEED
|
|
||||||
#define RANDOM_SEED 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BENCHMARK
|
|
||||||
#define BENCHMARK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
Pedestrian *init_pedestrians(int n_p) {
|
|
||||||
#if RANDOM_SEED
|
|
||||||
random_device rd;
|
|
||||||
mt19937 gen(rd());
|
|
||||||
#else
|
|
||||||
mt19937 gen(SEED);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
normal_distribution<double> velocity_gen(v0_mean, v0_std_dev);
|
|
||||||
uniform_real_distribution<double> y_gen(0.3, BOARD_WIDTH - 0.3);
|
|
||||||
uniform_real_distribution<double> x_gen_left(2.0, BOARD_LENGTH / 2.0);
|
|
||||||
uniform_real_distribution<double> x_gen_right(BOARD_LENGTH / 2.0, BOARD_LENGTH - 2.0);
|
|
||||||
|
|
||||||
Pedestrian *P = new Pedestrian[n_p];
|
|
||||||
|
|
||||||
int n_p_half = n_p / 2;
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p_half; i++) {
|
|
||||||
double x = x_gen_left(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(BOARD_LENGTH + 30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(WHITE, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = n_p_half; i < n_p; i++) {
|
|
||||||
double x = x_gen_right(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(-30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(BLACK, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
return P;
|
|
||||||
}
|
|
||||||
|
|
||||||
Board init_board_without_obstacles() { return Board(BOARD_LENGTH, BOARD_WIDTH, 0, nullptr); }
|
|
||||||
|
|
||||||
int run_simulation(Pedestrian *pedestrians, Board &board, int n_p, int n_iter, const char *dump_path) {
|
|
||||||
|
|
||||||
#if BENCHMARK
|
|
||||||
(void)dump_path;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
const int dump_interval = 1;
|
|
||||||
|
|
||||||
vector<tuple<int, int, double, double, double, double, int>> samples;
|
|
||||||
|
|
||||||
if (dump_path) {
|
|
||||||
samples.reserve(static_cast<size_t>(n_iter / dump_interval + 1) * n_p);
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
samples.emplace_back(0, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int t = 0; t < n_iter; t++) {
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
Vector2d desired_velocity = p.e * p.desired_v0;
|
|
||||||
Vector2d actual_velocity = p.curr_vel;
|
|
||||||
Vector2d f_alpha_0_dt = (desired_velocity - actual_velocity) * dt_times_tau_alpha_inv;
|
|
||||||
Vector2d f_alpha_dt = f_alpha_0_dt;
|
|
||||||
|
|
||||||
for (int j = 0; j < n_p; j++) {
|
|
||||||
if (i == j)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Vector2d r_ab = p.curr_pos - pedestrians[j].curr_pos;
|
|
||||||
|
|
||||||
double r_ab_norm = sqrt(r_ab.x * r_ab.x + r_ab.y * r_ab.y);
|
|
||||||
r_ab_norm = r_ab_norm > EPS ? r_ab_norm : EPS;
|
|
||||||
Vector2d s_b_e = pedestrians[j].s_b_e;
|
|
||||||
Vector2d r_ab2 = r_ab - s_b_e;
|
|
||||||
double r_ab2_norm = sqrt(r_ab2.x * r_ab2.x + r_ab2.y * r_ab2.y);
|
|
||||||
r_ab2_norm = r_ab2_norm > EPS ? r_ab2_norm : EPS;
|
|
||||||
double r_ab_norm_sum = r_ab_norm + r_ab2_norm;
|
|
||||||
double two_b_sq = r_ab_norm_sum * r_ab_norm_sum - pedestrians[j].s_b_sq;
|
|
||||||
two_b_sq = two_b_sq > EPS_SQ ? two_b_sq : EPS_SQ;
|
|
||||||
double two_b = sqrt(two_b_sq);
|
|
||||||
double scalar_mult_common = (r_ab_norm_sum / (two_b * r_ab_norm * r_ab2_norm)) * (NEG_V0_AB_div_TWO_SIGMA * exp(two_b * NEG_TWO_SIGMA_INV));
|
|
||||||
double scalar_mult_r_ab = scalar_mult_common * r_ab2_norm;
|
|
||||||
double scalar_mult_r_ab2 = scalar_mult_common * r_ab_norm;
|
|
||||||
Vector2d f_alpha_beta_neg = r_ab * scalar_mult_r_ab + r_ab2 * scalar_mult_r_ab2;
|
|
||||||
double w_val;
|
|
||||||
if ((p.e.x * f_alpha_beta_neg.x + p.e.y * f_alpha_beta_neg.y) >= sqrt(f_alpha_beta_neg.x * f_alpha_beta_neg.x + f_alpha_beta_neg.y * f_alpha_beta_neg.y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
Vector2d f_alpha_beta_dt = f_alpha_beta_neg * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt += f_alpha_beta_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < board.n_obstacles; k++) {
|
|
||||||
|
|
||||||
Vector2d v1 = p.curr_pos - board.obstacles[k].start;
|
|
||||||
Vector2d v2 = board.obstacles[k].obstacle_v;
|
|
||||||
|
|
||||||
double projection = (v1.x * v2.x + v1.y * v2.y) * board.obstacles[k].length_sq_inv;
|
|
||||||
|
|
||||||
if (projection < 0.0)
|
|
||||||
projection = 0.0;
|
|
||||||
else if (projection > 1.0)
|
|
||||||
projection = 1.0;
|
|
||||||
|
|
||||||
Vector2d r_aB = p.curr_pos - (board.obstacles[k].start + board.obstacles[k].obstacle_v * projection);
|
|
||||||
|
|
||||||
double r_aB_norm = sqrt(r_aB.x * r_aB.x + r_aB.y * r_aB.y);
|
|
||||||
r_aB_norm = r_aB_norm > EPS ? r_aB_norm : EPS;
|
|
||||||
double scalar_mult = (NEG_U0_AB_div_R * exp(r_aB_norm * NEG_R_INV)) / r_aB_norm;
|
|
||||||
Vector2d f_alpha_B_neg = r_aB * scalar_mult;
|
|
||||||
double w_val;
|
|
||||||
if ((p.e.x * f_alpha_B_neg.x + p.e.y * f_alpha_B_neg.y) >= sqrt(f_alpha_B_neg.x * f_alpha_B_neg.x + f_alpha_B_neg.y * f_alpha_B_neg.y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
Vector2d f_alpha_B_dt = f_alpha_B_neg * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt += f_alpha_B_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.w += f_alpha_dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double w_norm = sqrt(p.w.x * p.w.x + p.w.y * p.w.y);
|
|
||||||
|
|
||||||
double w_norm2 = w_norm > EPS ? w_norm : EPS;
|
|
||||||
|
|
||||||
double correction_factor = min(1.0, p.v_max / w_norm2);
|
|
||||||
|
|
||||||
p.curr_vel = p.w * correction_factor;
|
|
||||||
|
|
||||||
p.curr_pos = p.curr_pos + p.curr_vel * dt;
|
|
||||||
|
|
||||||
if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) {
|
|
||||||
p.curr_pos.x = 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w = Vector2d(p.desired_v0, 0.0);
|
|
||||||
p.curr_vel = p.w;
|
|
||||||
}
|
|
||||||
if (p.color == BLACK && p.curr_pos.x < 1.5) {
|
|
||||||
p.curr_pos.x = BOARD_LENGTH - 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w = Vector2d(-p.desired_v0, 0.0);
|
|
||||||
p.curr_vel = p.w;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.curr_pos.y = clamp(p.curr_pos.y, WALL_EPS, BOARD_WIDTH_MINUS_WALL_EPS);
|
|
||||||
|
|
||||||
Vector2d e = p.destination - p.curr_pos;
|
|
||||||
|
|
||||||
double e_norm = sqrt(e.x * e.x + e.y * e.y);
|
|
||||||
double e_norm2 = e_norm > EPS ? e_norm : EPS;
|
|
||||||
double e_norm_inv = 1.0 / e_norm2;
|
|
||||||
|
|
||||||
p.e = e * e_norm_inv;
|
|
||||||
|
|
||||||
double velocity_norm_sq = p.curr_vel.x * p.curr_vel.x + p.curr_vel.y * p.curr_vel.y;
|
|
||||||
|
|
||||||
double velocity_norm = sqrt(velocity_norm_sq);
|
|
||||||
|
|
||||||
p.s_b_sq = velocity_norm_sq * delta_t_sq;
|
|
||||||
|
|
||||||
p.s_b_e = p.e * (velocity_norm * delta_t);
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path && (t % dump_interval == 0)) {
|
|
||||||
samples.emplace_back(t + 1, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path) {
|
|
||||||
ofstream out(dump_path);
|
|
||||||
out << "time,id,x,y,p.e.x,p.e.y,color\n";
|
|
||||||
|
|
||||||
for (auto &[t, id, x, y, e_x, e_y, c] : samples) {
|
|
||||||
out << t << ',' << id << ',' << x << ',' << y << ',' << e_x << ',' << e_y << ',' << c << '\n';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,282 +0,0 @@
|
|||||||
// # This file performs in-lining for run_simulation.
|
|
||||||
// # Changes: Replace as many Vector2d declarations with doubles as possible
|
|
||||||
// # Predecessor: variant_inlining_3.cpp
|
|
||||||
|
|
||||||
#include "../headers/board.hpp"
|
|
||||||
#include "../headers/constants.hpp"
|
|
||||||
#include "../headers/pedestrian.hpp"
|
|
||||||
#include "../headers/vector2d.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <math.h>
|
|
||||||
#include <random>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define SEED 42
|
|
||||||
#define BOARD_WIDTH 10.0
|
|
||||||
#define BOARD_LENGTH 50.0
|
|
||||||
#define WALL_EPS 1e-3
|
|
||||||
#define BOARD_WIDTH_MINUS_WALL_EPS 9.999
|
|
||||||
|
|
||||||
#ifndef RANDOM_SEED
|
|
||||||
#define RANDOM_SEED 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BENCHMARK
|
|
||||||
#define BENCHMARK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
Pedestrian *init_pedestrians(int n_p) {
|
|
||||||
#if RANDOM_SEED
|
|
||||||
random_device rd;
|
|
||||||
mt19937 gen(rd());
|
|
||||||
#else
|
|
||||||
mt19937 gen(SEED);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
normal_distribution<double> velocity_gen(v0_mean, v0_std_dev);
|
|
||||||
uniform_real_distribution<double> y_gen(0.3, BOARD_WIDTH - 0.3);
|
|
||||||
uniform_real_distribution<double> x_gen_left(2.0, BOARD_LENGTH / 2.0);
|
|
||||||
uniform_real_distribution<double> x_gen_right(BOARD_LENGTH / 2.0, BOARD_LENGTH - 2.0);
|
|
||||||
|
|
||||||
Pedestrian *P = new Pedestrian[n_p];
|
|
||||||
|
|
||||||
int n_p_half = n_p / 2;
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p_half; i++) {
|
|
||||||
double x = x_gen_left(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(BOARD_LENGTH + 30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(WHITE, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = n_p_half; i < n_p; i++) {
|
|
||||||
double x = x_gen_right(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(-30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(BLACK, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
return P;
|
|
||||||
}
|
|
||||||
|
|
||||||
Board init_board_without_obstacles() { return Board(BOARD_LENGTH, BOARD_WIDTH, 0, nullptr); }
|
|
||||||
|
|
||||||
int run_simulation(Pedestrian *pedestrians, Board &board, int n_p, int n_iter, const char *dump_path) {
|
|
||||||
|
|
||||||
#if BENCHMARK
|
|
||||||
(void)dump_path;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
const int dump_interval = 1;
|
|
||||||
|
|
||||||
vector<tuple<int, int, double, double, double, double, int>> samples;
|
|
||||||
|
|
||||||
if (dump_path) {
|
|
||||||
samples.reserve(static_cast<size_t>(n_iter / dump_interval + 1) * n_p);
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
samples.emplace_back(0, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int t = 0; t < n_iter; t++) {
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double desired_velocity_x = p.e.x * p.desired_v0;
|
|
||||||
double desired_velocity_y = p.e.y * p.desired_v0;
|
|
||||||
|
|
||||||
double f_alpha_dt_x = (desired_velocity_x - p.curr_vel.x) * dt_times_tau_alpha_inv;
|
|
||||||
double f_alpha_dt_y = (desired_velocity_y - p.curr_vel.y) * dt_times_tau_alpha_inv;
|
|
||||||
|
|
||||||
for (int j = 0; j < n_p; j++) {
|
|
||||||
if (i == j)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
double r_ab_x = p.curr_pos.x - pedestrians[j].curr_pos.x;
|
|
||||||
double r_ab_y = p.curr_pos.y - pedestrians[j].curr_pos.y;
|
|
||||||
|
|
||||||
double r_ab_norm = sqrt(r_ab_x * r_ab_x + r_ab_y * r_ab_y);
|
|
||||||
r_ab_norm = r_ab_norm > EPS ? r_ab_norm : EPS;
|
|
||||||
|
|
||||||
double r_ab2_x = r_ab_x - pedestrians[j].s_b_e.x;
|
|
||||||
double r_ab2_y = r_ab_y - pedestrians[j].s_b_e.y;
|
|
||||||
|
|
||||||
double r_ab2_norm = sqrt(r_ab2_x * r_ab2_x + r_ab2_y * r_ab2_y);
|
|
||||||
r_ab2_norm = r_ab2_norm > EPS ? r_ab2_norm : EPS;
|
|
||||||
double r_ab_norm_sum = r_ab_norm + r_ab2_norm;
|
|
||||||
double two_b_sq = r_ab_norm_sum * r_ab_norm_sum - pedestrians[j].s_b_sq;
|
|
||||||
two_b_sq = two_b_sq > EPS_SQ ? two_b_sq : EPS_SQ;
|
|
||||||
double two_b = sqrt(two_b_sq);
|
|
||||||
double scalar_mult_common = (r_ab_norm_sum / (two_b * r_ab_norm * r_ab2_norm)) * (NEG_V0_AB_div_TWO_SIGMA * exp(two_b * NEG_TWO_SIGMA_INV));
|
|
||||||
double scalar_mult_r_ab = scalar_mult_common * r_ab2_norm;
|
|
||||||
double scalar_mult_r_ab2 = scalar_mult_common * r_ab_norm;
|
|
||||||
|
|
||||||
double f_alpha_beta_neg_x = r_ab_x * scalar_mult_r_ab + r_ab2_x * scalar_mult_r_ab2;
|
|
||||||
double f_alpha_beta_neg_y = r_ab_y * scalar_mult_r_ab + r_ab2_y * scalar_mult_r_ab2;
|
|
||||||
|
|
||||||
// TODO: Get rid of sqrt
|
|
||||||
double w_val;
|
|
||||||
double a = p.e.x * f_alpha_beta_neg_x + p.e.y * f_alpha_beta_neg_y;
|
|
||||||
double b = sqrt(f_alpha_beta_neg_x * f_alpha_beta_neg_x + f_alpha_beta_neg_y * f_alpha_beta_neg_y) * cos_phi;
|
|
||||||
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
if (a >= b)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
f_alpha_dt_x = f_alpha_dt_x + f_alpha_beta_neg_x * w_val;
|
|
||||||
f_alpha_dt_y = f_alpha_dt_y + f_alpha_beta_neg_y * w_val;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < board.n_obstacles; k++) {
|
|
||||||
|
|
||||||
double v1_x = p.curr_pos.x - board.obstacles[k].start.x;
|
|
||||||
double v1_y = p.curr_pos.y - board.obstacles[k].start.y;
|
|
||||||
|
|
||||||
double projection = (v1_x * board.obstacles[k].obstacle_v.x + v1_y * board.obstacles[k].obstacle_v.y) * board.obstacles[k].length_sq_inv;
|
|
||||||
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
if (projection < 0.0)
|
|
||||||
projection = 0.0;
|
|
||||||
else if (projection > 1.0)
|
|
||||||
projection = 1.0;
|
|
||||||
|
|
||||||
double r_aB_x = p.curr_pos.x - (board.obstacles[k].start.x + board.obstacles[k].obstacle_v.x * projection);
|
|
||||||
double r_aB_y = p.curr_pos.y - (board.obstacles[k].start.y + board.obstacles[k].obstacle_v.y * projection);
|
|
||||||
|
|
||||||
double r_aB_norm = sqrt(r_aB_x * r_aB_x + r_aB_y * r_aB_y);
|
|
||||||
r_aB_norm = r_aB_norm > EPS ? r_aB_norm : EPS;
|
|
||||||
double scalar_mult = (NEG_U0_AB_div_R * exp(r_aB_norm * NEG_R_INV)) / r_aB_norm;
|
|
||||||
double f_alpha_B_neg_x = r_aB_x * scalar_mult;
|
|
||||||
double f_alpha_B_neg_y = r_aB_y * scalar_mult;
|
|
||||||
|
|
||||||
// TODO: Get rid of sqrt
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
double w_val;
|
|
||||||
if ((p.e.x * f_alpha_B_neg_x + p.e.y * f_alpha_B_neg_y) >= sqrt(f_alpha_B_neg_x * f_alpha_B_neg_x + f_alpha_B_neg_y * f_alpha_B_neg_y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
double f_alpha_B_dt_x = f_alpha_B_neg_x * w_val;
|
|
||||||
double f_alpha_B_dt_y = f_alpha_B_neg_y * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt_x += f_alpha_B_dt_x;
|
|
||||||
f_alpha_dt_y += f_alpha_B_dt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.w.x += f_alpha_dt_x;
|
|
||||||
p.w.y += f_alpha_dt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double w_norm = sqrt(p.w.x * p.w.x + p.w.y * p.w.y);
|
|
||||||
|
|
||||||
double w_norm2 = w_norm > EPS ? w_norm : EPS;
|
|
||||||
|
|
||||||
double correction_factor = min(1.0, p.v_max / w_norm2);
|
|
||||||
|
|
||||||
p.curr_vel = p.w * correction_factor;
|
|
||||||
|
|
||||||
p.curr_pos = p.curr_pos + p.curr_vel * dt;
|
|
||||||
|
|
||||||
if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) {
|
|
||||||
p.curr_pos.x = 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w.x = p.desired_v0;
|
|
||||||
p.w.y = 0.0;
|
|
||||||
p.curr_vel.x = p.w.x;
|
|
||||||
p.curr_vel.y = p.w.y;
|
|
||||||
}
|
|
||||||
if (p.color == BLACK && p.curr_pos.x < 1.5) {
|
|
||||||
p.curr_pos.x = BOARD_LENGTH - 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w.x = -p.desired_v0;
|
|
||||||
p.w.y = 0.0;
|
|
||||||
p.curr_vel.x = p.w.x;
|
|
||||||
p.curr_vel.y = p.w.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.curr_pos.y = clamp(p.curr_pos.y, WALL_EPS, BOARD_WIDTH_MINUS_WALL_EPS);
|
|
||||||
|
|
||||||
double e_x = p.destination.x - p.curr_pos.x;
|
|
||||||
double e_y = p.destination.y - p.curr_pos.y;
|
|
||||||
|
|
||||||
double e_norm = sqrt(e_x * e_x + e_y * e_y);
|
|
||||||
double e_norm2 = e_norm > EPS ? e_norm : EPS;
|
|
||||||
double e_norm_inv = 1.0 / e_norm2;
|
|
||||||
|
|
||||||
p.e.x = e_x * e_norm_inv;
|
|
||||||
p.e.y = e_y * e_norm_inv;
|
|
||||||
|
|
||||||
double velocity_norm_sq = p.curr_vel.x * p.curr_vel.x + p.curr_vel.y * p.curr_vel.y;
|
|
||||||
|
|
||||||
double velocity_norm = sqrt(velocity_norm_sq);
|
|
||||||
|
|
||||||
p.s_b_sq = velocity_norm_sq * delta_t_sq;
|
|
||||||
|
|
||||||
p.s_b_e = p.e * (velocity_norm * delta_t);
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path && (t % dump_interval == 0)) {
|
|
||||||
samples.emplace_back(t + 1, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path) {
|
|
||||||
ofstream out(dump_path);
|
|
||||||
out << "time,id,x,y,p.e.x,p.e.y,color\n";
|
|
||||||
|
|
||||||
for (auto &[t, id, x, y, e_x, e_y, c] : samples) {
|
|
||||||
out << t << ',' << id << ',' << x << ',' << y << ',' << e_x << ',' << e_y << ',' << c << '\n';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,275 +0,0 @@
|
|||||||
// # This file performs in-lining for run_simulation.
|
|
||||||
// # Changes: Got rid of EPS checks
|
|
||||||
// # Predecessor: variant_inlining_4.cpp
|
|
||||||
|
|
||||||
#include "../headers/board.hpp"
|
|
||||||
#include "../headers/constants.hpp"
|
|
||||||
#include "../headers/pedestrian.hpp"
|
|
||||||
#include "../headers/vector2d.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <math.h>
|
|
||||||
#include <random>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define SEED 42
|
|
||||||
#define BOARD_WIDTH 10.0
|
|
||||||
#define BOARD_LENGTH 50.0
|
|
||||||
#define WALL_EPS 1e-3
|
|
||||||
#define BOARD_WIDTH_MINUS_WALL_EPS 9.999
|
|
||||||
|
|
||||||
#ifndef RANDOM_SEED
|
|
||||||
#define RANDOM_SEED 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BENCHMARK
|
|
||||||
#define BENCHMARK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
Pedestrian *init_pedestrians(int n_p) {
|
|
||||||
#if RANDOM_SEED
|
|
||||||
random_device rd;
|
|
||||||
mt19937 gen(rd());
|
|
||||||
#else
|
|
||||||
mt19937 gen(SEED);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
normal_distribution<double> velocity_gen(v0_mean, v0_std_dev);
|
|
||||||
uniform_real_distribution<double> y_gen(0.3, BOARD_WIDTH - 0.3);
|
|
||||||
uniform_real_distribution<double> x_gen_left(2.0, BOARD_LENGTH / 2.0);
|
|
||||||
uniform_real_distribution<double> x_gen_right(BOARD_LENGTH / 2.0, BOARD_LENGTH - 2.0);
|
|
||||||
|
|
||||||
Pedestrian *P = new Pedestrian[n_p];
|
|
||||||
|
|
||||||
int n_p_half = n_p / 2;
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p_half; i++) {
|
|
||||||
double x = x_gen_left(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(BOARD_LENGTH + 30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(WHITE, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = n_p_half; i < n_p; i++) {
|
|
||||||
double x = x_gen_right(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
Vector2d start_pos = Vector2d(x, y);
|
|
||||||
Vector2d destination = Vector2d(-30.0, y);
|
|
||||||
|
|
||||||
Vector2d init_e = destination - start_pos;
|
|
||||||
double init_e_norm = sqrt(init_e.x * init_e.x + init_e.y * init_e.y);
|
|
||||||
Vector2d init_e_unit = init_e / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(BLACK, Vector2d(), start_pos, init_e_unit, v_max, desired_v0, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
return P;
|
|
||||||
}
|
|
||||||
|
|
||||||
Board init_board_without_obstacles() { return Board(BOARD_LENGTH, BOARD_WIDTH, 0, nullptr); }
|
|
||||||
|
|
||||||
int run_simulation(Pedestrian *pedestrians, Board &board, int n_p, int n_iter, const char *dump_path) {
|
|
||||||
|
|
||||||
#if BENCHMARK
|
|
||||||
(void)dump_path;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
const int dump_interval = 1;
|
|
||||||
|
|
||||||
vector<tuple<int, int, double, double, double, double, int>> samples;
|
|
||||||
|
|
||||||
if (dump_path) {
|
|
||||||
samples.reserve(static_cast<size_t>(n_iter / dump_interval + 1) * n_p);
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
samples.emplace_back(0, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int t = 0; t < n_iter; t++) {
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double desired_velocity_x = p.e.x * p.desired_v0;
|
|
||||||
double desired_velocity_y = p.e.y * p.desired_v0;
|
|
||||||
|
|
||||||
double f_alpha_dt_x = (desired_velocity_x - p.curr_vel.x) * dt_times_tau_alpha_inv;
|
|
||||||
double f_alpha_dt_y = (desired_velocity_y - p.curr_vel.y) * dt_times_tau_alpha_inv;
|
|
||||||
|
|
||||||
for (int j = 0; j < n_p; j++) {
|
|
||||||
if (i == j)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
double r_ab_x = p.curr_pos.x - pedestrians[j].curr_pos.x;
|
|
||||||
double r_ab_y = p.curr_pos.y - pedestrians[j].curr_pos.y;
|
|
||||||
|
|
||||||
double r_ab_norm = sqrt(r_ab_x * r_ab_x + r_ab_y * r_ab_y);
|
|
||||||
|
|
||||||
double r_ab2_x = r_ab_x - pedestrians[j].s_b_e.x;
|
|
||||||
double r_ab2_y = r_ab_y - pedestrians[j].s_b_e.y;
|
|
||||||
|
|
||||||
double r_ab2_norm = sqrt(r_ab2_x * r_ab2_x + r_ab2_y * r_ab2_y);
|
|
||||||
double r_ab_norm_sum = r_ab_norm + r_ab2_norm;
|
|
||||||
double two_b_sq = r_ab_norm_sum * r_ab_norm_sum - pedestrians[j].s_b_sq;
|
|
||||||
double two_b = sqrt(two_b_sq);
|
|
||||||
double scalar_mult_common = (r_ab_norm_sum / (two_b * r_ab_norm * r_ab2_norm)) * (NEG_V0_AB_div_TWO_SIGMA * exp(two_b * NEG_TWO_SIGMA_INV));
|
|
||||||
double scalar_mult_r_ab = scalar_mult_common * r_ab2_norm;
|
|
||||||
double scalar_mult_r_ab2 = scalar_mult_common * r_ab_norm;
|
|
||||||
|
|
||||||
double f_alpha_beta_neg_x = r_ab_x * scalar_mult_r_ab + r_ab2_x * scalar_mult_r_ab2;
|
|
||||||
double f_alpha_beta_neg_y = r_ab_y * scalar_mult_r_ab + r_ab2_y * scalar_mult_r_ab2;
|
|
||||||
|
|
||||||
// TODO: Get rid of sqrt
|
|
||||||
double w_val;
|
|
||||||
double a = p.e.x * f_alpha_beta_neg_x + p.e.y * f_alpha_beta_neg_y;
|
|
||||||
double b = sqrt(f_alpha_beta_neg_x * f_alpha_beta_neg_x + f_alpha_beta_neg_y * f_alpha_beta_neg_y) * cos_phi;
|
|
||||||
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
if (a >= b)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
f_alpha_dt_x = f_alpha_dt_x + f_alpha_beta_neg_x * w_val;
|
|
||||||
f_alpha_dt_y = f_alpha_dt_y + f_alpha_beta_neg_y * w_val;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < board.n_obstacles; k++) {
|
|
||||||
|
|
||||||
double v1_x = p.curr_pos.x - board.obstacles[k].start.x;
|
|
||||||
double v1_y = p.curr_pos.y - board.obstacles[k].start.y;
|
|
||||||
|
|
||||||
double projection = (v1_x * board.obstacles[k].obstacle_v.x + v1_y * board.obstacles[k].obstacle_v.y) * board.obstacles[k].length_sq_inv;
|
|
||||||
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
if (projection < 0.0)
|
|
||||||
projection = 0.0;
|
|
||||||
else if (projection > 1.0)
|
|
||||||
projection = 1.0;
|
|
||||||
|
|
||||||
double r_aB_x = p.curr_pos.x - (board.obstacles[k].start.x + board.obstacles[k].obstacle_v.x * projection);
|
|
||||||
double r_aB_y = p.curr_pos.y - (board.obstacles[k].start.y + board.obstacles[k].obstacle_v.y * projection);
|
|
||||||
|
|
||||||
double r_aB_norm = sqrt(r_aB_x * r_aB_x + r_aB_y * r_aB_y);
|
|
||||||
double scalar_mult = (NEG_U0_AB_div_R * exp(r_aB_norm * NEG_R_INV)) / r_aB_norm;
|
|
||||||
double f_alpha_B_neg_x = r_aB_x * scalar_mult;
|
|
||||||
double f_alpha_B_neg_y = r_aB_y * scalar_mult;
|
|
||||||
|
|
||||||
// TODO: Get rid of sqrt
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
double w_val;
|
|
||||||
if ((p.e.x * f_alpha_B_neg_x + p.e.y * f_alpha_B_neg_y) >= sqrt(f_alpha_B_neg_x * f_alpha_B_neg_x + f_alpha_B_neg_y * f_alpha_B_neg_y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
double f_alpha_B_dt_x = f_alpha_B_neg_x * w_val;
|
|
||||||
double f_alpha_B_dt_y = f_alpha_B_neg_y * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt_x += f_alpha_B_dt_x;
|
|
||||||
f_alpha_dt_y += f_alpha_B_dt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.w.x += f_alpha_dt_x;
|
|
||||||
p.w.y += f_alpha_dt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double w_norm = sqrt(p.w.x * p.w.x + p.w.y * p.w.y);
|
|
||||||
|
|
||||||
double correction_factor = min(1.0, p.v_max / w_norm);
|
|
||||||
|
|
||||||
p.curr_vel = p.w * correction_factor;
|
|
||||||
|
|
||||||
p.curr_pos = p.curr_pos + p.curr_vel * dt;
|
|
||||||
|
|
||||||
if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) {
|
|
||||||
p.curr_pos.x = 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w.x = p.desired_v0;
|
|
||||||
p.w.y = 0.0;
|
|
||||||
p.curr_vel.x = p.w.x;
|
|
||||||
p.curr_vel.y = p.w.y;
|
|
||||||
}
|
|
||||||
if (p.color == BLACK && p.curr_pos.x < 1.5) {
|
|
||||||
p.curr_pos.x = BOARD_LENGTH - 1.0;
|
|
||||||
p.destination.y = p.curr_pos.y;
|
|
||||||
p.w.x = -p.desired_v0;
|
|
||||||
p.w.y = 0.0;
|
|
||||||
p.curr_vel.x = p.w.x;
|
|
||||||
p.curr_vel.y = p.w.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.curr_pos.y = clamp(p.curr_pos.y, WALL_EPS, BOARD_WIDTH_MINUS_WALL_EPS);
|
|
||||||
|
|
||||||
double e_x = p.destination.x - p.curr_pos.x;
|
|
||||||
double e_y = p.destination.y - p.curr_pos.y;
|
|
||||||
|
|
||||||
double e_norm = sqrt(e_x * e_x + e_y * e_y);
|
|
||||||
double e_norm_inv = 1.0 / e_norm;
|
|
||||||
|
|
||||||
p.e.x = e_x * e_norm_inv;
|
|
||||||
p.e.y = e_y * e_norm_inv;
|
|
||||||
|
|
||||||
double velocity_norm_sq = p.curr_vel.x * p.curr_vel.x + p.curr_vel.y * p.curr_vel.y;
|
|
||||||
|
|
||||||
double velocity_norm = sqrt(velocity_norm_sq);
|
|
||||||
|
|
||||||
p.s_b_sq = velocity_norm_sq * delta_t_sq;
|
|
||||||
|
|
||||||
p.s_b_e = p.e * (velocity_norm * delta_t);
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path && (t % dump_interval == 0)) {
|
|
||||||
samples.emplace_back(t + 1, i, p.curr_pos.x, p.curr_pos.y, p.e.x, p.e.y, p.color);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path) {
|
|
||||||
ofstream out(dump_path);
|
|
||||||
out << "time,id,x,y,p.e.x,p.e.y,color\n";
|
|
||||||
|
|
||||||
for (auto &[t, id, x, y, e_x, e_y, c] : samples) {
|
|
||||||
out << t << ',' << id << ',' << x << ',' << y << ',' << e_x << ',' << e_y << ',' << c << '\n';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,286 +0,0 @@
|
|||||||
// # This file performs in-lining for run_simulation.
|
|
||||||
// # Changes: Update Vector2d references to double references
|
|
||||||
// # Predecessor: variant_inlining_5.cpp
|
|
||||||
|
|
||||||
#include "../headers/board.hpp"
|
|
||||||
#include "../headers/constants.hpp"
|
|
||||||
#include "../headers/pedestrian_reduced.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <math.h>
|
|
||||||
#include <random>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define SEED 42
|
|
||||||
#define BOARD_WIDTH 10.0
|
|
||||||
#define BOARD_LENGTH 50.0
|
|
||||||
#define WALL_EPS 1e-3
|
|
||||||
#define BOARD_WIDTH_MINUS_WALL_EPS 9.999
|
|
||||||
|
|
||||||
#ifndef RANDOM_SEED
|
|
||||||
#define RANDOM_SEED 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BENCHMARK
|
|
||||||
#define BENCHMARK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
Pedestrian *init_pedestrians(int n_p) {
|
|
||||||
#if RANDOM_SEED
|
|
||||||
random_device rd;
|
|
||||||
mt19937 gen(rd());
|
|
||||||
#else
|
|
||||||
mt19937 gen(SEED);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
normal_distribution<double> velocity_gen(v0_mean, v0_std_dev);
|
|
||||||
uniform_real_distribution<double> y_gen(0.3, BOARD_WIDTH - 0.3);
|
|
||||||
uniform_real_distribution<double> x_gen_left(2.0, BOARD_LENGTH / 2.0);
|
|
||||||
uniform_real_distribution<double> x_gen_right(BOARD_LENGTH / 2.0, BOARD_LENGTH - 2.0);
|
|
||||||
|
|
||||||
Pedestrian *P = new Pedestrian[n_p];
|
|
||||||
|
|
||||||
int n_p_half = n_p / 2;
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p_half; i++) {
|
|
||||||
double x = x_gen_left(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
double start_pos_x = x;
|
|
||||||
double start_pos_y = y;
|
|
||||||
|
|
||||||
double destination_x = BOARD_LENGTH + 30.0;
|
|
||||||
double destination_y = y;
|
|
||||||
|
|
||||||
double init_e_x = destination_x - start_pos_x;
|
|
||||||
double init_e_y = destination_y - start_pos_y;
|
|
||||||
double init_e_norm = sqrt(init_e_x * init_e_x + init_e_y * init_e_y);
|
|
||||||
double init_e_unit_x = init_e_x / init_e_norm;
|
|
||||||
double init_e_unit_y = init_e_y / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(0, 0, 0, start_pos_x, start_pos_y, init_e_unit_x, init_e_unit_y, v_max, desired_v0, destination_x, destination_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = n_p_half; i < n_p; i++) {
|
|
||||||
double x = x_gen_right(gen);
|
|
||||||
double y = y_gen(gen);
|
|
||||||
|
|
||||||
double start_pos_x = x;
|
|
||||||
double start_pos_y = y;
|
|
||||||
double destination_x = -30;
|
|
||||||
double destination_y = y;
|
|
||||||
|
|
||||||
double init_e_x = destination_x - start_pos_x;
|
|
||||||
double init_e_y = destination_y - start_pos_y;
|
|
||||||
double init_e_norm = sqrt(init_e_x * init_e_x + init_e_y * init_e_y);
|
|
||||||
double init_e_unit_x = init_e_x / init_e_norm;
|
|
||||||
double init_e_unit_y = init_e_y / init_e_norm;
|
|
||||||
|
|
||||||
double desired_v0;
|
|
||||||
do {
|
|
||||||
desired_v0 = velocity_gen(gen);
|
|
||||||
} while (desired_v0 <= 0.1);
|
|
||||||
|
|
||||||
double v_max = 1.3 * desired_v0;
|
|
||||||
|
|
||||||
P[i] = Pedestrian(1, 0, 0, start_pos_x, start_pos_y, init_e_unit_x, init_e_unit_y, v_max, desired_v0, destination_x, destination_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
return P;
|
|
||||||
}
|
|
||||||
|
|
||||||
Board init_board_without_obstacles() { return Board(BOARD_LENGTH, BOARD_WIDTH, 0, nullptr); }
|
|
||||||
|
|
||||||
int run_simulation(Pedestrian *pedestrians, Board &board, int n_p, int n_iter, const char *dump_path) {
|
|
||||||
|
|
||||||
#if BENCHMARK
|
|
||||||
(void)dump_path;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
const int dump_interval = 1;
|
|
||||||
|
|
||||||
vector<tuple<int, int, double, double, double, double, int>> samples;
|
|
||||||
|
|
||||||
if (dump_path) {
|
|
||||||
samples.reserve(static_cast<size_t>(n_iter / dump_interval + 1) * n_p);
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
samples.emplace_back(0, i, p.curr_pos_x, p.curr_pos_y, p.e_x, p.e_y, p.color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int t = 0; t < n_iter; t++) {
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double desired_velocity_x = p.e_x * p.desired_v0;
|
|
||||||
double desired_velocity_y = p.e_y * p.desired_v0;
|
|
||||||
|
|
||||||
double f_alpha_dt_x = (desired_velocity_x - p.curr_vel_x) * dt_times_tau_alpha_inv;
|
|
||||||
double f_alpha_dt_y = (desired_velocity_y - p.curr_vel_y) * dt_times_tau_alpha_inv;
|
|
||||||
|
|
||||||
for (int j = 0; j < n_p; j++) {
|
|
||||||
if (i == j)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
double r_ab_x = p.curr_pos_x - pedestrians[j].curr_pos_x;
|
|
||||||
double r_ab_y = p.curr_pos_y - pedestrians[j].curr_pos_y;
|
|
||||||
|
|
||||||
double r_ab_norm = sqrt(r_ab_x * r_ab_x + r_ab_y * r_ab_y);
|
|
||||||
|
|
||||||
double r_ab2_x = r_ab_x - pedestrians[j].s_b_e_x;
|
|
||||||
double r_ab2_y = r_ab_y - pedestrians[j].s_b_e_y;
|
|
||||||
|
|
||||||
double r_ab2_norm = sqrt(r_ab2_x * r_ab2_x + r_ab2_y * r_ab2_y);
|
|
||||||
double r_ab_norm_sum = r_ab_norm + r_ab2_norm;
|
|
||||||
double two_b_sq = r_ab_norm_sum * r_ab_norm_sum - pedestrians[j].s_b_sq;
|
|
||||||
double two_b = sqrt(two_b_sq);
|
|
||||||
double scalar_mult_common = (r_ab_norm_sum / (two_b * r_ab_norm * r_ab2_norm)) * (NEG_V0_AB_div_TWO_SIGMA * exp(two_b * NEG_TWO_SIGMA_INV));
|
|
||||||
double scalar_mult_r_ab = scalar_mult_common * r_ab2_norm;
|
|
||||||
double scalar_mult_r_ab2 = scalar_mult_common * r_ab_norm;
|
|
||||||
|
|
||||||
double f_alpha_beta_neg_x = r_ab_x * scalar_mult_r_ab + r_ab2_x * scalar_mult_r_ab2;
|
|
||||||
double f_alpha_beta_neg_y = r_ab_y * scalar_mult_r_ab + r_ab2_y * scalar_mult_r_ab2;
|
|
||||||
|
|
||||||
// TODO: Get rid of sqrt
|
|
||||||
double w_val;
|
|
||||||
double a = p.e_x * f_alpha_beta_neg_x + p.e_y * f_alpha_beta_neg_y;
|
|
||||||
double b = sqrt(f_alpha_beta_neg_x * f_alpha_beta_neg_x + f_alpha_beta_neg_y * f_alpha_beta_neg_y) * cos_phi;
|
|
||||||
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
if (a >= b)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
f_alpha_dt_x = f_alpha_dt_x + f_alpha_beta_neg_x * w_val;
|
|
||||||
f_alpha_dt_y = f_alpha_dt_y + f_alpha_beta_neg_y * w_val;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < board.n_obstacles; k++) {
|
|
||||||
|
|
||||||
double v1_x = p.curr_pos_x - board.obstacles[k].start.x;
|
|
||||||
double v1_y = p.curr_pos_y - board.obstacles[k].start.y;
|
|
||||||
|
|
||||||
double projection = (v1_x * board.obstacles[k].obstacle_v.x + v1_y * board.obstacles[k].obstacle_v.y) * board.obstacles[k].length_sq_inv;
|
|
||||||
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
if (projection < 0.0)
|
|
||||||
projection = 0.0;
|
|
||||||
else if (projection > 1.0)
|
|
||||||
projection = 1.0;
|
|
||||||
|
|
||||||
double r_aB_x = p.curr_pos_x - (board.obstacles[k].start.x + board.obstacles[k].obstacle_v.x * projection);
|
|
||||||
double r_aB_y = p.curr_pos_y - (board.obstacles[k].start.y + board.obstacles[k].obstacle_v.y * projection);
|
|
||||||
|
|
||||||
double r_aB_norm = sqrt(r_aB_x * r_aB_x + r_aB_y * r_aB_y);
|
|
||||||
double scalar_mult = (NEG_U0_AB_div_R * exp(r_aB_norm * NEG_R_INV)) / r_aB_norm;
|
|
||||||
double f_alpha_B_neg_x = r_aB_x * scalar_mult;
|
|
||||||
double f_alpha_B_neg_y = r_aB_y * scalar_mult;
|
|
||||||
|
|
||||||
// TODO: Get rid of sqrt
|
|
||||||
// TODO: Get rid of branching without impacting performance
|
|
||||||
double w_val;
|
|
||||||
if ((p.e_x * f_alpha_B_neg_x + p.e_y * f_alpha_B_neg_y) >= sqrt(f_alpha_B_neg_x * f_alpha_B_neg_x + f_alpha_B_neg_y * f_alpha_B_neg_y) * cos_phi)
|
|
||||||
w_val = dt_neg;
|
|
||||||
else
|
|
||||||
w_val = c_neg_times_dt;
|
|
||||||
|
|
||||||
double f_alpha_B_dt_x = f_alpha_B_neg_x * w_val;
|
|
||||||
double f_alpha_B_dt_y = f_alpha_B_neg_y * w_val;
|
|
||||||
|
|
||||||
f_alpha_dt_x += f_alpha_B_dt_x;
|
|
||||||
f_alpha_dt_y += f_alpha_B_dt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.w_x += f_alpha_dt_x;
|
|
||||||
p.w_y += f_alpha_dt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < n_p; i++) {
|
|
||||||
Pedestrian &p = pedestrians[i];
|
|
||||||
|
|
||||||
double w_norm = sqrt(p.w_x * p.w_x + p.w_y * p.w_y);
|
|
||||||
|
|
||||||
double correction_factor = min(1.0, p.v_max / w_norm);
|
|
||||||
|
|
||||||
p.curr_vel_x = p.w_x * correction_factor;
|
|
||||||
p.curr_vel_y = p.w_y * correction_factor;
|
|
||||||
|
|
||||||
p.curr_pos_x = p.curr_pos_x + p.curr_vel_x * dt;
|
|
||||||
p.curr_pos_y = p.curr_pos_y + p.curr_vel_y * dt;
|
|
||||||
|
|
||||||
if (p.color == 0 && p.curr_pos_x > (BOARD_LENGTH - 1.5)) {
|
|
||||||
p.curr_pos_x = 1.0;
|
|
||||||
p.destination_y = p.curr_pos_y;
|
|
||||||
p.w_x = p.desired_v0;
|
|
||||||
p.w_y = 0.0;
|
|
||||||
p.curr_vel_x = p.w_x;
|
|
||||||
p.curr_vel_y = p.w_y;
|
|
||||||
}
|
|
||||||
if (p.color == 1 && p.curr_pos_x < 1.5) {
|
|
||||||
p.curr_pos_x = BOARD_LENGTH - 1.0;
|
|
||||||
p.destination_y = p.curr_pos_y;
|
|
||||||
p.w_x = -p.desired_v0;
|
|
||||||
p.w_y = 0.0;
|
|
||||||
p.curr_vel_x = p.w_x;
|
|
||||||
p.curr_vel_y = p.w_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.curr_pos_y = clamp(p.curr_pos_y, WALL_EPS, BOARD_WIDTH_MINUS_WALL_EPS);
|
|
||||||
|
|
||||||
double e_x = p.destination_x - p.curr_pos_x;
|
|
||||||
double e_y = p.destination_y - p.curr_pos_y;
|
|
||||||
|
|
||||||
double e_norm = sqrt(e_x * e_x + e_y * e_y);
|
|
||||||
double e_norm_inv = 1.0 / e_norm;
|
|
||||||
|
|
||||||
p.e_x = e_x * e_norm_inv;
|
|
||||||
p.e_y = e_y * e_norm_inv;
|
|
||||||
|
|
||||||
double velocity_norm_sq = p.curr_vel_x * p.curr_vel_x + p.curr_vel_y * p.curr_vel_y;
|
|
||||||
|
|
||||||
double velocity_norm = sqrt(velocity_norm_sq);
|
|
||||||
|
|
||||||
p.s_b_sq = velocity_norm_sq * delta_t_sq;
|
|
||||||
|
|
||||||
p.s_b_e_x = p.e_x * (velocity_norm * delta_t);
|
|
||||||
p.s_b_e_y = p.e_y * (velocity_norm * delta_t);
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path && (t % dump_interval == 0)) {
|
|
||||||
samples.emplace_back(t + 1, i, p.curr_pos_x, p.curr_pos_y, p.e_x, p.e_y, p.color);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !BENCHMARK
|
|
||||||
if (dump_path) {
|
|
||||||
ofstream out(dump_path);
|
|
||||||
out << "time,id,x,y,p.e.x,p.e.y,color\n";
|
|
||||||
|
|
||||||
for (auto &[t, id, x, y, e_x, e_y, c] : samples) {
|
|
||||||
out << t << ',' << id << ',' << x << ',' << y << ',' << e_x << ',' << e_y << ',' << c << '\n';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user