69 Kokkos::Profiling::pushRegion(
"Compute Linear Skin");
71 using MemorySpace =
typename ExecSpace::memory_space;
77 Kokkos::DefaultHostExecutionSpace::memory_space,
78 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
84 Kokkos::View<
offset_t *, Kokkos::DefaultHostExecutionSpace::memory_space,
85 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
92 Kokkos::DefaultHostExecutionSpace::memory_space,
93 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
98 Kokkos::View<
offset_t *, Kokkos::DefaultHostExecutionSpace::memory_space,
99 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
TF_off_vec.data(),
105 Kokkos::DefaultHostExecutionSpace::memory_space,
106 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
112 Kokkos::View<
offset_t *, Kokkos::DefaultHostExecutionSpace::memory_space,
113 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
TLF_off_vec.data(),
118 auto nbNode = transfer.sourcePoints.extent_int(0);
141 std::cerr <<
"Invalid Dim " <<
Dim << std::endl;
146 auto linFaces = Kokkos::View<int_t **, ExecSpace>(
147 Kokkos::view_alloc(
execSpace, Kokkos::WithoutInitializing,
"linFaces"),
149 auto allFaceId = Kokkos::View<int_t *, ExecSpace>(
150 Kokkos::view_alloc(
execSpace, Kokkos::WithoutInitializing,
"allFaceId"),
153 Kokkos::view_alloc(
execSpace, Kokkos::WithoutInitializing,
156 auto allParents = Kokkos::View<int_t *, ExecSpace>(
157 Kokkos::view_alloc(
execSpace, Kokkos::WithoutInitializing,
"allParents"),
160 constexpr int_t maxi = std::numeric_limits<int_t>::max();
162 Kokkos::Profiling::pushRegion(
"Fill all faces and sort per row permute");
164 Kokkos::parallel_scan(
165 "Fill all faces and sort per row : Col permutation",
199 Kokkos::Profiling::popRegion();
201 Kokkos::Profiling::pushRegion(
202 "Create permutation vector to sort linFaces by row");
206 using CompType = Kokkos::BinOp1D<IdViewType>;
207 using DeviceType = Kokkos::Device<ExecSpace, MemorySpace>;
209 Kokkos::BinSort<IdViewType, CompType, DeviceType, int_t>
bin_sort(
213 Kokkos::Profiling::popRegion();
215 Kokkos::Profiling::pushRegion(
"Permute and Compute Nbtris");
218 Kokkos::parallel_reduce(
219 "Permute and Compute NbTris",
226 auto vect = Kokkos::subview(
linFaces, index, Kokkos::ALL());
272 Kokkos::Profiling::popRegion();
274 Kokkos::Profiling::pushRegion(
"Remove");
279 Kokkos::Experimental::distance(Kokkos::Experimental::begin(
allFaceId),
282 Kokkos::Profiling::popRegion();
284 Kokkos::Profiling::pushRegion(
"Finalize: compute linear skin");
286 auto skinFaces = Kokkos::View<int_t **, ExecSpace>(
287 Kokkos::view_alloc(
execSpace, Kokkos::WithoutInitializing,
"skinFaces"),
289 auto skinParents = Kokkos::View<int_t *, ExecSpace>(
290 Kokkos::view_alloc(
execSpace, Kokkos::WithoutInitializing,
"skinParents"),
293 Kokkos::parallel_scan(
294 "Fill Skin Faces & Parents", Kokkos::RangePolicy(
execSpace, 0,
dist),
324 transfer.skinParents = skinParents;
326 Kokkos::Profiling::popRegion();
328 Kokkos::Profiling::popRegion();