Commit 5d2e097b authored by Stan Moore's avatar Stan Moore
Browse files

Need dynamic cast for multiple inheritance

parent da51a8a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ void CommKokkos::forward_comm_pair_device(Pair *pair)
  MPI_Request request;

  int nsize = pair->comm_forward;
  KokkosBase* pairKKBase = (KokkosBase*) pair;
  KokkosBase* pairKKBase = dynamic_cast<KokkosBase*>(pair);

  for (iswap = 0; iswap < nswap; iswap++) {
    int n = MAX(max_buf_pair,nsize*sendnum[iswap]);
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ void FixSetForceKokkos<DeviceType>::post_force(int vflag)
    region = domain->regions[iregion];
    region->prematch();
    DAT::tdual_int_1d k_match = DAT::tdual_int_1d("setforce:k_match",nlocal);
    KokkosBase* regionKKBase = (KokkosBase*) region;
    KokkosBase* regionKKBase = dynamic_cast<KokkosBase*>(region);
    regionKKBase->match_all_kokkos(groupbit,k_match);
    k_match.template sync<DeviceType>();
    d_match = k_match.template view<DeviceType>();
+2 −2
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ void GridCommKokkos<DeviceType>::forward_comm(KSpace *kspace, int which)
  k_packlist.sync<DeviceType>();
  k_unpacklist.sync<DeviceType>();

  KokkosBase* kspaceKKBase = (KokkosBase*) kspace;
  KokkosBase* kspaceKKBase = dynamic_cast<KokkosBase*>(kspace);

  for (int m = 0; m < nswap; m++) {
    if (swap[m].sendproc == me)
@@ -547,7 +547,7 @@ void GridCommKokkos<DeviceType>::reverse_comm(KSpace *kspace, int which)
  k_packlist.sync<DeviceType>();
  k_unpacklist.sync<DeviceType>();

  KokkosBase* kspaceKKBase = (KokkosBase*) kspace;
  KokkosBase* kspaceKKBase = dynamic_cast<KokkosBase*>(kspace);

  for (int m = nswap-1; m >= 0; m--) {
    if (swap[m].recvproc == me)