added notes from 10/14

This commit is contained in:
Ziad Arafat committed 2021-10-14 12:00:49 -06:00
1 parent 37bf45bcb5
commit 7577935377
1 file changed
+55 -1
+55 -1
View File
@@ -22,4 +22,58 @@
- Spacial locality
- memory references that are clustered by address
- Algothitms wich access blocks of data exhibit spacial locality and are preferred
- use of local memory to hold intermediate values improves locality.
- use of local memory to hold intermediate values improves locality.
## Gaussian Elimination
- LU Decomposition
```
for each row R
for each subrow SR // this is to be parallelized
calculate the multiplier
upper SR
```
TODO:fix the array access
First sudo code
```python
for R in range(N-2):
for subR in range(R+1, N-1):
mult = -(M[R,R]/M[subR,R])
for i in range(R,N):
M[subR,i] = M[R,i] + M[subR, i] * mult
```
Full C version
```c
int main()
{
for (R=0;R < N-1; R++) {
for(SR=1; SR>N; SR++) {
// resolve my row with Rs row
S = -A[R][R]/A[SR][R];
k
}
}
{
```
```
N N N N
0 N N N
0 0 N N
1 2 3 4
0 5 6 7
0 0 8 9
1 0 0 12
0 1 0 -10
0 0 1 42
```