vault backup: 2023-10-18 12:09:55
This commit is contained in:
parent
e188b087ba
commit
bb2a7f80cf
5 changed files with 31 additions and 5 deletions
8
.obsidian/workspace.json
vendored
8
.obsidian/workspace.json
vendored
|
@ -186,6 +186,9 @@
|
|||
},
|
||||
"active": "cca189cd61cd7fe5",
|
||||
"lastOpenFiles": [
|
||||
"Pasted image 20231018120412.png",
|
||||
"Pasted image 20231018120219.png",
|
||||
"Pasted image 20231018120028.png",
|
||||
"Pasted image 20231018115329.png",
|
||||
"Pasted image 20231018115103.png",
|
||||
"Pasted image 20231018114101.png",
|
||||
|
@ -228,9 +231,6 @@
|
|||
"4a1s/ASCN/T.32118",
|
||||
"4a1s/ASCN/Images.md.32118",
|
||||
"script.sh",
|
||||
"quartz/static/og-image.png",
|
||||
"quartz/static/icon.png",
|
||||
"docs/images/quartz transform pipeline.png",
|
||||
"docs/images/quartz layout.png"
|
||||
"quartz/static/og-image.png"
|
||||
]
|
||||
}
|
|
@ -17,6 +17,8 @@ NOTE: These threads use a fork-join architecture, aka both threads work simultan
|
|||
### c)
|
||||
It is dependant on the CPU availability in each clock cycle. A thread, when executed uses
|
||||
|
||||
|
||||
* * *
|
||||
## Ex 2
|
||||
### 2.1 - \#pragma omp for
|
||||
![[Pasted image 20231018115329.png]]
|
||||
|
@ -26,6 +28,30 @@ Thread 0 -> ids 0-49
|
|||
Thread 1 -> ids 50-99
|
||||
#### b)
|
||||
Yes, since it is statically distributed.
|
||||
#### c)
|
||||
|
||||
### 2.2 - \#pragma omp master
|
||||
![[Pasted image 20231018120028.png]]
|
||||
#### a)
|
||||
There is a distribution of literally all the prints on the first thread created. There is a static distribution of instructions to the first thread created - the thread master.
|
||||
Thread 0 -> ids 0-99
|
||||
#### b)
|
||||
Yes, since it is statically distributed.
|
||||
|
||||
|
||||
### 2.3 - \#pragma omp single
|
||||
![[Pasted image 20231018120219.png]]
|
||||
|
||||
#### a)
|
||||
There is a distribution of literally all the prints on the first thread created. There is a static distribution of instructions to one of the threads randomly.
|
||||
Thread 0/1 -> ids 0-99
|
||||
#### b)
|
||||
Yes, since it is statically distributed.
|
||||
|
||||
#### c) \#pragma omp critical
|
||||
![[Pasted image 20231018120412.png]]
|
||||
|
||||
There is a restriction on the thread access to the printing - each thread is forced to complete the entirety of the task and it cannot end the printing until it is completed with its task.
|
||||
|
||||
|
||||
****
|
||||
### Ex 3
|
||||
|
|
BIN
Pasted image 20231018120028.png
Normal file
BIN
Pasted image 20231018120028.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
Pasted image 20231018120219.png
Normal file
BIN
Pasted image 20231018120219.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
Pasted image 20231018120412.png
Normal file
BIN
Pasted image 20231018120412.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
Loading…
Reference in a new issue