Skip to content

Commit

Permalink
kokkos#120: - API/core/view/view_alloc transition from .md to .rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Wróbel committed Aug 29, 2022
1 parent 90b5ff2 commit a8db189
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 52 deletions.
52 changes: 0 additions & 52 deletions docs/source/API/core/view/view_alloc.md

This file was deleted.

58 changes: 58 additions & 0 deletions docs/source/API/core/view/view_alloc.rst
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.

0 comments on commit a8db189

Please sign in to comment.