Skip to content

Commit de2e55b

Browse files
committed
remote_1d: blitz::range for edge scalar indices 3
1 parent 41ea976 commit de2e55b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libmpdata++/bcond/remote_1d.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ namespace libmpdataxx
108108

109109
assert(halo>=1);
110110
const rng_t left_edge_sclr_rng(this->left_edge_sclr, this->left_edge_sclr);
111-
this->xchng(a, idx_t(idx_ctor_arg_t(left_edge_sclr_rng)), idx_t(idx_ctor_arg_t(this->left_halo_sclr.last())));
111+
const rng_t left_halo_sclr_last_rng(this->left_halo_sclr.last(), this->left_halo_sclr.last());
112+
this->xchng(a, idx_t(idx_ctor_arg_t(left_edge_sclr_rng)), idx_t(idx_ctor_arg_t(left_halo_sclr_last_rng)));
112113
}
113114

114115
void avg_edge_and_halo1_sclr_cyclic(arr_t &a, const rng_t &j)
@@ -218,7 +219,8 @@ namespace libmpdataxx
218219

219220
assert(halo>=1);
220221
const rng_t rght_edge_sclr_rng(this->rght_edge_sclr, this->rght_edge_sclr);
221-
this->xchng(a, idx_t(idx_ctor_arg_t(rght_edge_sclr_rng)), idx_t(idx_ctor_arg_t(this->rght_halo_sclr.first())));
222+
const rng_t rght_halo_sclr_first_rng(this->rght_halo_sclr.first(), this->rght_halo_sclr.first());
223+
this->xchng(a, idx_t(idx_ctor_arg_t(rght_edge_sclr_rng)), idx_t(idx_ctor_arg_t(rght_halo_sclr_first_rng)));
222224
}
223225

224226
void avg_edge_and_halo1_sclr_cyclic(arr_t &a, const rng_t &j)

0 commit comments

Comments
 (0)