Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
resources.hpp File Reference

Memory resource management for heterogeneous computing. More...

#include <cstdint>
#include <cstddef>
#include <span>
#include <vector>
#include <variant>
Include dependency graph for resources.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tannic::Host
 Host memory domain. More...
 
class  tannic::Devices
 Device enumeration singleton. More...
 
class  tannic::Device
 Device memory domain. More...
 

Namespaces

namespace  tannic
 

Typedefs

using tannic::Environment = std::variant< Host, Device >
 Memory environment variant type.
 

Detailed Description

Memory resource management for heterogeneous computing.

Author
Eric Hermosis
Date
2025

Defines the abstract memory architecture:

  • Host: The primary execution environment and memory space (eg. CPU)
  • Device: Secondary execution environments with separate memory spaces (eg. GPU)
  • Explicit memory management interface for each domain

The model enforces:

  1. Separate memory address spaces
  2. Distinct allocation semantics per domain
  3. Explicit data transfer requirements
Warning
This interface is under active development and may undergo breaking changes in future releases. The host/device abstraction is particularly prone to API evolution as hardware capabilities advanc