Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Static Public Member Functions
Kokkos::ArrayOfViewsHelper< Node > Class Template Reference

Helper class for getting an array of views. More...

#include <Kokkos_NodeHelpers.hpp>

List of all members.

Static Public Member Functions

template<class T >
static ArrayRCP< ArrayRCP< T > > getArrayOfNonConstViews (const RCP< Node > &node, ReadWriteOption rw, const ArrayRCP< ArrayRCP< T > > &arrayOfBuffers)
 Invoke the Node's viewBufferNonConst() method to get an array of views.

Detailed Description

template<class Node>
class Kokkos::ArrayOfViewsHelper< Node >

Helper class for getting an array of views.

Template Parameters:
NodeThe Kokkos Node type.

The class method getArrayOfNonConstView takes an array of (device) buffers, and returns an array of (host) views of those buffers. The host views may be either write-only (meaning that their contents on the host before being written are undefined), or read-and-write (meaning that they have valid contents on the host).

All methods of ArrayOfViewsHelper are class (i.e., static) methods. It doesn't make sense to make an instance of ArrayOfViewsHelper. We forbid this syntactically by declaring the (unimplemented) constructor private.

Definition at line 209 of file Kokkos_NodeHelpers.hpp.


Member Function Documentation

template<class Node >
template<class T >
ArrayRCP< ArrayRCP< T > > Kokkos::ArrayOfViewsHelper< Node >::getArrayOfNonConstViews ( const RCP< Node > &  node,
ReadWriteOption  rw,
const ArrayRCP< ArrayRCP< T > > &  arrayOfBuffers 
) [static]

Invoke the Node's viewBufferNonConst() method to get an array of views.

Parameters:
node[in/out] The Kokkos Node instance.
rw[in] Whether to create read-and-write views, or write-only views. Read-and-write views may be safely read before they are written. Write-only views have undefined contents before they are written. In both cases, views are to be read and written on the host. If the device has a separate memory space, then each view is copied back to the device (namely, to their corresponding buffers in arrayOfBuffers) once its reference count falls to zero.
arrayOfBuffers[in/out] The array of buffers for which to create views.

Definition at line 239 of file Kokkos_NodeHelpers.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends