Skip to content

Commit

Permalink
fix compilation bug with OMP (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
doronhi authored Mar 21, 2019
1 parent d3d8768 commit b59aad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion realsense2_camera/src/base_realsense_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,14 +962,14 @@ void BaseRealSenseNode::fix_depth_scale(rs2::depth_frame depth_frame)
void BaseRealSenseNode::clip_depth(rs2::depth_frame depth_frame, float clipping_dist)
{
uint16_t* p_depth_frame = reinterpret_cast<uint16_t*>(const_cast<void*>(depth_frame.get_data()));
uint16_t clipping_value = static_cast<uint16_t>(clipping_dist / _depth_scale_meters);

int width = depth_frame.get_width();
int height = depth_frame.get_height();

#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic) //Using OpenMP to try to parallelise the loop
#endif
uint16_t clipping_value = static_cast<uint16_t>(clipping_dist / _depth_scale_meters);
for (int y = 0; y < height; y++)
{
auto depth_pixel_index = y * width;
Expand Down

0 comments on commit b59aad5

Please sign in to comment.