File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1449,8 +1449,7 @@ uint64_t GlobalOrderWriter::num_tiles_per_row(const Domain& domain) {
14491449 };
14501450
14511451 ret *= dim->domain_range (dim_dom) / apply_with_type (l, dim->type ());
1452- // todo consider cases where the above calculation has a remainder. Also
1453- // consider other types
1452+ // todo consider cases where the above calculation has a remainder.
14541453 }
14551454 return ret;
14561455}
@@ -1493,8 +1492,13 @@ NDRange GlobalOrderWriter::ndranges_after_split(uint64_t num) {
14931492 if (rows_written_ == 0 ) {
14941493 // It means that the start has not been set yet. Set it to the minimum value
14951494 // of the expanded domain for that dim
1496- auto dim_dom_data = (const uint64_t *)dim_dom.data ();
1497- start_ = dim_dom_data[0 ];
1495+ auto ll = [&](auto T) {
1496+ auto dim_dom_data = (const decltype (T)*)dim_dom.data ();
1497+ // todo this should be unsigned or signed
1498+ return static_cast <uint64_t >(dim_dom_data[0 ]);
1499+ };
1500+
1501+ start_ = apply_with_type (ll, dim->type ());
14981502 }
14991503 uint64_t end = start_ + (rows_of_tiles_to_write * tile_extent) - 1 ;
15001504
You can’t perform that action at this time.
0 commit comments