Commits
Ville Suoranta authored d8541f26bde Merge
30 30 | |
31 31 | |
32 32 | |
33 33 | |
34 34 | |
35 35 | |
36 36 | |
37 37 | |
38 38 | |
39 39 | |
40 + | |
41 + | |
42 + | |
43 + | |
44 + | |
40 45 | |
41 46 | |
42 47 | |
43 48 | |
44 49 | |
45 50 | using namespace std; |
46 51 | using namespace casacore; |
47 52 | using namespace casa; |
48 53 | |
49 54 | using namespace casacore; |
423 428 | |
424 429 | static bool initialized = false; |
425 430 | if ( initialized ) return false; |
426 431 | default_data_path = default_path; |
427 432 | python_path = pypath; |
428 433 | casatools::get_state( ).setDataPath(default_data_path); |
429 434 | casatools::get_state( ).setDistroDataPath(distro_data); |
430 435 | casatools::get_state( ).setPythonPath(python_path); |
431 436 | // configure quanta/measures customizations... |
432 437 | UnitMap::putUser( "pix", UnitVal(1.0), "pixel units" ); |
438 + | |
433 439 | |
434 440 | casa::AsdmStMan::registerClass( ); |
435 441 | register_derivedmscal(); |
442 + | |
443 + | // --- --- --- configure fftw --- CAS-13342 --- --- --- --- --- --- --- --- |
444 + | casacore::FFTW init_casacore_fftw; |
445 + | |
446 + | int numCPUs = omp_get_max_threads(); |
447 + | |
448 + | int numCPUs = HostInfo::numCPUs(); |
449 + | |
450 + | int nthreads = 1; |
451 + | if (numCPUs > 1) { |
452 + | nthreads = numCPUs; |
453 + | } |
454 + | fftwf_plan_with_nthreads(nthreads); |
455 + | fftw_plan_with_nthreads(nthreads); |
436 456 | |
437 457 | initialized = true; |
438 458 | return true; |
439 459 | } |
440 460 | |
441 461 | // ------------------------------------------------------------ |
442 462 | // -------------------- handling data path -------------------- |
443 463 | std::vector<std::string> utils::defaultpath( ) { |
444 464 | return default_data_path; |
445 465 | } |