58class LocalToGlobalDataCreator;
67template <
typename TPadding,
typename TValue>
72 static_assert(std::is_floating_point_v<TPadding>,
73 "LocalToGlobalKeyBase: Data type must be float or double.");
85 const std::string &tag,
const std::vector<std::string> &components,
86 bool zeroDir =
false,
bool signChange =
false,
unsigned width = 1,
87 const std::vector<unsigned> &fieldInterleaveWidths = {})
114template <
typename TPadding>
120 bool zeroDir,
const std::vector<std::string> &components,
121 unsigned width,
const std::vector<unsigned> &fieldInterleaveWidths)
123 "DeviceLocalToGlobalNumGidsKey", components, zeroDir,
false,
124 width, fieldInterleaveWidths)
130template <
typename TPadding>
136 bool zeroDir,
const std::vector<std::string> &components,
137 unsigned width,
const std::vector<unsigned> &fieldInterleaveWidths)
139 "DeviceLocalToGlobalNumAssembleKey", components, zeroDir,
false,
140 width, fieldInterleaveWidths)
146template <
typename TPadding>
152 bool zeroDir,
const std::vector<std::string> &components,
153 unsigned width,
const std::vector<unsigned> &fieldInterleaveWidths)
155 "DeviceLocalToGlobalIndexKey", components, zeroDir,
false, width,
156 fieldInterleaveWidths)
162template <
typename TPadding>
168 bool zeroDir,
const std::vector<std::string> &components,
169 unsigned width,
const std::vector<unsigned> &fieldInterleaveWidths)
171 "DeviceLocalToGlobalIndexOffsetKey", components, zeroDir,
false,
172 width, fieldInterleaveWidths)
178template <
typename TPadding>
183 bool zeroDir,
bool signChange,
184 const std::vector<std::string> &components,
unsigned width,
185 const std::vector<unsigned> &fieldInterleaveWidths)
187 "DeviceLocalToGlobalSignKey", components, zeroDir, signChange,
188 width, fieldInterleaveWidths)
194template <
typename TPadding>
201 "DeviceBndLocalToGlobalNumGidsKey", components)
207template <
typename TPadding>
213 const std::vector<std::string> &components)
215 "DeviceBndLocalToGlobalNumAssembleKey", components)
221template <
typename TPadding>
227 const std::vector<std::string> &components)
229 "DeviceBndLocalToGlobalNumBndValsKey", components)
235template <
typename TPadding>
241 const std::vector<std::string> &components,
242 const std::vector<unsigned> &fieldInterleaveWidths)
244 "DeviceBndLocalToGlobalIndexKey", components,
false,
false, 1,
245 fieldInterleaveWidths)
251template <
typename TPadding>
258 "DeviceBndLocalToGlobalOffsetKey", components)
265template <
typename TPadding>
271 const std::vector<std::string> &components)
273 "DeviceBndLocalToGlobalAssembleOrderKey", components)
280template <
typename TPadding>
286 const std::vector<std::string> &components)
288 "DeviceBndLocalToGlobalSignKey", components, zeroDir, signChange)
294template <
typename TPadding>
312 template <
typename MemSpace,
typename TPadding>
317 template <
typename MemSpace,
typename TPadding>
322 template <
typename MemSpace,
typename TPadding>
327 template <
typename MemSpace,
typename TPadding>
332 template <
typename MemSpace,
typename TPadding>
337 template <
typename MemSpace,
typename TPadding>
342 template <
typename MemSpace,
typename TPadding>
347 template <
typename MemSpace,
typename TPadding>
352 template <
typename MemSpace,
typename TPadding>
357 template <
typename MemSpace,
typename TPadding>
362 template <
typename MemSpace,
typename TPadding>
367 template <
typename MemSpace,
typename TPadding>
372 template <
typename MemSpace,
typename TPadding>
377 inline static const std::string
m_name =
"LocalToGlobalCreator";
381 std::unordered_map<size_t, std::vector<AssemblyMapCGSharedPtr>>
384 std::unordered_map<size_t, std::vector<unsigned>>
m_gsInfo;
390 const std::vector<std::string> &components);
392 template <
typename TPadding>
394 bool zeroDir,
const std::vector<std::string> &components,
395 unsigned width,
const std::vector<unsigned> &fieldInterleaveWidths);
397 template <
typename TPadding>
399 const std::vector<std::string> &components);
401 template <
typename TPadding>
403 const std::vector<AssemblyMapCGSharedPtr> &loc2glo,
404 bool zeroDir,
bool signChange, int8_t *out);
A MemoryRegion represents a memory region.
Position of this rank among the ranks sharing each parallel-boundary global DOF, which fixes the orde...
DeviceBndLocalToGlobalAssembleOrderKey(const std::vector< std::string > &components)
Local indices and buffer slots of the parallel-boundary global DOFs.
DeviceBndLocalToGlobalIndexKey(const std::vector< std::string > &components, const std::vector< unsigned > &fieldInterleaveWidths)
Number of local copies of each parallel-boundary global DOF.
DeviceBndLocalToGlobalNumAssembleKey(const std::vector< std::string > &components)
Number of communication buffer slots of each parallel-boundary global DOF.
DeviceBndLocalToGlobalNumBndValsKey(const std::vector< std::string > &components)
Number of parallel-boundary global DOFs to assemble.
DeviceBndLocalToGlobalNumGidsKey(const std::vector< std::string > &components)
Offset of each parallel-boundary global DOF into the index and sign tables.
DeviceBndLocalToGlobalOffsetKey(const std::vector< std::string > &components)
Signs of the parallel-boundary local copies, packed as the index table with zeros in the buffer slots...
DeviceBndLocalToGlobalSignKey(bool zeroDir, bool signChange, const std::vector< std::string > &components)
Local indices of the interior global DOFs, packed width-major.
DeviceLocalToGlobalIndexKey(bool zeroDir, const std::vector< std::string > &components, unsigned width, const std::vector< unsigned > &fieldInterleaveWidths)
Offset of each interior global DOF into the index and sign tables.
DeviceLocalToGlobalIndexOffsetKey(bool zeroDir, const std::vector< std::string > &components, unsigned width, const std::vector< unsigned > &fieldInterleaveWidths)
Number of local copies of each interior global DOF.
DeviceLocalToGlobalNumAssembleKey(bool zeroDir, const std::vector< std::string > &components, unsigned width, const std::vector< unsigned > &fieldInterleaveWidths)
Number of interior global DOFs to assemble.
DeviceLocalToGlobalNumGidsKey(bool zeroDir, const std::vector< std::string > &components, unsigned width, const std::vector< unsigned > &fieldInterleaveWidths)
Signs of the interior local copies, packed as the index table.
DeviceLocalToGlobalSignKey(bool zeroDir, bool signChange, const std::vector< std::string > &components, unsigned width, const std::vector< unsigned > &fieldInterleaveWidths)
LocalToGlobalDataCreator(const ExpListSharedPtr &expansionList)
const std::vector< unsigned > & GetGSBndInfo(const std::vector< std::string > &components)
Parallel-boundary gather-scatter table, built once per set of components.
std::vector< AssemblyMapCGSharedPtr > & GetAssemblyMap(const std::vector< std::string > &components)
std::unordered_map< size_t, std::vector< unsigned > > m_gsInfo
Interior gather-scatter tables the interior keys are built from.
const std::vector< unsigned > & GetGSInfo(bool zeroDir, const std::vector< std::string > &components, unsigned width, const std::vector< unsigned > &fieldInterleaveWidths)
Interior gather-scatter table, built once per set of parameters.
void FillSignArray(std::vector< unsigned > &index, const std::vector< AssemblyMapCGSharedPtr > &loc2glo, bool zeroDir, bool signChange, int8_t *out)
ExpListSharedPtr m_expansionList
static const std::string m_name
LibUtilities::MemoryRegion< typename DeviceLocalToGlobalNumGidsKey< TPadding >::value_type > Create(const DeviceLocalToGlobalNumGidsKey< TPadding > &LocToGloKey)
std::unordered_map< size_t, std::vector< AssemblyMapCGSharedPtr > > m_assemblyMaps
std::unordered_map< size_t, std::vector< unsigned > > m_gsBndInfo
Parallel-boundary gather-scatter tables the boundary keys are built from.
~LocalToGlobalDataCreator() override=default
Base of the LocalToGlobalDataCreator keys: holds the parameters the tables depend on and hashes them ...
std::vector< std::string > m_components
LocalToGlobalKeyBase(const std::string &tag, const std::vector< std::string > &components, bool zeroDir=false, bool signChange=false, unsigned width=1, const std::vector< unsigned > &fieldInterleaveWidths={})
~LocalToGlobalKeyBase() override=default
std::vector< unsigned > m_fieldInterleaveWidths
Interleave width of each block of the field the tables address.
friend class LocalToGlobalDataCreator
Mask selecting one local copy of each global DOF this rank owns.
LocalToGlobalMaskKey(const std::vector< std::string > &components)
std::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
void hash_combine(std::size_t &seed)