Skip to content

Commit a6f1baa

Browse files
author
Diptorup Deb
committed
Merge master and add version support.
1 parent 9a66eee commit a6f1baa

File tree

5 files changed

+73
-8
lines changed

5 files changed

+73
-8
lines changed

docs/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ option(DPCTL_ENABLE_DOXYREST
77
OFF
88
)
99

10+
# Option to add verion links to the side bar. This option is primarily
11+
# intended to generate dpctl's docs for our github.io page.
12+
option(DPCTL_USE_MULTIVERSION_TEMPLATE
13+
"Enable adding verion links to side bar"
14+
OFF
15+
)
16+
1017
# This function defines everything needed to generate Doxygen docs
1118
function(_setup_doxygen)
1219
# We generate doxygen only for the public headers to keep the Doxyrest

docs/_templates/versions.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% if READTHEDOCS or display_lower_left %}
2+
{# Add rst-badge after rst-versions for small badge style. #}
3+
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
4+
<span class="rst-current-version" data-toggle="rst-current-version">
5+
<span class="fa fa-book"> Other versions</span>
6+
v: {{ current_version }}
7+
<span class="fa fa-caret-down"></span>
8+
</span>
9+
<div class="rst-other-versions">
10+
{% if versions|length >= 1 %}
11+
<dl>
12+
<dt>{{ _('Versions') }}</dt>
13+
{% for slug, url in versions %}
14+
{% if slug == current_version %} <strong> {% endif %}
15+
<dd><a href="{{ url }}">{{ slug }}</a></dd>
16+
{% if slug == current_version %} </strong> {% endif %}
17+
{% endfor %}
18+
</dl>
19+
{% endif %}
20+
</div>
21+
</div>
22+
{% endif %}

docs/conf.in

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,31 @@ html_theme_options = {
9999
# relative to this directory. They are copied after the builtin static files,
100100
# so a file named "default.css" will overwrite the builtin "default.css".
101101
# html_static_path = ['_static']
102+
103+
generate_multiversion = "@DPCTL_USE_MULTIVERSION_TEMPLATE@"
104+
105+
if generate_multiversion == "ON":
106+
try:
107+
html_context
108+
except NameError:
109+
html_context = dict()
110+
html_context["display_lower_left"] = True
111+
templates_path = ["_templates"]
112+
html_context["current_version"] = version
113+
html_context["version"] = version
114+
115+
# POPULATE LINKS TO OTHER VERSIONS
116+
html_context["versions"] = list()
117+
118+
# Populate the list of documented versions from the doc_versions.tx
119+
versions = []
120+
with open("doc_versions.txt", "r") as doc_versions:
121+
while True:
122+
version = doc_versions.readline().strip()
123+
if not version:
124+
break
125+
elif len(version):
126+
versions.append(version)
127+
128+
for version in versions:
129+
html_context["versions"].append((version, "../" + version + "/index.html"))

docs/doc_versions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
0.6.1
2+
latest

docs/docfiles/intro.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
Welcome to Data-parallel Control (dpctl)'s documentation!
22
=========================================================
33

4-
Data-parallel control (dpctl) is a library that exposes SYCL and DPCPP to
5-
languages other than C++. Currently, dpctl provides SYCL bindings for C and
6-
Python making it possible to access SYCL runtime objects and methods from these
7-
languages. The SYCL functionality covered by dpctl includes the core SYCL
8-
runtime classes described in Section 4.6 of the
9-
`SYCL 2020 spec <https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes>`_
10-
and USM memory management. dpctl also has experimental support for SYCL's
11-
``kernel`` and ``program`` classes.
4+
The data-parallel control (dpctl) library provides C and Python bindings for
5+
`SYCL 2020 <https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html>`_.
6+
The SYCL 2020 features supported by dpctl are limited to those included by
7+
Intel's DPCPP compiler and specifically cover the SYCL runtime classes described
8+
in `Section 4.6 <https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes>`_
9+
of the SYCL 2020 specification. Apart from the bindings for these runtime
10+
classes, dpctl includes bindings for SYCL USM memory allocators and
11+
deallocators. Dpctl's Python API provides classes that implement
12+
`Python buffer protocol <https://docs.python.org/3/c-api/buffer.html>`_
13+
using SYCL USM memory; making it possible to create Python objects that are
14+
backed by SYCL USM memory.
15+
16+
Dpctl also supports the DPCPP ``ONEAPI::filter_selector`` extension and has
17+
experimental support for SYCL's ``kernel`` and ``program`` classes.

0 commit comments

Comments
 (0)