| 261 | } |
| 262 | |
| 263 | void print_help() |
| 264 | { |
| 265 | const std::string tab = "\t"; |
| 266 | const std::string space = " "; |
| 267 | std::cout << "usage openpgl_bench -type <initField | benchLookUp | benchLookUpSample> [<options>]" << std::endl; |
| 268 | std::cout << std::endl; |
| 269 | std::cout << "type options:" << std::endl; |
| 270 | std::cout << space << "initField " << tab << "Measures the time to build a guiding Field from set of samples " << std::endl; |
| 271 | std::cout << space << " " << tab << "(i.e., saved SampleStorage objects)." << std::endl; |
| 272 | std::cout << space << " " << tab << "example:" << std::endl; |
| 273 | std::cout << space << " " << tab << "\"openpgl_bench -type initField -samples ss0.st ss1.st -field field.gf -device CPU_4\"" << std::endl; |
| 274 | std::cout << std::endl; |
| 275 | std::cout << space << "benchLookUp " << tab << "Measures the average time of an initialization of a SurfaceSamplingDistribution" << std::endl; |
| 276 | std::cout << space << " " << tab << "from a guiding Field. The positions form samples from a SampleStorage are used" << std::endl; |
| 277 | std::cout << space << " " << tab << "during the initialization." << std::endl; |
| 278 | std::cout << space << " " << tab << "example:" << std::endl; |
| 279 | std::cout << space << " " << tab << "\"openpgl_bench -type benchLookUp -samples ss0.st -field field.gf -device CPU_4\"" << std::endl; |
| 280 | std::cout << std::endl; |
| 281 | std::cout << space << "benchLookUpSample" << tab << "Measures the average time of an initialization of a SurfaceSamplingDistribution" << std::endl; |
| 282 | std::cout << space << " " << tab << "from a guiding Field combined with applying the cosine product and generating" << std::endl; |
| 283 | std::cout << space << " " << tab << "a directional samples. The positions form samples from a SampleStorage are used" << std::endl; |
| 284 | std::cout << space << " " << tab << "during the initialization." << std::endl; |
| 285 | std::cout << space << " " << tab << "example:" << std::endl; |
| 286 | std::cout << space << " " << tab << "\"openpgl_bench -type benchLookUpSample -samples ss0.st -field field.gf -device CPU_4\"" << std::endl; |
| 287 | std::cout << std::endl; |
| 288 | std::cout << "general options:" << std::endl; |
| 289 | std::cout << " -device <CPU_4 | CPU_8>" << tab << "SIMD width of the loaded Field or the Field that should be initialized." << std::endl; |
| 290 | std::cout << " -threads n " << tab << "Number of n threads that should be used during the measurements." << std::endl; |
| 291 | std::cout << std::endl; |
| 292 | std::cout << "initField options:" << std::endl; |
| 293 | std::cout << " -samples <s0 s1 .. sn> " << tab << "A list of stored samples used to initialize update the Field. " << std::endl; |
| 294 | std::cout << " " << tab << "Each sample set represents one training/update step/iteration. " << std::endl; |
| 295 | std::cout << " -field f0 " << tab << "The file where the initialized Field is stored." << std::endl; |
| 296 | std::cout << std::endl; |
| 297 | std::cout << "benchLookUp | benchLookUpSample options:" << std::endl; |
| 298 | std::cout << " -field f0 " << tab << "The stored Field object that is loaded for the test." << std::endl; |
| 299 | std::cout << " -samples s0 " << tab << "The stored samples which positions are used for query/initialize" << std::endl; |
| 300 | std::cout << " " << tab << "the SurfaceSamplingDistributions." << std::endl; |
| 301 | std::cout << std::endl; |
| 302 | } |
| 303 | |
| 304 | void init_field(BenchParams &benchParams) |
| 305 | { |