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

Allocator/deallocator with pinned-host capability. More...

#include <Kokkos_CUDANodeUtils.hpp>

List of all members.

Public Member Functions

ArrayRCP< T > alloc (const size_t sz) const
 Allocate a buffer of the requested size.
void free (void *ptr) const
 Deallocate the memory pointed to by ptr.

Detailed Description

template<class T>
class Kokkos::CUDANodeHostPinnedDeallocator< T >

Allocator/deallocator with pinned-host capability.

Allocates a segment of page-locked memory associated with CUDA device memory. Upon deallocation, delete it appropriately.

Definition at line 159 of file Kokkos_CUDANodeUtils.hpp.


Member Function Documentation

template<class T >
ArrayRCP< T > Kokkos::CUDANodeHostPinnedDeallocator< T >::alloc ( const size_t  sz) const

Allocate a buffer of the requested size.

Warning:
This method may be called at most once on a single instance. In a debug build, calling this method more than once throws an exception.
Parameters:
sz[in] Number of entries in the buffer.
Returns:
An ArrayRCP of the requested type and with at least sz entries, which copies back to GPU memory at deallocation.

Definition at line 200 of file Kokkos_CUDANodeUtils.hpp.

template<class T >
void Kokkos::CUDANodeHostPinnedDeallocator< T >::free ( void *  ptr) const

Deallocate the memory pointed to by ptr.

Note:
In a debug build of Kokkos, ptr must be the same as the memory allocated by alloc().

Definition at line 222 of file Kokkos_CUDANodeUtils.hpp.


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