Add anatomy example to index page#182
Conversation
People new to SYCL might want to see a simple SYCL program so that they can then investigate the APIs further in the rest of this reference page, so I've included the anatomy example from the SYCL 2020 spec on the main page
source/index.rst
Outdated
| [source,,linenums] | ||
| ---- | ||
| include::anatomy.cpp[lines=4..-1] | ||
| ---- |
There was a problem hiding this comment.
This is Asciidoc syntax, which causes a build error because these docs are using reStructuredText (rst). I don't know this documentation tool well, but you can see an example of how to add a code snippet in "source/iface/device-selector.rst":
.. literalinclude:: /examples/gpu-selector.cpp
:lines: 5-
:linenos:
I think you want something like that.
There was a problem hiding this comment.
Thanks @gmlueck - I'm struggling to get local builds working on my machine. Do you know if there is a straight forward way to get all the plugins installed locally?
There was a problem hiding this comment.
It was a while ago, but I think I just installed Python 3 and then:
$ pip install -r requirements.txt
There was a problem hiding this comment.
Then to do a build:
$ make html
The output is in "build/html"
| A basic SYCL program, taken from the SYCL 2020 specification, looks like this: | ||
|
|
||
| .. literalinclude:: /examples/anatomy.cpp | ||
| :lines: 5- |
There was a problem hiding this comment.
| :lines: 5- | |
| :lines: 4- |
I think you want this, unless you are intentionally omitting the #include <iostream>
People new to SYCL might want to see a simple SYCL program so that they can then investigate the APIs further in the rest of this reference page, so I've included the anatomy example from the SYCL 2020 spec on the main page