OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
backend_tags.hpp File Reference

Backend tags for compile-time backend selection. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pfc::backend::CpuTag
 CPU backend tag. More...
 

Detailed Description

Backend tags for compile-time backend selection.

This header defines empty struct tags used for template specialization to select different memory and compute backends at compile-time.

  • CpuTag: CPU backend (always available)
  • CudaTag: CUDA backend (only when OpenPFC_ENABLE_CUDA is defined)
  • HipTag: HIP/ROCm backend (only when OpenPFC_ENABLE_HIP is defined)

These tags are used with template specialization to provide backend-specific implementations of data structures and operations with zero runtime overhead.

// CPU memory (always available)
#if defined(OpenPFC_ENABLE_CUDA)
// GPU memory (only when CUDA is enabled)
#endif
Backend tags for compile-time backend selection.
Backend-agnostic memory buffer with tag-based dispatch.
Backend-agnostic memory buffer.
Definition databuffer.hpp:68
See also
core/databuffer.hpp for usage in memory management
core/memory_traits.hpp for backend metadata
Author
OpenPFC Development Team
Date
2025