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 @@ -1448,8 +1448,7 @@ uint64_t GlobalOrderWriter::num_tiles_per_row(const Domain& domain) {
14481448 };
14491449
14501450 ret *= dim->domain_range (dim_dom) / apply_with_type (l, dim->type ());
1451- // todo consider cases where the above calculation has a remainder. Also
1452- // consider other types
1451+ // todo consider cases where the above calculation has a remainder.
14531452 }
14541453 return ret;
14551454}
@@ -1492,8 +1491,13 @@ NDRange GlobalOrderWriter::ndranges_after_split(uint64_t num) {
14921491 if (rows_written_ == 0 ) {
14931492 // It means that the start has not been set yet. Set it to the minimum value
14941493 // of the expanded domain for that dim
1495- auto dim_dom_data = (const uint64_t *)dim_dom.data ();
1496- start_ = dim_dom_data[0 ];
1494+ auto ll = [&](auto T) {
1495+ auto dim_dom_data = (const decltype (T)*)dim_dom.data ();
1496+ // todo this should be unsigned or signed
1497+ return static_cast <uint64_t >(dim_dom_data[0 ]);
1498+ };
1499+
1500+ start_ = apply_with_type (ll, dim->type ());
14971501 }
14981502 uint64_t end = start_ + (rows_of_tiles_to_write * tile_extent) - 1 ;
14991503
You can’t perform that action at this time.
0 commit comments