|
| 1 | +namespace::function |
| 2 | +################### |
| 3 | + |
| 4 | +Defined in header: :code:`<namespace>_<function>.hpp` |
| 5 | + |
| 6 | +.. code:: c++ |
| 7 | + |
| 8 | + template <class execution_space, class input_type, class output_type> |
| 9 | + void function(const execution_space& space, const input_type& in, const output_type& out); |
| 10 | + |
| 11 | + template <class input_type, class output_type> |
| 12 | + void function(const input_type& in, const output_type& out); |
| 13 | + |
| 14 | +Explain what the <function> does and what each overall specificities are. |
| 15 | + |
| 16 | +Parameters |
| 17 | +========== |
| 18 | + |
| 19 | +:space: execution space instance |
| 20 | + |
| 21 | +:in: input |
| 22 | + |
| 23 | +:out: output |
| 24 | + |
| 25 | +Type Requirements |
| 26 | +----------------- |
| 27 | + |
| 28 | +- `execution_space` must be a Kokkos `execution space <https://kokkos.org/kokkos-core-wiki/API/core/execution_spaces.html>`_ |
| 29 | + |
| 30 | +- `input_type` must be a Kokkos `View <https://kokkos.org/kokkos-core-wiki/API/core/view/view.html>`_ |
| 31 | + |
| 32 | + - ``Kokkos::SpaceAccessibility<execution_space, typename input_type::memory_space>::accessible`` |
| 33 | + - ... |
| 34 | + |
| 35 | +- `output_type` must be a Kokkos `View <https://kokkos.org/kokkos-core-wiki/API/core/view/view.html>`_ that satisfies |
| 36 | + |
| 37 | + - ``Kokkos::SpaceAccessibility<execution_space, typename output_type::memory_space>::accessible`` |
| 38 | + - ... |
| 39 | + |
| 40 | +Example |
| 41 | +======= |
| 42 | + |
| 43 | +.. code:: cpp |
| 44 | +
|
| 45 | + #include <Kokkos_Core.hpp> |
| 46 | + #include <Namespace_function.hpp> |
| 47 | +
|
| 48 | + using Scalar = default_scalar; |
| 49 | + using Ordinal = default_lno_t; |
| 50 | + using Offset = default_size_type; |
| 51 | + using Layout = default_layout; |
| 52 | +
|
| 53 | + int main(int argc, char* argv[]) { |
| 54 | + Kokkos::initialize(argc, argv); |
| 55 | + { |
| 56 | + ... |
| 57 | + } |
| 58 | + Kokkos::finalize(); |
| 59 | + return 0; |
| 60 | + } |
0 commit comments