Skip to content

Commit

Permalink
Fix bug and make read/write intent clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Oct 22, 2024
1 parent dd6e410 commit 513d011
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arbor/backends/gpu/event_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct event_stream : BaseEventStream {

protected:
void init() override final {
resize(this->device_ev_data_, this->device_ev_data_.size());
resize(this->device_ev_data_, this->ev_data_.size());
memory::copy_async(this->ev_data_, this->device_ev_data_);
this->base_ptr_ = this->device_ev_data_.data();
}
Expand Down
2 changes: 1 addition & 1 deletion arbor/backends/gpu/shared_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ion_state::ion_state(const fvm_ion_config& ion_data,
init_eX_ = make_const_view(ion_data.init_revpot);
arb_assert(node_index_.size()==init_eX_.size());
}
if (write_Xd_) {
if (read_Xd_) {
Xd_ = make_const_view(ion_data.reset_iconc);
}
// Allocate data only if read.
Expand Down
2 changes: 1 addition & 1 deletion arbor/backends/multicore/shared_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ion_state::ion_state(const fvm_ion_config& ion_data,
init_eX_ = {ion_data.init_revpot.begin(), ion_data.init_revpot.end(), pad(alignment)};
arb_assert(node_index_.size()==init_eX_.size());
}
if (write_Xd_) {
if (read_Xd_) {
Xd_ = {ion_data.reset_iconc.begin(), ion_data.reset_iconc.end(), pad(alignment)};
}
// Allocate data only if read.
Expand Down

0 comments on commit 513d011

Please sign in to comment.