#include "impactx_export.H"
#include <AMReX_Gpu.H>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
Go to the source code of this file.
◆ IMPACTX_GPUDATA_EXTERN
| #define IMPACTX_GPUDATA_EXTERN |
( |
| ElementType | ) |
|
Value:
ElementType::DynamicData::DataType>;
Definition dynamicdata.H:50
Suppress implicit instantiation of GPUDataRegistry for an element type.
GPUDataRegistry uses function-local static variables for its registry map and ID counter. Without explicit instantiation control, different translation units may each get their own copy of these statics, causing elements to be registered in one registry instance but looked up in another (ODR violation).
Use IMPACTX_GPUDATA_EXTERN in headers and IMPACTX_GPUDATA_INSTANTIATE in the corresponding .cpp file to ensure a single shared registry across the program.
- Parameters
-
| ElementType | The element class (must define using DynamicData = ...) |
◆ IMPACTX_GPUDATA_INSTANTIATE
| #define IMPACTX_GPUDATA_INSTANTIATE |
( |
| ElementType | ) |
|
Value:
ElementType::DynamicData::DataType>;
Explicit instantiation of GPUDataRegistry for an element type.
Provides the single definition of the registry's static variables. Pair with IMPACTX_GPUDATA_EXTERN in the header.
- Parameters
-
| ElementType | The element class (must define using DynamicData = ...) |