File: flann_mpi_server.cpp

package info (click to toggle)
colmap 3.5-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 20,564 kB
  • sloc: ansic: 170,595; cpp: 95,339; python: 2,335; makefile: 183; sh: 51
file content (26 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <boost/mpi.hpp>
#include <FLANN/mpi/server.h>
#include <stdio.h>
#include <time.h>

int main(int argc, char* argv[])
{
	boost::mpi::environment env(argc, argv);

	try {
		if (argc != 4) {
			std::cout << "Usage: " << argv[0] << " <file> <dataset> <port>\n";
			return 1;
		}
		flann::mpi::Server<flann::L2<float> > server(argv[1], argv[2], std::atoi(argv[3]),
				flann::KDTreeIndexParams(4));

		server.run();
	}
	catch (std::exception& e) {
		std::cerr << "Exception: " << e.what() << "\n";
	}

	return 0;
}