Host memory domain.
More...
#include <resources.hpp>
|
| | Host ()=default |
| | Constructs a host memory environment
|
| |
| void * | allocate (std::size_t nbytes) const |
| | Allocates memory in host address space.
|
| |
| void | deallocate (void *address, std::size_t nbytes) const |
| | Releases host memory resources.
|
| |
| int | id () const |
| | Domain identifier constant.
|
| |
| bool | pageable () const |
| |
| bool | pinned () const |
| |
Host memory domain.
- Primary memory space attached to the root execution environment
- Manages the default address space for the main processor
- Required for all operations in the root execution context
- Warning
- This class interface is experimental and likely to change as the backend evolves.
◆ Host()
Constructs a host memory environment
- Postcondition
- Defaults to pageable allocation strategy
◆ allocate()
| void * tannic::Host::allocate |
( |
std::size_t |
nbytes | ) |
const |
Allocates memory in host address space.
- Parameters
-
| nbytes | Contiguous memory block size in bytes |
- Returns
- Pointer to allocated memory in host space
- Precondition
- nbytes > 0
- Postcondition
- Returned pointer is valid in host execution context
◆ deallocate()
| void tannic::Host::deallocate |
( |
void * |
address, |
|
|
std::size_t |
nbytes |
|
) |
| const |
Releases host memory resources.
- Parameters
-
| address | Base pointer of allocation |
| nbytes | Size of original allocation (for accounting) |
- Precondition
- address points to valid host allocation
- Postcondition
- Memory is returned to host environment
◆ id()
| int tannic::Host::id |
( |
| ) |
const |
|
inline |
Domain identifier constant.
- Returns
- Constant -1 representing the host domain
◆ pageable()
| bool tannic::Host::pageable |
( |
| ) |
const |
|
inline |
◆ pinned()
| bool tannic::Host::pinned |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: