Skip to content

Commit a8ea300

Browse files
authored
online documentation restructured, updated and fixed (#766)
1 parent 40c46e9 commit a8ea300

9 files changed

+107
-64
lines changed

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ repos:
4141
rev: v1.1.1
4242
hooks:
4343
- id: doc8
44+
args: ['--max-line-length=120']
4445

4546
- repo: https://github.com/pycqa/isort
4647
rev: 5.12.0
@@ -61,7 +62,7 @@ repos:
6162
rev: v2.2.4
6263
hooks:
6364
- id: codespell
64-
entry: codespell --ignore-words ignore-spelling-words.txt
65+
entry: codespell --ignore-words doc/spec/source/spelling_wordlist.txt
6566
types: [text]
6667

6768
- repo: local

CONTRIBUTING.md

+30
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ SPDX-License-Identifier: BSD-3-Clause
66

77
# Contributing
88

9+
### Submitting a PR
10+
11+
Follow the standard github workflow. Fork this repo, clone your fork,
12+
make changes, commit to a new branch, push branch to your fork. Submit
13+
a PR from your fork.
14+
15+
The CI runs static checks and runs the test system. See
16+
[pre-commit](doc/developer/testing/pre-commit.rst) for information on
17+
failing static checks.
18+
919
### License
1020

1121
<PROJECT NAME> is licensed under the terms in [LICENSE]<link to license file in repo>. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
@@ -53,3 +63,23 @@ Use your real name (sorry, no pseudonyms or anonymous contributions.)
5363

5464
If you set your `user.name` and `user.email` git configs, you can sign your
5565
commit automatically with `git commit -s`.
66+
67+
### Check your change locally
68+
69+
If you want to build the document or run the pre-commit checks, you
70+
must install some python packages. Create a python virtual environment
71+
and install dependencies:
72+
```
73+
python -m venv venv
74+
source venv/bin/activate
75+
pip install -r requirements.txt
76+
```
77+
78+
Activate virtual environment:
79+
```
80+
source venv/bin/activate
81+
```
82+
For benchmarking:
83+
```
84+
pip install src-python/drbench
85+
```

README.rst

+55-56
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
..
33
.. SPDX-License-Identifier: BSD-3-Clause
44
5-
====================
5+
===================
66
Distributed Ranges
7-
====================
7+
===================
88

99
.. image:: https://github.com/intel-sandbox/libraries.runtimes.hpc.dds.distributed-ranges/actions/workflows/pr.yml/badge.svg
1010
:target: https://github.com/intel-sandbox/libraries.runtimes.hpc.dds.distributed-ranges/actions/workflows/pr.yml
@@ -14,71 +14,62 @@
1414
Productivity library for distributed and partitioned memory based on
1515
C++ Ranges.
1616

17-
`Overview slides`_
17+
About
18+
-----
1819

19-
.. _`Overview slides`: doc/presentations/Distributed%20Ranges.pdf
20+
Distributed Ranges is a productivity library for distributed and partitioned memory based on C++ ranges.
21+
It offers a collection of data structures, views, and algorithms for building generic abstractions
22+
and provides interoperability with MPI, SHMEM, SYCL and OpenMP and portability on CPUs and GPUs.
23+
NUMA-aware allocators and distributed data structures facilitate development of C++ applications
24+
on heterogeneous nodes with multiple devices and achieve excellent performance and parallel scalability
25+
by exploiting local compute and data access.
2026

21-
The documentation is built from main branch on every commit and
22-
published at `latest spec`_ and `latest doxygen`_.
27+
Documentation
28+
-------------
2329

24-
`Benchmark results`_
30+
- Usage:
31+
- Introductory presentation: `Distributed Ranges, why you need it`_, 2024
32+
- Article: `Get Started with Distributed Ranges`_, 2023
33+
- Tutorial: `Sample repository showing Distributed Ranges usage`_
34+
- Design / Implementation:
35+
- Conference paper: `Distributed Ranges, A Model for Distributed Data Structures, Algorithms, and Views`_, 2024
36+
- Talk: `CppCon 2023; Benjamin Brock; Distributed Ranges`_, 2023
37+
- Technical presentation: `Intel Innovation'23`_, 2023
38+
- `API specification`_
39+
- `Doxygen`_
2540

26-
.. _`Benchmark results`: devcloud.rst
41+
Contact us
42+
----------
2743

28-
Environment Setup
29-
=================
44+
We seek collaboration opportunities and welcome feedback on ways to extend the library,
45+
according to developer needs. Contact us by writing a `new issue`_.
3046

31-
On Ubuntu 22.04::
32-
33-
sudo apt install g++-12
34-
35-
If you want to build the document or run the pre-commit checks, you
36-
must install some python packages. Create a python virtual environment
37-
and install dependencies::
38-
39-
python -m venv venv
40-
source venv/bin/activate
41-
pip install -r requirements.txt
42-
43-
Activate virtual environment::
44-
45-
source venv/bin/activate
46-
47-
For benchmarking::
48-
49-
pip install src-python/drbench
5047

5148
Examples
52-
========
49+
--------
50+
51+
See `Sample repository showing Distributed Ranges usage`_ for a few well explained examples.
52+
Additionally you may build all tests of this repository to see and run much more examples.
5353

5454
Build and test with gcc for CPU::
5555

5656
CXX=g++-12 cmake -B build
5757
make -C build -j all test
5858

59-
Build and test with ipcx for SYCL && CPU::
59+
Build and test with ipcx for SYCL && CPU/GPU::
6060

6161
CXX=icpx cmake -B build -DENABLE_SYCL=ON
6262

63-
Build and test with ipcx for SYCL && CPU on devcloud::
64-
65-
CXX=icpx cmake -B build -DENABLE_SYCL=ON -DENABLE_MPIFORK=on
66-
6763
See how example is run and the output::
6864

6965
cd build
7066
ctest -VV
7167

72-
Logging
73-
=======
68+
Adding Distributed Ranges to your project
69+
-----------------------------------------
7470

75-
Add this to your main to enable logging::
76-
77-
std::ofstream logfile(fmt::format("dr.{}.log", comm_rank));
78-
dr::drlog.set_file(logfile);
79-
80-
Adding DR to a project
81-
======================
71+
See `Sample repository showing Distributed Ranges usage`_
72+
for a live example how to write CMakeLists.txt. Alternatively you may read details below.
8273

8374
If your project uses CMAKE, add the following to your
8475
``CMakeLists.txt`` to download the library::
@@ -110,19 +101,20 @@ Use ``-I`` and ``-L`` to find headers and libs during compilation::
110101

111102
g++ -std=c=++20 -I <prefix>/include -L <prefix>/lib -L /opt/intel/oneapi/mpi/latest/lib/release -lfmt -lmpicxx -lmpi
112103

104+
Logging
105+
-------
106+
107+
Add this to your main to enable logging::
108+
109+
std::ofstream logfile(fmt::format("dr.{}.log", comm_rank));
110+
dr::drlog.set_file(logfile);
113111

114-
Developer Information
115-
=====================
116112

117-
Submitting a PR
118-
---------------
113+
Contributing
114+
------------
119115

120-
Follow the standard github workflow. Fork this repo, clone your fork,
121-
make changes, commit to a new branch, push branch to your fork. Submit
122-
a PR from your fork.
116+
See `CONTRIBUTING`_.
123117

124-
The CI runs static checks and runs the test system. See `pre-commit`_
125-
for information on failing static checks.
126118

127119
See also
128120
--------
@@ -144,9 +136,16 @@ See also
144136

145137
.. _`Security`: SECURITY.md
146138
.. _`Testing`: doc/developer/testing
147-
.. _`pre-commit`: doc/developer/testing/pre-commit.rst
148139
.. _`Spec Editing`: doc/spec/README.rst
149140
.. _`Fuzz Testing`: test/fuzz/README.rst
150141
.. _`Print Type`: https://stackoverflow.com/a/14617848/2525421
151-
.. _`latest spec`: https://cautious-dollop-yopgy9g.pages.github.io/spec
152-
.. _`latest doxygen`: https://cautious-dollop-yopgy9g.pages.github.io/doxygen
142+
.. _`CONTRIBUTING`: CONTRIBUTING.md
143+
.. _`Distributed Ranges, why you need it`: https://github.com/oneapi-src/distributed-ranges/blob/main/doc/presentations/Distributed%20Ranges%2C%20why%20you%20need%20it.pdf
144+
.. _`Get Started with Distributed Ranges`: https://www.intel.com/content/www/us/en/developer/articles/guide/get-started-with-distributed-ranges.html
145+
.. _`Sample repository showing Distributed Ranges usage`: https://github.com/oneapi-src/distributed-ranges-tutorial
146+
.. _`Distributed Ranges, A Model for Distributed Data Structures, Algorithms, and Views`: https://dl.acm.org/doi/10.1145/3650200.3656632
147+
.. _`CppCon 2023; Benjamin Brock; Distributed Ranges`: https://www.youtube.com/watch?v=X_dlJcV21YI
148+
.. _`Intel Innovation'23`: https://github.com/oneapi-src/distributed-ranges/blob/main/doc/presentations/Distributed%20Ranges.pdf
149+
.. _`API specification`: https://oneapi-src.github.io/distributed-ranges/spec/
150+
.. _`Doxygen`: https://oneapi-src.github.io/distributed-ranges/doxygen/
151+
.. _`new issue`: issues/new

doc/spec/source/arch.rst

+7
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@
55
==============
66
Architecture
77
==============
8+
9+
See `Distributed Ranges, why you need it`_ presentation
10+
and all other materials listed in `Documentation`_ section
11+
on Distributed Ranges repository main page.
12+
13+
.. _`Distributed Ranges, why you need it`: https://github.com/oneapi-src/distributed-ranges/blob/main/doc/presentations/Distributed%20Ranges%2C%20why%20you%20need%20it.pdf
14+
.. _`Documentation`: https://github.com/oneapi-src/distributed-ranges/blob/main/README.rst

doc/spec/source/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# -- Project information -----------------------------------------------------
2323

2424
project = "distributed-ranges"
25-
copyright = "2022-2023, Intel"
25+
copyright = "2022-2024, Intel"
2626

2727

2828
# -- General configuration ---------------------------------------------------
@@ -71,6 +71,7 @@
7171

7272
# -- Options for spelling extension-------------------------------------------
7373
spelling_warning = True
74+
spelling_word_list_filename = "spelling_wordlist.txt"
7475

7576
# -- Options for breathe
7677

doc/spec/source/intro.rst

+7
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@
55
==============
66
Introduction
77
==============
8+
9+
Distributed Ranges is a productivity library for distributed and partitioned memory based on C++ ranges.
10+
It offers a collection of data structures, views, and algorithms for building generic abstractions
11+
and provides interoperability with MPI, SHMEM, SYCL and OpenMP and portability on CPUs and GPUs.
12+
NUMA-aware allocators and distributed data structures facilitate development of C++ applications
13+
on heterogeneous nodes with multiple devices and achieve excellent performance and parallel scalability
14+
by exploiting local compute and data access.

doc/spec/source/spelling_wordlist.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
accessor
12
adaptor
23
Allocator
4+
allocators
35
Decompositions
46
Dereference
57
Dereferencing
68
Instantiations
9+
scalability
710
subspans
8-
accessor

ignore-spelling-words.txt

-4
This file was deleted.

include/dr/mhp/containers/subrange.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ template <typename DM> class subrange_iterator {
7878
return this->index_ <=> other.index_;
7979
}
8080

81-
// Only these arithmetics manipulate internal state
81+
// Only these arithmetic manipulate internal state
8282
auto &operator-=(difference_type n) {
8383
index_ -= n;
8484
return *this;

0 commit comments

Comments
 (0)