Skip to content

Commit

Permalink
[Fix](bangc-ops): revise docs according to review.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanieeelLiu committed Oct 12, 2023
1 parent df125a2 commit a983d68
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions bangc-ops/kernels/box_iou_rotated/box_iou_rotated_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,16 @@ __mlu_func__ void convexHullGraham(
T *temp2_ram, T *temp3_ram, T *temp_long_1, T *temp_long_2, T *temp_long_3,
const uint32_t &actual_box_num, const uint32_t &actual_compute_box_num) {
int real_compute_box_num = actual_box_num < actual_compute_box_num? actual_box_num : actual_compute_box_num;
// int valid_box_count = __bang_count(valid_box, real_compute_box_num);
// if(!valid_box_count)
// {
// return;
// }
const int total_points = actual_compute_box_num * 24;
int valid_box_count = __bang_count(valid_box, real_compute_box_num);
if(!valid_box_count)
{
__bang_write_value(ordered_pts_x, total_points, 0);
__bang_write_value(ordered_pts_y, total_points, 0);
__bang_write_value(valid_pts, actual_compute_box_num, (T)1);
__bang_write_value(valid_pts + actual_compute_box_num, total_points - actual_compute_box_num, (T)0);
return;
}
// __bang_printf("test\n");
// Step1. Find the point with minimum y, if more than 1 points have the
// same minimum y, pick the one with the minimum x. set p[i].y to
Expand Down Expand Up @@ -546,8 +551,6 @@ __mlu_func__ void convexHullGraham(
dot2d<T>((T *)dist_ram, (T *)intersect_pts_x, (T *)intersect_pts_y,
(T *)intersect_pts_x, (T *)intersect_pts_y,
24 * actual_compute_box_num, (T *)temp_long_3);

const int total_points = actual_compute_box_num * 24;
// for (k = 1; k < num_in; k++) {
// if (dist[k] > 1e-8) {
// break;
Expand Down

0 comments on commit a983d68

Please sign in to comment.