Kokkos Core Kernels Package  Version of the Day
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Kokkos::HostSpace Class Reference

Memory management for host memory. More...

#include <Kokkos_HostSpace.hpp>

Public Types

typedef HostSpace memory_space
 Tag this class as a kokkos memory space. More...
 
typedef Kokkos::Device< execution_space, memory_spacedevice_type
 This memory space preferred device_type. More...
 

Public Member Functions

 HostSpace ()
 Default memory space instance. More...
 
void * allocate (const size_t arg_alloc_size) const
 Allocate untracked memory in the space. More...
 
void deallocate (void *const arg_alloc_ptr, const size_t arg_alloc_size) const
 Deallocate untracked memory in the space. More...
 

Static Public Member Functions

static Impl::AllocationTracker allocate_and_track (const std::string &label, const size_t size)
 Allocate a contiguous block of memory. More...
 

Detailed Description

Memory management for host memory.

HostSpace is a memory space that governs host memory. "Host" memory means the usual CPU-accessible memory.

Definition at line 101 of file Kokkos_HostSpace.hpp.

Member Typedef Documentation

Tag this class as a kokkos memory space.

Definition at line 105 of file Kokkos_HostSpace.hpp.

This memory space preferred device_type.

Definition at line 129 of file Kokkos_HostSpace.hpp.

Member Enumeration Documentation

Non-default memory space instance to choose allocation mechansim, if available.

Definition at line 166 of file Kokkos_HostSpace.hpp.

Constructor & Destructor Documentation

Kokkos::HostSpace::HostSpace ( )

Default memory space instance.

Member Function Documentation

static Impl::AllocationTracker Kokkos::HostSpace::allocate_and_track ( const std::string &  label,
const size_t  size 
)
static

Allocate a contiguous block of memory.

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.

void* Kokkos::HostSpace::allocate ( const size_t  arg_alloc_size) const

Allocate untracked memory in the space.

void Kokkos::HostSpace::deallocate ( void *const  arg_alloc_ptr,
const size_t  arg_alloc_size 
) const

Deallocate untracked memory in the space.


The documentation for this class was generated from the following file: