26 Kokkos::realloc(Kokkos::view_alloc(Kokkos::WithoutInitializing),
pair_list,
28 Kokkos::realloc(Kokkos::view_alloc(Kokkos::WithoutInitializing),
pair_ids,
30 Kokkos::realloc(Kokkos::view_alloc(Kokkos::WithoutInitializing),
angle_list,
32 Kokkos::realloc(Kokkos::view_alloc(Kokkos::WithoutInitializing),
angle_ids,
34 Kokkos::realloc(Kokkos::view_alloc(Kokkos::WithoutInitializing),
36 Kokkos::realloc(Kokkos::view_alloc(Kokkos::WithoutInitializing),
41 Kokkos::WithoutInitializing,
45 Kokkos::WithoutInitializing,
53 Kokkos::WithoutInitializing,
58 "dihedral_bond_list"),
76#ifdef ESPRESSO_COLLISION_DETECTION
83#ifdef ESPRESSO_COLLISION_DETECTION
88#ifdef ESPRESSO_COLLISION_DETECTION
100 Kokkos::View<int *, execution_space>
const &
id_to_index) {
123template <
typename BondListT,
typename BondIDT>
131 auto new_data_view = Kokkos::View<
const int *, Kokkos::HostSpace,
132 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
134 auto new_id_view = Kokkos::View<
const int *, Kokkos::HostSpace,
135 Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
140 using execution_space = Kokkos::DefaultHostExecutionSpace;
142 Kokkos::WithoutInitializing,
143 "bond_list_rebuild"),
146 Kokkos::WithoutInitializing,
153 Kokkos::subview(bond_list, std::make_pair(0,
old_count), Kokkos::ALL()));
155 Kokkos::subview(bond_ids, std::make_pair(0,
old_count)));
157 Kokkos::parallel_for(
159 Kokkos::RangePolicy<Kokkos::DefaultHostExecutionSpace>(
162 constexpr int NCols =
163 BondListT::rank == 2 ?
static_cast<int>(BondListT::static_extent(1))
170 Kokkos::parallel_for(
172 Kokkos::RangePolicy<Kokkos::DefaultHostExecutionSpace>(
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
void rebuild_bond_list_impl(std::vector< int > const &new_bond_list, std::vector< int > const &new_bond_ids, BondListT &bond_list, BondIDT &bond_ids, int total_bond_count)
Kokkos::View< int *, Kokkos::LayoutRight, execution_space > AngleBondIDType
std::vector< int > new_angle_ids
Kokkos::View< int *[3], Kokkos::LayoutRight, execution_space > AngleBondlistType
void allocate()
Allocate or reallocate all Kokkos Views to current counts.
AngleBondIDType angle_ids
Kokkos::View< int *[2], Kokkos::LayoutRight, execution_space > PairBondlistType
std::vector< int > new_dihedral_list
DihedralBondlistType dihedral_list
AngleBondlistType angle_list
void add_new_bond(int bond_id, std::vector< int > const &particle_ids, Kokkos::View< int *, execution_space > const &id_to_index)
std::vector< int > new_pair_list
void reset()
Reset counts + collision vectors.
std::vector< int > new_angle_list
void clear()
Deallocates Views.
std::vector< int > new_dihedral_ids
Kokkos::DefaultHostExecutionSpace execution_space
Kokkos::View< int *, Kokkos::LayoutRight, execution_space > DihedralBondIDType
std::vector< int > new_pair_ids
Kokkos::View< int *[4], Kokkos::LayoutRight, execution_space > DihedralBondlistType
Kokkos::View< int *, Kokkos::LayoutRight, execution_space > PairBondIDType
DihedralBondIDType dihedral_ids
PairBondlistType pair_list