forked from kokkos/kokkos-core-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kokkos#120: - API/core/view/view_alloc transition from .md to .rst
- Loading branch information
Marcin Wróbel
committed
Aug 29, 2022
1 parent
90b5ff2
commit a8db189
Showing
2 changed files
with
58 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
``view_alloc()`` | ||
================ | ||
|
||
.. role:: cpp(code) | ||
:language: cpp | ||
|
||
Header File: ``Kokkos_View.hpp`` | ||
|
||
Usage: | ||
|
||
.. code-block:: cpp | ||
Kokkos::view_alloc(exec_space, Kokkos::WithoutInitializing, "ViewString"); | ||
Kokkos::view_wrap(pointer_to_wrapping_memory); | ||
Create View allocation parameter bundle from argument list. Valid argument list members are: | ||
|
||
* label as :cpp:`C`\ -string or :cpp:`std::string` | ||
* memory space instance of the :cpp:`View::memory_space` type | ||
* execution space instance able to access :cpp:`View::memory_space` | ||
* :cpp:`Kokkos::WithoutInitializing` to bypass initialization | ||
* :cpp:`Kokkos::AllowPadding` to allow allocation to pad dimensions for memory alignment | ||
* a pointer to create an unmanaged View wrapping that pointer | ||
|
||
Synopsis | ||
-------- | ||
|
||
.. cpp:function:: template <class... Args> \ | ||
**implementation-detail** \ | ||
view_alloc(Args const&... args); | ||
|
||
.. cpp:function:: template <class... Args> \ | ||
KOKKOS_FUNCTION \ | ||
**implementation-detail** \ | ||
view_wrap(Args const&... args); | ||
|
||
Description | ||
----------- | ||
|
||
.. cpp:function:: template <class... Args> \ | ||
**implementation-detail** \ | ||
view_alloc(Args const&... args); | ||
|
||
Create View allocation parameter bundle from argument list. | ||
|
||
Restrictions: | ||
|
||
* ``args``\ : Cannot contain a pointer to memory. | ||
|
||
.. cpp:function:: template <class... Args> \ | ||
**implementation-detail** \ | ||
view_alloc(Args const&... args); | ||
|
||
Create View allocation parameter bundle from argument list. | ||
|
||
Restrictions: | ||
|
||
* ``args``\ : Can only be a pointer to memory. |