def find_lib_path(libname, packages): libdirs = [] if "LD_LIBRARY_PATH" in os.environ: libdirs += os.environ["LD_LIBRARY_PATH"].split(":") try: libdirs += pkg_config_libdirs(packages) except ValueError: pass path = get_libpath_from_dirlist(libname, libdirs) if path is not None: return [(path, '')] else: return []
for (j = 0; j < NCPUS; j++){ ccorrf_contig_nostream((float *) st[j], (float *) ht[j], (float *) qt[j]); } // Then, perform the FFTs, serially (but each FFT is // parallelized) for (j = 0; j < NCPUS; j++){ fftwf_execute_dft((fftwf_plan) plan[0], (fftwf_complex *) qt[j], (fftwf_complex *) snr); } """ many_fft_libs = ['fftw3f', 'fftw3f_omp', 'gomp', 'm'] # The following could return system libraries, but oh well, # shouldn't hurt anything many_fft_libdirs = libutils.pkg_config_libdirs(['fftw3f']) rpath_list = [] for libdir in many_fft_libdirs: rpath = "-Wl,-rpath="+libdir rpath_list.append(rpath) libfftw3f = _fftw.float_lib def fftw_plan(size, nthreads = 1): if not _fftw._fftw_threaded_set: _fftw.set_threads_backend() if nthreads != _fftw._fftw_current_nthreads: _fftw._fftw_plan_with_nthreads(nthreads) # Convert a measure-level to flags flags = _fftw.get_flag(_fftw.get_measure_level(), aligned=True)