diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 6e08f88..b05e65f 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -161,11 +161,12 @@ "active": "98e0287d38212615", "lastOpenFiles": [ "Pasted image 20231004115209.png", + "Images/Pasted image 20231004115725.png", + "4a1s/CP/PL - Aula 4.md", "Images", "Images/Pasted image 20231004115135.png", "4a1s/CP/PL - Aula 3.md", "4a1s/CP/PL - Aula 2.md", - "4a1s/CP/PL - Aula 4.md", "4a1s/RAS/Projeto.md", "4a1s/RAS/T - Aula 3.md", "4a1s/index.md", diff --git a/4a1s/CP/PL - Aula 4.md b/4a1s/CP/PL - Aula 4.md index bbff0c1..c3b7703 100644 --- a/4a1s/CP/PL - Aula 4.md +++ b/4a1s/CP/PL - Aula 4.md @@ -24,9 +24,22 @@ Vai ser vetorizável. 8B -> 64b 2 elements +Without vectorization: +![[Pasted image 20231004115725.png]] + +With vectorization: ![[Pasted image 20231004115135.png]] -| N | Version | Time | CPI | \#I | L1_DMiss | Miss/#I | -| --- | ------- | ---- | --- | --- | -------- | ------- | -| 512 | base() | | | | | | -| 51 | | | | | | | \ No newline at end of file +#### c) + +| N | Version | Time | CPI | \#I | +| --- | -------- | ---- | --- | --- | +| 512 | base_v()| 0.492484818 | 0.91 | 1113554887 | +| 512 | vect() | 0.081604350 | 2.88 | 578275097 | + +>[!note]- Commands run +>module load gcc/9.3.0 +>gcc -O2 -ftree-vectorize -msse4 mmult.c +>srun --partition=cpar perf stat -e cycles,instructions ./a.out + + diff --git a/Images/Pasted image 20231004115725.png b/Images/Pasted image 20231004115725.png new file mode 100644 index 0000000..bd4477a Binary files /dev/null and b/Images/Pasted image 20231004115725.png differ