Skip to content

Commit

Permalink
change documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetyusufoglu authored and psychocoderHPC committed Jul 24, 2024
1 parent b9ed742 commit c9b8c94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/source/basic/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,22 @@ Enqueue a memory copy from device to host
Kernel Execution
----------------
Prepare Kernel Bundle
.. code-block:: c++

HeatEquationKernel heatEqKernel;
// Arguments of KernelBundle: The kernel instance and the kernel arguments
auto const& bundeledKernel = alpaka::KernelBundle(heatEqKernel, pCurrAcc, pNextAcc, numNodesX, dx, dt);

Automatically select a valid kernel launch configuration
.. code-block:: c++

Vec<Dim, Idx> const globalThreadExtent = vectorValue;
Vec<Dim, Idx> const elementsPerThread = vectorValue;

auto autoWorkDiv = getValidWorkDiv<Acc>(
auto autoWorkDiv = getValidWorkDivForKernel<Acc>(
device,
bundeledKernel,
globalThreadExtent, elementsPerThread,
false,
GridBlockExtentSubDivRestrictions::Unrestricted);
Expand Down

0 comments on commit c9b8c94

Please sign in to comment.