Need dynamic cast for multiple inheritance

This commit is contained in:
Stan Moore
2017-12-01 12:53:40 -07:00
parent da51a8a0bb
commit 5d2e097b27
3 changed files with 4 additions and 4 deletions

View File

@ -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]);

View File

@ -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>();

View File

@ -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)