Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference between definition and implementation of getStatisticsOfMission() #10

Merged
merged 1 commit into from
Dec 7, 2017

Conversation

Alabate
Copy link
Contributor

@Alabate Alabate commented Dec 5, 2017

While trying to use this project on a 32bit architecture, I spot a difference between the prototype of getStatisticsOfMission() and its implementation: start_time and end_time does't have the same type. This make the 32bit build fail because time_t and int64_t doesn't have the same size in this architecture.

#map-structure/vi-map/include/vi-map/vi-map.h:494
  void getStatisticsOfMission(
      const vi_map::MissionId& mission_id,
      std::vector<size_t>* num_good_landmarks_per_camera,
      std::vector<size_t>* num_bad_landmarks_per_camera,
      std::vector<size_t>* num_unknown_landmarks_per_camera,
      std::vector<size_t>* total_num_landmarks_per_camera,
      size_t* num_landmarks, size_t* num_vertices, size_t* num_observations,
double* duration_s, time_t* start_time, time_t* end_time) const;
#map-structure/vi-map/src/vi-map.cc:317
void VIMap::getStatisticsOfMission(
    const vi_map::MissionId& mission_id,
    std::vector<size_t>* num_good_landmarks_per_camera,
    std::vector<size_t>* num_bad_landmarks_per_camera,
    std::vector<size_t>* num_unknown_landmarks_per_camera,
    std::vector<size_t>* total_num_landmarks_per_camera, size_t* num_landmarks,
    size_t* num_vertices, size_t* num_observations, double* duration_s,
int64_t* start_time_ns, int64_t* end_time_ns) const {

I choosed to keep only int64_t because every usage of this function are using this type and a nanosecond timestamp doesn't fit in 32bit.

@ethzasl-jenkins
Copy link

Can one of the admins verify this patch?

@ethzasl-jenkins
Copy link

Test PASSed.

@ethzasl-jenkins
Copy link

Test FAILed.

Copy link
Contributor

@dymczykm dymczykm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks, @Alabate, int64_t is indeed the way to go

@dymczykm
Copy link
Contributor

dymczykm commented Dec 7, 2017

test this please

@ethzasl-jenkins
Copy link

Test PASSed.

@dymczykm dymczykm merged commit 63ea0c8 into ethz-asl:master Dec 7, 2017
@Alabate Alabate deleted the bugfix/vi-map-type-typo branch December 7, 2017 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants