Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Robadob committed Jul 21, 2023
1 parent 9c51975 commit 0f72436
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/flamegpu/simulation/detail/AbstractSimRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ class AbstractSimRunner {
ErrorDetail t;
constexpr int count = 4;
constexpr int array_of_blocklengths[count] = {1, 1, 1, sizeof(ErrorDetail::exception_string)};
constexpr MPI_Aint array_of_displacements[count] = { reinterpret_cast<void*>(&t.run_id - &t),
reinterpret_cast<void*>(&t.device_id - &t),
reinterpret_cast<void*>(&t.runner_id - &t),
reinterpret_cast<void*>(&t.exception_string - &t) };
constexpr void* t_ptr = reinterpret_cast<void*>(&t);
constexpr MPI_Aint array_of_displacements[count] = { reinterpret_cast<void*>(&t.run_id) - t_ptr),
reinterpret_cast<void*>(&t.device_id) - t_ptr),
reinterpret_cast<void*>(&t.runner_id) - t_ptr),
reinterpret_cast<void*>(&t.exception_string) - t_ptr };
constexpr MPI_Datatype array_of_types[count] = {MPI_UNSIGNED, MPI_UNSIGNED, MPI_UNSIGNED, MPI_CHAR};
MPI_Type_create_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, &rtn);
}
Expand Down

0 comments on commit 0f72436

Please sign in to comment.