Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Static Public Member Functions
Kokkos::HostSpace Class Reference

Memory management on the host for devices. More...

#include <Kokkos_HostSpace.hpp>

List of all members.

Static Public Member Functions

static void * allocate (const std::string &label, const std::type_info &scalar_type, const size_t scalar_size, const size_t scalar_count)
 Allocate a contiguous block of memory on the Cuda device with size = scalar_size * scalar_count.
static void increment (const void *)
 Increment the reference count of the block of memory in which the input pointer resides.
static void decrement (const void *)
 Decrement the reference count of the block of memory in which the input pointer resides. If the reference count falls to zero the memory is deallocated.
static int count (const void *)
 Get the reference count of the block of memory in which the input pointer resides. If the reference count is zero the memory region is not tracked.
static void print_memory_view (std::ostream &)
 Print all tracked memory to the output stream.
static std::string query_label (const void *)
 Retrieve label associated with the input pointer.

Detailed Description

Memory management on the host for devices.

Definition at line 61 of file Kokkos_HostSpace.hpp.


Member Function Documentation

static void* Kokkos::HostSpace::allocate ( const std::string &  label,
const std::type_info &  scalar_type,
const size_t  scalar_size,
const size_t  scalar_count 
) [static]

Allocate a contiguous block of memory on the Cuda device with size = scalar_size * scalar_count.

The input label is associated with the block of memory. The block of memory is tracked via reference counting where allocation gives it a reference count of one.

Allocation may only occur on the master thread of the process.

static void Kokkos::HostSpace::increment ( const void *  ) [static]

Increment the reference count of the block of memory in which the input pointer resides.

Reference counting only occurs on the master thread.

static void Kokkos::HostSpace::decrement ( const void *  ) [static]

Decrement the reference count of the block of memory in which the input pointer resides. If the reference count falls to zero the memory is deallocated.

Reference counting only occurs on the master thread.

static int Kokkos::HostSpace::count ( const void *  ) [static]

Get the reference count of the block of memory in which the input pointer resides. If the reference count is zero the memory region is not tracked.

Reference counting only occurs on the master thread.

static void Kokkos::HostSpace::print_memory_view ( std::ostream &  ) [static]

Print all tracked memory to the output stream.

static std::string Kokkos::HostSpace::query_label ( const void *  ) [static]

Retrieve label associated with the input pointer.


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