|
Kokkos Core Kernels Package
Version of the Day
|
Kokkos device for non-parallel execution. More...
#include <Kokkos_Serial.hpp>
Public Types | |
Type declarations that all Kokkos devices must provide. | |
| typedef Impl::ExecutionSpaceTag | kokkos_tag |
| The tag (what type of kokkos_object is this). | |
| typedef Serial | device_type |
| The device type (same as this class). | |
| typedef Serial | execution_space |
| typedef HostSpace::size_type | size_type |
| The size_type typedef best suited for this device. | |
| typedef HostSpace | memory_space |
| This device's preferred memory space. | |
| typedef LayoutRight | array_layout |
| This device's preferred array layout. | |
| typedef Serial | host_mirror_device_type |
| This device's host mirror type. | |
| typedef ScratchMemorySpace < Kokkos::Serial > | scratch_memory_space |
| Scratch memory space. | |
Static Public Member Functions | |
| static int | in_parallel () |
| True if and only if this method is being called in a thread-parallel function. | |
| static bool | sleep () |
| Set the device in a "sleep" state. | |
| static bool | wake () |
| Wake the device from the 'sleep' state so it is ready for work. | |
| static void | fence () |
| Wait until all dispatched functors complete. | |
| static void | finalize () |
| Free any resources being consumed by the device. | |
| static void | print_configuration (std::ostream &, const bool detail=false) |
| Print configuration information to the given output stream. | |
Kokkos device for non-parallel execution.
A "device" represents a parallel execution model. It tells Kokkos how to parallelize the execution of kernels in a parallel_for or parallel_reduce. For example, the Threads device uses Pthreads or C++11 threads on a CPU, the OpenMP device uses the OpenMP language extensions, and the Cuda device uses NVIDIA's CUDA programming model. The Serial device executes "parallel" kernels sequentially. This is useful if you really do not want to use threads, or if you want to explore different combinations of MPI and shared-memory parallel programming models.
Definition at line 75 of file Kokkos_Serial.hpp.
| typedef Impl::ExecutionSpaceTag Kokkos::Serial::kokkos_tag |
The tag (what type of kokkos_object is this).
Definition at line 81 of file Kokkos_Serial.hpp.
| typedef Serial Kokkos::Serial::device_type |
The device type (same as this class).
Definition at line 84 of file Kokkos_Serial.hpp.
| typedef HostSpace::size_type Kokkos::Serial::size_type |
The size_type typedef best suited for this device.
Definition at line 87 of file Kokkos_Serial.hpp.
This device's preferred memory space.
Definition at line 89 of file Kokkos_Serial.hpp.
This device's preferred array layout.
Definition at line 91 of file Kokkos_Serial.hpp.
This device's host mirror type.
Serial is a host device, so the host mirror type is the same as the device type itself.
Definition at line 96 of file Kokkos_Serial.hpp.
Scratch memory space.
Definition at line 99 of file Kokkos_Serial.hpp.
| static int Kokkos::Serial::in_parallel | ( | ) | [inline, static] |
True if and only if this method is being called in a thread-parallel function.
For the Serial device, this method always returns false, because parallel_for or parallel_reduce with the Serial device always execute sequentially.
Definition at line 109 of file Kokkos_Serial.hpp.
| static bool Kokkos::Serial::sleep | ( | ) | [static] |
Set the device in a "sleep" state.
This function sets the device in a "sleep" state in which it is not ready for work. This may consume less resources than if the device were in an "awake" state, but it may also take time to bring the device from a sleep state to be ready for work.
| static bool Kokkos::Serial::wake | ( | ) | [static] |
Wake the device from the 'sleep' state so it is ready for work.
| static void Kokkos::Serial::fence | ( | ) | [inline, static] |
Wait until all dispatched functors complete.
The parallel_for or parallel_reduce dispatch of a functor may return asynchronously, before the functor completes. This method does not return until all dispatched functors on this device have completed.
Definition at line 137 of file Kokkos_Serial.hpp.
| static void Kokkos::Serial::finalize | ( | ) | [inline, static] |
Free any resources being consumed by the device.
Definition at line 152 of file Kokkos_Serial.hpp.
| static void Kokkos::Serial::print_configuration | ( | std::ostream & | , |
| const bool | detail = false |
||
| ) | [static] |
Print configuration information to the given output stream.
1.7.6.1