Skip to content

Commit e9b3cef

Browse files
committed
improve display
1 parent 6950a62 commit e9b3cef

File tree

5 files changed

+46
-46
lines changed

5 files changed

+46
-46
lines changed

docs/modules/kokkos/pages/coding/MCQ_002.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ function checkAnswer(questionName, rightAnswer, resultId) {
8888
8989
<div id="question8">
9090
<p>8. How do you access the elements of a Kokkos View ?</p>
91-
<input type="radio" name="q8" value="a"> With brackets [ ]<br>
92-
<input type="radio" name="q8" value="b"> With parentheses ( )<br>
93-
<input type="radio" name="q8" value="c"> With the .at() method<br>
94-
<input type="radio" name="q8" value="d"> With the .get() method<br>
91+
<input type="radio" name="q8" value="a"> With brackets <code>[ ]</code><br>
92+
<input type="radio" name="q8" value="b"> With parentheses <code>( )</code<br>
93+
<input type="radio" name="q8" value="c"> With the <code>.at()</code> method<br>>
94+
<input type="radio" name="q8" value="d"> With the <code>.get()</code> method<br>
9595
<button onclick="checkAnswer('q8', 'b', 'result8')">Submit</button>
9696
<p id="result8"></p>
9797
</div>
98-
++++
98+
++++

docs/modules/kokkos/pages/coding/MCQ_003.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ function checkAnswer(questionName, rightAnswer, resultId) {
2828
2929
<div id="question2">
3030
<p>2. What Kokkos function is used to create a mirror ?</p>
31-
<input type="radio" name="q2" value="a"> Kokkos::create_mirror()<br>
32-
<input type="radio" name="q2" value="b"> Kokkos::create_mirror_view()<br>
33-
<input type="radio" name="q2" value="c"> Kokkos::make_mirror()<br>
31+
<input type="radio" name="q2" value="a"> <code>Kokkos::create_mirror()</code><br>
32+
<input type="radio" name="q2" value="b"> <code>Kokkos::create_mirror_view()</code><br>
33+
<input type="radio" name="q2" value="c"> <code>Kokkos::make_mirror()</code><br>
3434
<input type="radio" name="q2" value="d"> Answers a and b are correct<br>
3535
<button onclick="checkAnswer('q2', 'd', 'result2')">Submit</button>
3636
<p id="result2"></p>
@@ -47,11 +47,11 @@ function checkAnswer(questionName, rightAnswer, resultId) {
4747
</div>
4848
4949
<div id="question4">
50-
<p>4. What is the difference between create_mirror() and create_mirror_view() ?</p>
51-
<input type="radio" name="q4" value="a"> create_mirror() always allocates memory, create_mirror_view() only if needed<br>
52-
<input type="radio" name="q4" value="b"> create_mirror() only works on GPU, create_mirror_view() only on CPU<br>
50+
<p>4. What is the difference between <code>create_mirror()</code> and <code>create_mirror_view()</code> ?</p>
51+
<input type="radio" name="q4" value="a"> <code>create_mirror()</code> always allocates memory, <code>create_mirror_view()</code> only if needed<br>
52+
<input type="radio" name="q4" value="b"> <code>create_mirror()</code> only works on GPU, <code>create_mirror_view()</code> only on CPU<br>
5353
<input type="radio" name="q4" value="c"> There is no difference<br>
54-
<input type="radio" name="q4" value="d"> create_mirror() copies data, create_mirror_view() does not<br>
54+
<input type="radio" name="q4" value="d"> <code>create_mirror()</code> copies data, <code>create_mirror_view()</code> does not<br>
5555
<button onclick="checkAnswer('q4', 'a', 'result4')">Submit</button>
5656
<p id="result4"></p>
5757
</div>
@@ -68,10 +68,10 @@ function checkAnswer(questionName, rightAnswer, resultId) {
6868
6969
<div id="question6">
7070
<p>6. What function is used to copy data between a view and its mirror ?</p>
71-
<input type="radio" name="q6" value="a"> Kokkos::copy()<br>
72-
<input type="radio" name="q6" value="b"> Kokkos::deep_copy()<br>
73-
<input type="radio" name="q6" value="c"> Kokkos::mirror_copy()<br>
74-
<input type="radio" name="q6" value="d"> Kokkos::transfer()<br>
71+
<input type="radio" name="q6" value="a"> <code>Kokkos::copy()</code><br>
72+
<input type="radio" name="q6" value="b"> <code>Kokkos::deep_copy()</code><br>
73+
<input type="radio" name="q6" value="c"> <code>Kokkos::mirror_copy()</code><br>
74+
<input type="radio" name="q6" value="d"> <code>Kokkos::transfer()</code><br>
7575
<button onclick="checkAnswer('q6', 'b', 'result6')">Submit</button>
7676
<p id="result6"></p>
7777
</div>

docs/modules/kokkos/pages/coding/MCQ_004.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,50 +38,50 @@ function checkAnswer(questionName, rightAnswer, resultId) {
3838
3939
<div id="question3">
4040
<p>3. What is the default Execution Space called in Kokkos?</p>
41-
<input type="radio" name="q3" value="a"> Kokkos::DefaultExecutionSpace<br>
42-
<input type="radio" name="q3" value="b"> Kokkos::MainExecutionSpace<br>
43-
<input type="radio" name="q3" value="c"> Kokkos::PrimaryExecutionSpace<br>
44-
<input type="radio" name="q3" value="d"> Kokkos::BaseExecutionSpace<br>
41+
<input type="radio" name="q3" value="a"> <code>Kokkos::DefaultExecutionSpace</code><br>
42+
<input type="radio" name="q3" value="b"> <code>Kokkos::MainExecutionSpace</code><br>
43+
<input type="radio" name="q3" value="c"> <code>Kokkos::PrimaryExecutionSpace</code><br>
44+
<input type="radio" name="q3" value="d"> <code>Kokkos::BaseExecutionSpace</code><br>
4545
<button onclick="checkAnswer('q3', 'a', 'result3')">Submit</button>
4646
<p id="result3"></p>
4747
</div>
4848
4949
<div id="question4">
5050
<p>4. What method is used to synchronize an Execution Space?</p>
51-
<input type="radio" name="q4" value="a"> sync()<br>
52-
<input type="radio" name="q4" value="b"> wait()<br>
53-
<input type="radio" name="q4" value="c"> fence()<br>
54-
<input type="radio" name="q4" value="d"> barrier()<br>
51+
<input type="radio" name="q4" value="a"> <code>sync()</code><br>
52+
<input type="radio" name="q4" value="b"> <code>wait()</code><br>
53+
<input type="radio" name="q4" value="c"> <code>fence()</code><br>
54+
<input type="radio" name="q4" value="d"> <code>barrier()</code><br>
5555
<button onclick="checkAnswer('q4', 'c', 'result4')">Submit</button>
5656
<p id="result4"></p>
5757
</div>
5858
5959
<div id="question5">
6060
<p>5. What macro is used to make a function compatible with different Execution Spaces?</p>
61-
<input type="radio" name="q5" value="a"> KOKKOS_FUNCTION<br>
62-
<input type="radio" name="q5" value="b"> KOKKOS_INLINE_FUNCTION<br>
63-
<input type="radio" name="q5" value="c"> KOKKOS_EXEC_FUNCTION<br>
64-
<input type="radio" name="q5" value="d"> KOKKOS_PORTABLE_FUNCTION<br>
61+
<input type="radio" name="q5" value="a"> <code>KOKKOS_FUNCTION</code><br>
62+
<input type="radio" name="q5" value="b"> <code>KOKKOS_INLINE_FUNCTION</code><br>
63+
<input type="radio" name="q5" value="c"> <code>KOKKOS_EXEC_FUNCTION</code><br>
64+
<input type="radio" name="q5" value="d"> <code>KOKKOS_PORTABLE_FUNCTION</code><br>
6565
<button onclick="checkAnswer('q5', 'b', 'result5')">Submit</button>
6666
<p id="result5"></p>
6767
</div>
6868
6969
<div id="question6">
7070
<p>6. Which Execution Space is always set, regardless of the backend used?</p>
71-
<input type="radio" name="q6" value="a"> Kokkos::Cuda<br>
72-
<input type="radio" name="q6" value="b"> Kokkos::OpenMP<br>
73-
<input type="radio" name="q6" value="c"> Kokkos::Serial<br>
74-
<input type="radio" name="q6" value="d"> Kokkos::Threads<br>
71+
<input type="radio" name="q6" value="a"> <code>Kokkos::Cuda</code><br>
72+
<input type="radio" name="q6" value="b"> <code>Kokkos::OpenMP</code><br>
73+
<input type="radio" name="q6" value="c"> <code>Kokkos::Serial</code><br>
74+
<input type="radio" name="q6" value="d"> <code>Kokkos::Threads</code><br>
7575
<button onclick="checkAnswer('q6', 'c', 'result6')">Submit</button>
7676
<p id="result6"></p>
7777
</div>
7878
7979
<div id="question7">
8080
<p>7. How do you specify the Execution Space in an execution policy?</p>
81-
<input type="radio" name="q7" value="a"> Kokkos::RangePolicy<ExecutionSpace>(...)<br>
82-
<input type="radio" name="q7" value="b"> Kokkos::Policy<ExecutionSpace>(...)<br>
83-
<input type="radio" name="q7" value="c"> Kokkos::ExecPolicy<ExecutionSpace>(...)<br>
84-
<input type="radio" name="q7" value="d"> Kokkos::ParallelPolicy<ExecutionSpace>(...)<br>
81+
<input type="radio" name="q7" value="a"> <code>Kokkos::RangePolicy<ExecutionSpace>(...)</code><br>
82+
<input type="radio" name="q7" value="b"> <code>Kokkos::Policy<ExecutionSpace>(...)</code><br>
83+
<input type="radio" name="q7" value="c"> <code>Kokkos::ExecPolicy<ExecutionSpace>(...)</code><br>
84+
<input type="radio" name="q7" value="d"> <code>Kokkos::ParallelPolicy<ExecutionSpace>(...)</code><br>
8585
<button onclick="checkAnswer('q7', 'a', 'result7')">Submit</button>
8686
<p id="result7"></p>
8787
</div>

docs/modules/kokkos/pages/coding/MCQ_005.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function checkAnswer(questionName, rightAnswer, resultId) {
2828
</div>
2929
3030
<div id="question2">
31-
<p>2. What operation does the Kokkos::BAnd reducer perform?</p>
31+
<p>2. What operation does the <code>Kokkos::BAnd</code> reducer perform?</p>
3232
<input type="radio" name="q2" value="a"> Binary addition<br>
3333
<input type="radio" name="q2" value="b"> Binary AND<br>
3434
<input type="radio" name="q2" value="c"> Binary OR<br>
@@ -39,10 +39,10 @@ function checkAnswer(questionName, rightAnswer, resultId) {
3939
4040
<div id="question3">
4141
<p>3. What reducer allows us to find both the minimum value and its index?</p>
42-
<input type="radio" name="q3" value="a"> Min<br>
43-
<input type="radio" name="q3" value="b"> MinLoc<br>
44-
<input type="radio" name="q3" value="c"> MinMax<br>
45-
<input type="radio" name="q3" value="d"> MinMaxLoc<br>
42+
<input type="radio" name="q3" value="a"> <code>Min</code><br>
43+
<input type="radio" name="q3" value="b"> <code>MinLoc</code><br>
44+
<input type="radio" name="q3" value="c"> <code>MinMax</code><br>
45+
<input type="radio" name="q3" value="d"> <code>MinMaxLoc</code><br>
4646
<button onclick="checkAnswer('q3', 'b', 'result3')">Submit</button>
4747
<p id="result3"></p>
4848
</div>
@@ -58,7 +58,7 @@ function checkAnswer(questionName, rightAnswer, resultId) {
5858
</div>
5959
6060
<div id="question5">
61-
<p>5. What does the Kokkos::MinMaxLoc reducer do?</p>
61+
<p>5. What does the <code>Kokkos::MinMaxLoc</code> reducer do?</p>
6262
<input type="radio" name="q5" value="a"> Find the minimum and maximum<br>
6363
<input type="radio" name="q5" value="b"> Find the minimum and maximum with their indices<br>
6464
<input type="radio" name="q5" value="c"> Find the minimum or maximum, whichever is closer<br>

docs/modules/kokkos/pages/coding/MCQ_006.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ function checkAnswer(questionName, rightAnswer, resultId) {
5858
5959
<div id="question5">
6060
<p>5. What method is used to synchronize threads within a team?</p>
61-
<input type="radio" name="q5" value="a"> team_sync()<br>
62-
<input type="radio" name="q5" value="b"> team_barrier()<br>
63-
<input type="radio" name="q5" value="c"> team_wait()<br>
64-
<input type="radio" name="q5" value="d"> team_fence()<br>
61+
<input type="radio" name="q5" value="a"> <code>team_sync()</code><br>
62+
<input type="radio" name="q5" value="b"> <code>team_barrier()</code><br>
63+
<input type="radio" name="q5" value="c"> <code>team_wait()</code><br>
64+
<input type="radio" name="q5" value="d"> <code>team_fence()</code><br>
6565
<button onclick="checkAnswer('q5', 'b', 'result5')">Submit</button>
6666
<p id="result5"></p>
6767
</div>

0 commit comments

Comments
 (0)