added flags for dataset timing tests to change the number of trials
parent
fa4faa274a
commit
322f61c537
|
@ -34,9 +34,17 @@ int main(int argc, char *argv[]) {
|
|||
else
|
||||
datasetname = "intel";
|
||||
|
||||
// check if there should be a constraint
|
||||
if (argc == 3 && string(argv[2]).compare("-c") == 0)
|
||||
soft_prior = false;
|
||||
|
||||
// find the number of trials - default is 10
|
||||
size_t nrTrials = 10;
|
||||
if (argc == 3 && string(argv[2]).compare("-c") != 0)
|
||||
nrTrials = strtoul(argv[2], NULL, 10);
|
||||
else if (argc == 4)
|
||||
nrTrials = strtoul(argv[3], NULL, 10);
|
||||
|
||||
pair<shared_ptr<Pose2Graph>, shared_ptr<Pose2Values> > data = load2D(dataset(datasetname));
|
||||
|
||||
// Add a prior on the first pose
|
||||
|
@ -55,7 +63,6 @@ int main(int argc, char *argv[]) {
|
|||
toc_(2, "linearize");
|
||||
tictoc_print_();
|
||||
|
||||
const size_t nrTrials = 10;
|
||||
for(size_t trial = 0; trial < nrTrials; ++trial) {
|
||||
|
||||
tic_(3, "solve");
|
||||
|
|
|
@ -34,9 +34,17 @@ int main(int argc, char *argv[]) {
|
|||
else
|
||||
datasetname = "intel";
|
||||
|
||||
// check if there should be a constraint
|
||||
if (argc == 3 && string(argv[2]).compare("-c") == 0)
|
||||
soft_prior = false;
|
||||
|
||||
// find the number of trials - default is 10
|
||||
size_t nrTrials = 10;
|
||||
if (argc == 3 && string(argv[2]).compare("-c") != 0)
|
||||
nrTrials = strtoul(argv[2], NULL, 10);
|
||||
else if (argc == 4)
|
||||
nrTrials = strtoul(argv[3], NULL, 10);
|
||||
|
||||
pair<shared_ptr<Pose2Graph>, shared_ptr<Pose2Values> > data = load2D(dataset(datasetname));
|
||||
|
||||
// Add a prior on the first pose
|
||||
|
@ -55,7 +63,7 @@ int main(int argc, char *argv[]) {
|
|||
toc_(2, "linearize");
|
||||
tictoc_print_();
|
||||
|
||||
for(size_t trial = 0; trial < 10; ++trial) {
|
||||
for(size_t trial = 0; trial < nrTrials; ++trial) {
|
||||
|
||||
tic_(3, "solve");
|
||||
tic(1, "construct solver");
|
||||
|
|
Loading…
Reference in New Issue