Skip to content

Commit

Permalink
fix ubunto compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahdhn committed Dec 26, 2023
1 parent aaea544 commit a66ada0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
8 changes: 4 additions & 4 deletions include/rxmesh/kernels/rxmesh_queries.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ __device__ __forceinline__ void e_e_manifold(

// in case of oriented faces, we use the edge direction to guide
// where we should write the edges
int nxt_i = 4 * cur_e + 2 * f_dir[i] + 0;
int prv_i = 4 * cur_e + 2 * f_dir[i] + 1;
int nxt_i = 4 * cur_e + 2 * f_dir[cur] + 0;
int prv_i = 4 * cur_e + 2 * f_dir[cur] + 1;

uint16_t ret_n =
::atomicCAS(s_output_value + nxt_i, INVALID16, nxt_e);
Expand All @@ -222,8 +222,8 @@ __device__ __forceinline__ void e_e_manifold(
if (ret_n != INVALID16) {
assert(ret_p == INVALID16);

int nxt_i = 4 * cur_e + 2 * (f_dir[i] ^ 1) + 0;
int prv_i = 4 * cur_e + 2 * (f_dir[i] ^ 1) + 1;
int nxt_i = 4 * cur_e + 2 * (f_dir[cur] ^ 1) + 0;
int prv_i = 4 * cur_e + 2 * (f_dir[cur] ^ 1) + 1;

ret_n =
::atomicCAS(s_output_value + nxt_i, INVALID16, nxt_e);
Expand Down
28 changes: 0 additions & 28 deletions include/rxmesh/util/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,34 +208,6 @@ inline void compute_avg_stddev_max_min(const T* arr,
stddev = std::sqrt(double(sum) / double(size - 1));
return;
}
/**
* @brief computes the average and stddev where the input is running sum (output
* of exclusive sum) the input size is actually size + 1
*/
template <typename T>
inline void compute_avg_stddev_max_min_rs(const T* arr_rs,
uint32_t size,
double& avg,
double& stddev,
T& max,
T& min)
{
uint32_t* arr = (uint32_t*)malloc(size * sizeof(uint32_t));
max = std::numeric_limits<T>::min();
min = std::numeric_limits<T>::max();
for (uint32_t i = 0; i < size; i++) {
// arr[i] = arr_rs[i + 1] - arr_rs[i];
uint32_t start = (i == 0) ? 0 : arr_rs[i - 1];
uint32_t end = arr_rs[i];
arr[i] = end - start;
max = std::max(max, arr[i]);
min = std::min(min, arr[i]);
}

compute_avg_stddev(arr, size, avg, stddev);

free(arr);
}

/**
* @brief binary search in a vector (has to be sorted --- not checked)
Expand Down

0 comments on commit a66ada0

Please sign in to comment.