Skip to content

Commit 6982354

Browse files
committed
writer/adios2: simplify
1 parent 0c48d57 commit 6982354

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/include/writer_adios2.hxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ private:
237237
int n_comps = h_expr.shape(3);
238238
int n_patches = h_expr.shape(4);
239239
Int3 im = {h_expr.shape(0), h_expr.shape(1), h_expr.shape(2)};
240-
Int3 ib = {-(im[0] - ldims[0]) / 2, -(im[1] - ldims[1]) / 2,
241-
-(im[2] - ldims[2]) / 2};
240+
Int3 ib = -(im - ldims) / 2;
242241

243242
file.prefixes_.push_back(name);
244243
file.put("ib", ib, launch);
@@ -266,8 +265,7 @@ private:
266265

267266
int n_patches = h_expr.shape(3);
268267
Int3 im = {h_expr.shape(0), h_expr.shape(1), h_expr.shape(2)};
269-
Int3 ib = {-(im[0] - ldims[0]) / 2, -(im[1] - ldims[1]) / 2,
270-
-(im[2] - ldims[2]) / 2};
268+
Int3 ib = -(im - ldims) / 2;
271269

272270
file.prefixes_.push_back(name);
273271
file.put("ib", ib, launch);

0 commit comments

Comments
 (0)