Skip to content

Commit

Permalink
Merge pull request #215 from clEsperanto/wip-range-func
Browse files Browse the repository at this point in the history
update range function for wrapper compatibility
  • Loading branch information
StRigaud authored Dec 1, 2023
2 parents d552a94 + 1f8e287 commit ca39aa3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions clic/src/tier1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1457,21 +1457,21 @@ range_func(const Device::Pointer & device,
int stop_z,
int step_z) -> Array::Pointer
{
start_x = (start_x < 0) ? 0 : start_x;
start_y = (start_y < 0) ? 0 : start_y;
start_z = (start_z < 0) ? 0 : start_z;
// start_x = (start_x < 0) ? 0 : start_x;
// start_y = (start_y < 0) ? 0 : start_y;
// start_z = (start_z < 0) ? 0 : start_z;

start_x = (start_x > src->width()) ? src->width() : start_x;
start_y = (start_y > src->height()) ? src->height() : start_y;
start_z = (start_z > src->depth()) ? src->depth() : start_z;
// start_x = (start_x > src->width()) ? src->width() : start_x;
// start_y = (start_y > src->height()) ? src->height() : start_y;
// start_z = (start_z > src->depth()) ? src->depth() : start_z;

stop_x = (stop_x < 0) ? 0 : stop_x;
stop_y = (stop_y < 0) ? 0 : stop_y;
stop_z = (stop_z < 0) ? 0 : stop_z;
// stop_x = (stop_x < 0) ? 0 : stop_x;
// stop_y = (stop_y < 0) ? 0 : stop_y;
// stop_z = (stop_z < 0) ? 0 : stop_z;

stop_x = (stop_x > src->width()) ? src->width() : stop_x;
stop_y = (stop_y > src->height()) ? src->height() : stop_y;
stop_z = (stop_z > src->depth()) ? src->depth() : stop_z;
// stop_x = (stop_x > src->width()) ? src->width() : stop_x;
// stop_y = (stop_y > src->height()) ? src->height() : stop_y;
// stop_z = (stop_z > src->depth()) ? src->depth() : stop_z;

tier0::create_dst(src,
dst,
Expand Down

0 comments on commit ca39aa3

Please sign in to comment.