2023-10-04 11:13:31 +01:00
|
|
|
4 de Outubro 2023 - #CP
|
|
|
|
|
|
|
|
## Ex. 2
|
2023-10-04 11:23:31 +01:00
|
|
|
#### a) Limitações vetoriais
|
|
|
|
A -> consecutive elements in a row -> consecutive access in the vector
|
|
|
|
C -> same element
|
|
|
|
B -> consecutive elements in a collumn
|
|
|
|
|
|
|
|
Não vai ser vetorizável.
|
|
|
|
|
|
|
|
|
|
|
|
#### b)
|
2023-10-04 11:33:31 +01:00
|
|
|
result of change cycles to i, k , j :
|
2023-10-04 11:43:31 +01:00
|
|
|
A -> same element
|
2023-10-04 11:33:31 +01:00
|
|
|
C -> consecutive elements in a row -> consecutive access in the vector
|
|
|
|
B -> consecutive elements in a row -> consecutive access in the vector
|
|
|
|
|
|
|
|
i k j
|
|
|
|
0 0 1
|
|
|
|
|
2023-10-04 11:43:31 +01:00
|
|
|
Vai ser vetorizável.
|
|
|
|
|
|
|
|
128b
|
|
|
|
8B -> 64b
|
|
|
|
2 elements
|
|
|
|
|
2023-10-04 11:53:31 +01:00
|
|
|
![[Pasted image 20231004115135.png]]
|
|
|
|
|
|
|
|
| N | Version | Time | CPI | \#I | L1_DMiss | Miss/#I |
|
|
|
|
| --- | ------- | ---- | --- | --- | -------- | ------- |
|
|
|
|
| 512 | base() | | | | | |
|
|
|
|
| 51 | | | | | | |
|