-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for oneAPI data management backend primitives #3008
Open
Vika-F
wants to merge
7
commits into
uxlfoundation:main
Choose a base branch
from
Vika-F:dev/data_management_doc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f5a0ec1
Initial version of documentations for data management primitives
Vika-F f87e7db
Add API reference for ndarray
Vika-F 8b07f58
Add comments in ndview and ndarray classes
Vika-F 7985c6b
Improve descriptions of backend primitives classes
Vika-F 0563591
Merge branch 'main' of https://github.com/uxlfoundation/oneDAL into u…
Vika-F 93e970d
Merge branch 'uxlfoundation-main' into dev/data_management_doc
Vika-F cbca096
Correct license
Vika-F File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
.. Copyright contributors to the oneDAL project | ||
.. | ||
.. Licensed under the Apache License, Version 2.0 (the "License"); | ||
.. you may not use this file except in compliance with the License. | ||
.. You may obtain a copy of the License at | ||
.. | ||
.. http://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
|
||
.. highlight:: cpp | ||
|
||
.. _api_backend_primitives: | ||
|
||
================== | ||
Backend Primitives | ||
================== | ||
|
||
Refer to :ref:`Developer Guide: Backend Primitives <dm_backend_primitives>`. | ||
|
||
.. _backend_primitives_programming_interface: | ||
|
||
--------------------- | ||
Programming interface | ||
--------------------- | ||
|
||
All types and functions in this section are declared in the | ||
``oneapi::dal::backend::primitives`` namespace and be available via inclusion of the | ||
``oneapi/dal/backend/primitives/ndarray.hpp`` header file. | ||
|
||
.. _api_ndorder: | ||
|
||
Multidimensional array order | ||
---------------------------- | ||
|
||
Refers to data indexing order, or how a linear sequence is translated into a multi-dimensional array. | ||
|
||
.. onedal_enumclass:: oneapi::dal::backend::primitives::ndorder | ||
|
||
.. _api_ndshape: | ||
|
||
Multidimensional array shape | ||
---------------------------- | ||
|
||
.. onedal_class:: oneapi::dal::backend::primitives::ndshape | ||
|
||
Multidimensional data view (ndview) | ||
----------------------------------- | ||
|
||
An implementation of a multidimensional data container that provides a view of the homogeneous | ||
data stored in an externally-managed memory block. | ||
|
||
All the ``ndview`` class methods can be divided into several groups: | ||
|
||
#. The group of ``wrap()`` methods that are used to create an ``ndview`` object from external, | ||
mutable or immutable memory. | ||
|
||
#. The group of ``wrap_mutable()`` methods that are used to create a mutable ``ndview`` object from | ||
``dal::array`` object. | ||
|
||
#. The methods that are used to access the data. | ||
|
||
#. The methods like ``t()`` and ``reshape()`` that are used to change the shape and layout of the data view. | ||
|
||
#. The group of data slicing methods that are used to create a new ``ndview`` object that is a | ||
view of the original data slice along some dimension. | ||
|
||
#. The group of data transfering methods that are used to produce a new ``ndview`` object that | ||
contains the data copied from the original one, but at the different memory location. | ||
|
||
Multidimensional array (ndarray) | ||
-------------------------------- | ||
|
||
An implementation of multidimensional data array that provides a way to store and manipulate | ||
homogeneous data in a multidimensional structure. | ||
|
||
All the ``ndarray`` class methods can be divided into several groups: | ||
|
||
#. The group of ``wrap()`` and ``wrap_mutable()`` methods that are used to create an ``ndarray`` | ||
object from external, mutable or immutable memory. | ||
|
||
#. The group of ``wrap()`` and ``wrap_mutable()`` methods that are used to create an ``ndarray`` | ||
that shares its data with another data object. | ||
|
||
#. The group of methods like ``zeros()``, ``full()``, ``arange()``, etc. that are used to create an ``ndarray`` | ||
object with the specified shape and values. | ||
|
||
#. The methods like ``t()`` and ``reshape()`` that are used to change the shape and layout | ||
of the multidimensional array. | ||
|
||
#. The group of data slicing methods that are used to create a new ``ndarray`` object that is a view | ||
of the original data slice along some dimension. | ||
|
||
#. The group of methods like ``fill()``, ``assign()``, ``assign_from_host()``, etc. that are used to | ||
fill the array with the specified values. | ||
|
||
.. toctree:: | ||
|
||
backend/ndview.rst | ||
backend/ndarray.rst | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. Copyright contributors to the oneDAL project | ||
.. | ||
.. Licensed under the Apache License, Version 2.0 (the "License"); | ||
.. you may not use this file except in compliance with the License. | ||
.. You may obtain a copy of the License at | ||
.. | ||
.. http://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
|
||
.. _api_ndarray: | ||
|
||
====================== | ||
Multidimensional array | ||
====================== | ||
|
||
The ``ndarray`` class provides a way to store and manipulate homogeneous data | ||
in a multidimensional structure. | ||
The pointer to the data within the ``ndarray`` object is :term:`reference-counted <Reference-counted object>`:. | ||
|
||
--------------------- | ||
Programming interface | ||
--------------------- | ||
|
||
All types and functions in this section are declared in the | ||
``oneapi::dal::backend::primitives`` namespace and be available via inclusion of the | ||
``oneapi/dal/table/ndarray.hpp`` header file. | ||
|
||
.. onedal_class:: oneapi::dal::backend::primitives::ndarray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. Copyright contributors to the oneDAL project | ||
.. | ||
.. Licensed under the Apache License, Version 2.0 (the "License"); | ||
.. you may not use this file except in compliance with the License. | ||
.. You may obtain a copy of the License at | ||
.. | ||
.. http://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
|
||
.. _api_ndview: | ||
|
||
===================== | ||
Multidimensional view | ||
===================== | ||
|
||
The ``ndview`` class provides a view of the homogeneous data as a multidimensional structure | ||
stored in an externally-managed memory block. | ||
|
||
--------------------- | ||
Programming interface | ||
--------------------- | ||
|
||
All types and functions in this section are declared in the | ||
``oneapi::dal::backend::primitives`` namespace and be available via inclusion of the | ||
``oneapi/dal/table/ndarray.hpp`` header file. | ||
|
||
.. onedal_class:: oneapi::dal::backend::primitives::ndview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. Copyright contributors to the oneDAL project | ||
.. | ||
.. Licensed under the Apache License, Version 2.0 (the "License"); | ||
.. you may not use this file except in compliance with the License. | ||
.. You may obtain a copy of the License at | ||
.. | ||
.. http://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
|
||
.. highlight:: cpp | ||
|
||
.. _dm_backend_primitives: | ||
|
||
================== | ||
Backend Primitives | ||
================== | ||
|
||
This section describes the types related to data management backend primitives. | ||
|
||
.. tabularcolumns:: |\Y{0.2}|\Y{0.8}| | ||
|
||
.. list-table:: Data Management Backend Primitives Types | ||
:header-rows: 1 | ||
:widths: 10 70 | ||
:class: longtable | ||
|
||
* - Type | ||
- Description | ||
|
||
* - :ref:`api_ndorder` | ||
- An enumeration of multidimensional data orders used to store | ||
contiguous data blocks inside the table. | ||
|
||
* - :ref:`api_ndshape` | ||
- A class that represents the shape of a multidimensional array. | ||
|
||
* - :ref:`api_ndview` | ||
- An implementation of a multidimensional data container that provides a view of the homogeneous | ||
data stored in an externally-managed memory block. | ||
|
||
* - :ref:`api_ndarray` | ||
- A class that provides a way to store and manipulate homogeneous data | ||
in a multidimensional structure. | ||
|
||
--------------------- | ||
Programming interface | ||
--------------------- | ||
|
||
Refer to :ref:`API: Data Management Backend Primitives <backend_primitives_programming_interface>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the relationship between "tables" and "arrays"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Will add an example on how tables and ndarrays/ndviews are used together and the description of the differences.
Short answer: