Wildmeshing Toolkit
local_id_table_offset.hxx
Go to the documentation of this file.
1 #pragma once
2 
5 namespace wmtk::autogen::tri_mesh {
6 // computes the offset of a tuple's local ids in the tables
7 inline int64_t local_id_table_offset(const Tuple& tuple)
8 {
11 }
12 
13 inline std::array<int64_t, 2> lvid_leid_from_table_offset(int64_t table_offset)
14 {
15  std::array<int64_t, 2> r;
16  auto& [lvid, leid] = r;
17 
18  lvid = table_offset / 3;
19  leid = table_offset % 3;
20  return r;
21 }
22 
23 } // namespace wmtk::autogen::tri_mesh
static int8_t local_eid(const Tuple &t)
static int8_t local_vid(const Tuple &t)
int64_t local_id_table_offset(const Tuple &t)
std::array< int64_t, 2 > lvid_leid_from_table_offset(int64_t table_offset)