Go to the documentation of this file.
69 template <class TLOC , typename std::enable_if< std::is_arithmetic<TLOC>::value ,
int >::type = 0>
84 return data.createHostCopy(stream)(0);
90 auto &myData = this->data;
YAKL_INLINE ScalarLiveOut()
Default constructor allocates room on the device for one scalar of type T
Definition: YAKL_ScalarLiveOut.h:46
YAKL_INLINE T get() const
Returns a modifiable reference to the underlying data on the device.
Definition: YAKL_ScalarLiveOut.h:78
Implements the functionality of a stream for parallel kernel execution. If the Stream::create() metho...
Definition: YAKL_streams_events.h:394
Describes a set of C-style tightly-nested loops.
Definition: YAKL_Bounds_c.h:84
YAKL_INLINE T & operator()() const
Returns a modifiable reference to the underlying data on the device.
Definition: YAKL_ScalarLiveOut.h:73
void parallel_for(char const *str, Bounds< N, simple > const &bounds, F const &f, LaunchConfig< VecLen, B4B > config=LaunchConfig<>())
[ASYNCHRONOUS] Launch the passed functor in parallel.
T hostRead(Stream stream=Stream()) const
Returns a host copy of the data. This is blocking.
Definition: YAKL_ScalarLiveOut.h:83
#define __YAKL_NAMESPACE_WRAPPER_END__
Definition: YAKL.h:20
void hostWrite(T val, Stream stream=Stream())
[ASYNCHRONOUS] Writes a value to the device-resident underlying data
Definition: YAKL_ScalarLiveOut.h:88
YAKL_INLINE ScalarLiveOut(ScalarLiveOut &&rhs)
Copies and moves are shallow, not deep copy.
Definition: YAKL_ScalarLiveOut.h:64
#define __YAKL_NAMESPACE_WRAPPER_BEGIN__
Definition: YAKL.h:19
LaunchConfig<> DefaultLaunchConfig
This launch configuration sets vector length to the device default and B4B to false.
Definition: YAKL_LaunchConfig.h:77
#define YAKL_INLINE
Used to decorate functions called from kernels (parallel_for and parallel_outer) or from CPU function...
Definition: YAKL_defines.h:140
Class to handle scalars that exist before kernels, are written to by kernels, and read after the kern...
Definition: YAKL_ScalarLiveOut.h:39
YAKL_INLINE ScalarLiveOut & operator=(ScalarLiveOut const &rhs)
Copies and moves are shallow, not deep copy.
Definition: YAKL_ScalarLiveOut.h:62
YAKL_INLINE ~ScalarLiveOut()
Deallocates the scalar value on the device.
Definition: YAKL_ScalarLiveOut.h:55
ScalarLiveOut(T val, Stream stream=Stream())
[ASYNCHRONOUS] This constructor allocates room on the device for one scalar of type T and initializes...
Definition: YAKL_ScalarLiveOut.h:50
YAKL_INLINE ScalarLiveOut & operator=(ScalarLiveOut &&rhs)
Copies and moves are shallow, not deep copy.
Definition: YAKL_ScalarLiveOut.h:66
YAKL_INLINE ScalarLiveOut(ScalarLiveOut const &rhs)
Copies and moves are shallow, not deep copy.
Definition: YAKL_ScalarLiveOut.h:60
#define YAKL_LAMBDA
Used to create C++ lambda expressions passed to parallel_for and parallel_outer
Definition: YAKL_defines.h:128