Parallel Plane Sweep
0.1
Shared memory multithreaded version of the plane sweep algorithm
|
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <cstdlib>
#include <algorithm>
#include "parPlaneSweep.h"
#include "d2hex.h"
#include <fstream>
Go to the source code of this file.
Functions | |
void | tokenizeString (const std::string &str, std::vector< string > &tokens, const string &delimiters) |
int | main (int argc, char *argv[]) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
The main function provides examples of how to call the serial and parallel versions of the plane sweep algorithm. This code implements a O((n n) + (k k)) version of the algorithm, that returns a sorted list of halfsegments.
This particular function expects input in a hexadecimal format, and includes code to extract floating point numbers from exadecimal representation.
The command line arguments required are:
The program repeatedly runs a plan sweep algorithm on the input with increasing numbers of strips. Strip counts increase quadratically.
void tokenizeString | ( | const std::string & | str, |
std::vector< string > & | tokens, | ||
const string & | delimiters | ||
) |