Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion content/8-portable-kernel-models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -922,13 +922,15 @@ Exercise

.. literalinclude:: examples/portable-kernel-models/alpaka-exercise-vectorAdd-cmake.txt
:language: cmake
:caption: CMakeLists.txt
:emphasize-lines: 12,19


Below we have the main alpaka code doing a vector addition on device using a high level transform function

.. literalinclude:: examples/portable-kernel-models/alpaka-exercise-vectorAdd.cpp
:language: c++
:caption: main.cpp
:emphasize-lines: 35

To set up our project, we create a folder and place our CMakeLists.txt and main.cpp in there.
Expand All @@ -938,7 +940,7 @@ Exercise
$ mkdir alpakaExercise && cd alpakaExercise
$ vim CMakeLists.txt
and now paste the CMakeLsits here (Press i, followed by Ctrl+Shift+V)
Press esc and then :q to exit vim
Press esc and then :wq to exit vim
$ vim main.cpp
Similarly, paste the C++ code here

Expand Down