pyroomacoustics icon indicating copy to clipboard operation
pyroomacoustics copied to clipboard

Move RIR builder code to libroom to allow parallelization

Open fakufaku opened this issue 3 years ago • 1 comments

This PR moves the code that was originally cython code to efficiently build RIR from the image sources to the C++ code base. This has two advantages.

  1. Reduces complexity of the code, only one extension to compile.
  2. Parallel processing in cython seems to be broken on mac (openmp not supported by clang, some difficulty between numpy and openmp with gcc). Moving to C++ allows to use std::thread which is portable.
  • [ ] Are there docstrings ? Do they follow the numpydoc style ?
  • [X] Have you run the tests by doing nosetests or py.test at the root of the repo ?
  • [ ] Have you checked that the doc builds properly and that any new file has been added to the repo ? How to do that is covered in the documentation.
  • [X] Is there a unit test for the proposed code modification ? If the PR addresses an issue, the test should make sure the issue is fixed.
  • [X] Last but not least, did you document the proposed change in the CHANGELOG file ? It should go under "Unreleased".

Happy PR :smiley:

fakufaku avatar Jun 27 '22 11:06 fakufaku

@ebezzam Sorry for dumping this on you. If you have a few minutes, could you please give me review of the code. The main new thing is that I moved the cython code for the RIR builder to C++ in libroom. This allows to have the code multi-threaded. We can also get rid of the cython module later.

Some of the files (randomized ISM) have only been formatted, so you can skip them.

fakufaku avatar Jun 27 '22 14:06 fakufaku